[vlc-commits] [Git][videolan/vlc][master] 2 commits: vlc_es_out: officially make ES_OUT_SET_NEXT_DISPLAY_TIME use vlc_tick_t

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 30 12:31:03 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
e155b529 by Steve Lhomme at 2023-06-30T12:12:02+00:00
vlc_es_out: officially make ES_OUT_SET_NEXT_DISPLAY_TIME use vlc_tick_t

- - - - -
b4809fa5 by Steve Lhomme at 2023-06-30T12:12:02+00:00
demux: ts: fix ES_OUT_SET_NEXT_DISPLAY_TIME calls

It was sending MPEG 9/100 values where microseconds/ticks were expected.

- - - - -


4 changed files:

- include/vlc_es_out.h
- modules/demux/mpeg/ts.c
- src/input/es_out.c
- src/input/es_out_timeshift.c


Changes:

=====================================
include/vlc_es_out.h
=====================================
@@ -74,7 +74,7 @@ enum es_out_query_e
     ES_OUT_SET_ES_FMT,         /* arg1= es_out_id_t* arg2=es_format_t* res=can fail */
 
     /* Allow preroll of data (data with dts/pts < i_pts for all ES will be decoded but not displayed */
-    ES_OUT_SET_NEXT_DISPLAY_TIME,       /* arg1=int64_t i_pts(microsecond) */
+    ES_OUT_SET_NEXT_DISPLAY_TIME,       /* arg1=vlc_tick_t i_pts(microsecond) */
     /* Set meta data for group (dynamic) (The vlc_meta_t is not modified nor released) */
     ES_OUT_SET_GROUP_META,  /* arg1=int i_group arg2=const vlc_meta_t */
     /* Set epg for group (dynamic) (The vlc_epg_t is not modified nor released) */


=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -982,7 +982,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 ReadyQueuesPostSeek( p_demux );
                 es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                (int64_t)(TO_SCALE( vlc_tick_from_sec( i_length * f ))) );
+                                vlc_tick_from_sec( i_length * f ) );
                 return VLC_SUCCESS;
             }
         }


=====================================
src/input/es_out.c
=====================================
@@ -3514,7 +3514,7 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
 
     case ES_OUT_SET_NEXT_DISPLAY_TIME:
     {
-        const int64_t i_date = va_arg( args, int64_t );
+        const vlc_tick_t i_date = va_arg( args, vlc_tick_t );
 
         if( i_date < 0 )
             return VLC_EGENERIC;


=====================================
src/input/es_out_timeshift.c
=====================================
@@ -1553,8 +1553,8 @@ static int CmdInitControl( ts_cmd_control_t *p_cmd, input_source_t *in,
         break;
 
     case ES_OUT_SET_PCR:                /* arg1=vlc_tick_t i_pcr(microsecond!) (using default group 0)*/
-    case ES_OUT_SET_NEXT_DISPLAY_TIME:  /* arg1=int64_t i_pts(microsecond) */
-        p_cmd->u.i_i64 = va_arg( args, int64_t );
+    case ES_OUT_SET_NEXT_DISPLAY_TIME:  /* arg1=vlc_tick_t i_pts(microsecond) */
+        p_cmd->u.i_i64 = va_arg( args, vlc_tick_t );
         break;
 
     case ES_OUT_SET_GROUP_PCR:          /* arg1= int i_group, arg2=vlc_tick_t i_pcr(microsecond!)*/
@@ -1689,7 +1689,7 @@ static int CmdExecuteControl( es_out_t *p_tsout, ts_cmd_control_t *p_cmd )
         return es_out_in_Control( p_sys->p_out, in, i_query, p_cmd->u.i_int );
 
     case ES_OUT_SET_PCR:                /* arg1=vlc_tick_t i_pcr(microsecond!) (using default group 0)*/
-    case ES_OUT_SET_NEXT_DISPLAY_TIME:  /* arg1=int64_t i_pts(microsecond) */
+    case ES_OUT_SET_NEXT_DISPLAY_TIME:  /* arg1=vlc_tick_t i_pts(microsecond) */
         return es_out_in_Control( p_sys->p_out, in, i_query, p_cmd->u.i_i64 );
 
     case ES_OUT_SET_GROUP_PCR:          /* arg1= int i_group, arg2=vlc_tick_t i_pcr(microsecond!)*/



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e737ea471f5593402f2c978267314d0e33cc07e...b4809fa57719c09c491c75c15fcc9f174c5e3b70

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e737ea471f5593402f2c978267314d0e33cc07e...b4809fa57719c09c491c75c15fcc9f174c5e3b70
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list