Commit ba616997 authored by Laurent Aimar's avatar Laurent Aimar

* rename ES_OUT_SET_PCR into ES_OUT_SET_GROUP_PCR, now ES_OUT_SET_PCR

  apply to the selected program.
parent 5cfcac85
......@@ -2,7 +2,7 @@
* ninput.h
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ninput.h,v 1.22 2004/01/06 21:42:43 sigmunau Exp $
* $Id: ninput.h,v 1.23 2004/01/07 15:31:31 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -52,7 +52,8 @@ enum es_out_query_e
ES_OUT_GET_ES_STATE,/* arg1= es_out_id_t* arg2=vlc_bool_t* */
/* XXX XXX XXX Don't use them YET !!! */
ES_OUT_SET_PCR, /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
ES_OUT_SET_PCR, /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
ES_OUT_SET_GROUP_PCR, /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
ES_OUT_RESET_PCR, /* no arg */
};
......
......@@ -2,7 +2,7 @@
* nsv.c: NullSoft Video demuxer.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: nsv.c,v 1.3 2004/01/07 14:59:37 fenrir Exp $
* $Id: nsv.c,v 1.4 2004/01/07 15:31:31 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -192,7 +192,7 @@ static int Demux( demux_t *p_demux )
}
/* Set PCR */
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int)0, (int64_t)p_sys->i_pcr );
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_sys->i_pcr );
/* Read video */
i_size = ( header[0] >> 4 ) | ( header[1] << 4 ) | ( header[2] << 12 );
......
......@@ -2,7 +2,7 @@
* real.c: Real demuxer.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: real.c,v 1.1 2004/01/04 14:35:12 fenrir Exp $
* $Id: real.c,v 1.2 2004/01/07 15:31:31 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -314,7 +314,7 @@ static int Demux( demux_t *p_demux )
{
p_sys->i_pcr = tk->p_frame->i_dts;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int)0, (int64_t)p_sys->i_pcr );
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_sys->i_pcr );
}
es_out_Send( p_demux->out, tk->p_es, tk->p_frame );
......@@ -383,7 +383,7 @@ static int Demux( demux_t *p_demux )
if( p_sys->i_pcr < tk->p_frame->i_dts )
{
p_sys->i_pcr = tk->p_frame->i_dts;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int)0, (int64_t)p_sys->i_pcr );
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_sys->i_pcr );
}
es_out_Send( p_demux->out, tk->p_es, tk->p_frame );
......@@ -420,7 +420,7 @@ static int Demux( demux_t *p_demux )
if( p_sys->i_pcr < p_frame->i_dts )
{
p_sys->i_pcr = p_frame->i_dts;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int)0, (int64_t)p_sys->i_pcr );
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_sys->i_pcr );
}
es_out_Send( p_demux->out, tk->p_es, p_frame );
}
......@@ -475,7 +475,7 @@ static int Demux( demux_t *p_demux )
{
p_sys->i_pcr = i_pts;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int)0, (int64_t)p_sys->i_pcr );
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_sys->i_pcr );
}
es_out_Send( p_demux->out, tk->p_es, p_block );
}
......
......@@ -2,7 +2,7 @@
* es_out.c: Es Out handler for input.
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id: es_out.c,v 1.14 2004/01/06 12:02:06 zorglub Exp $
* $Id: es_out.c,v 1.15 2004/01/07 15:31:31 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -588,8 +588,6 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
es_out_sys_t *p_sys = out->p_sys;
vlc_bool_t b, *pb;
int i, *pi;
int i_group;
int64_t i_pcr;
es_out_id_t *es;
......@@ -699,14 +697,24 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
return VLC_SUCCESS;
case ES_OUT_SET_PCR:
case ES_OUT_SET_GROUP_PCR:
{
pgrm_descriptor_t *p_prgm = NULL;
int64_t i_pcr;
i_group = (int)va_arg( args, int );
if( i_query == ES_OUT_SET_PCR )
{
p_prgm = p_sys->p_input->stream.p_selected_program;
}
else
{
int i_group = (int)va_arg( args, int );
p_prgm = input_FindProgram( p_sys->p_input, i_group );
}
i_pcr = (int64_t)va_arg( args, int64_t );
/* search program */
if( ( p_prgm = input_FindProgram( p_sys->p_input, i_group ) ) )
if( p_prgm )
{
input_ClockManageRef( p_sys->p_input, p_prgm, i_pcr * 9 / 100);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment