[vlc-commits] [Git][videolan/vlc][master] 2 commits: es_out: remove ES_OUT_GET_PCR_SYSTEM/ES_OUT_MODIFY_PCR_SYSTEM

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 3 16:13:32 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
036003a4 by Thomas Guillem at 2023-11-03T15:35:02+00:00
es_out: remove ES_OUT_GET_PCR_SYSTEM/ES_OUT_MODIFY_PCR_SYSTEM

It was only used for the netsync module that is not (yet) implemented in
VLC 4.0. Nevertheless, the netsync module should use the vlc_clock_t API
and not these 2 controls.

- - - - -
fbb608d1 by Thomas Guillem at 2023-11-03T15:35:02+00:00
input_clock: remove input_clock_GetSystemOrigin()

It was only used from ES_OUT_GET_PCR_SYSTEM, that is now removed, cf.
previous commit.

- - - - -


6 changed files:

- include/vlc_es_out.h
- src/clock/input_clock.c
- src/clock/input_clock.h
- src/input/es_out.c
- src/input/es_out_timeshift.c
- test/src/input/demux-run.c


Changes:

=====================================
include/vlc_es_out.h
=====================================
@@ -98,10 +98,6 @@ enum es_out_query_e
     /* Set global meta data (The vlc_meta_t is not modified nor released) */
     ES_OUT_SET_META, /* arg1=const vlc_meta_t * */
 
-    /* PCR system clock manipulation for external clock synchronization */
-    ES_OUT_GET_PCR_SYSTEM, /* arg1=vlc_tick_t *, arg2=vlc_tick_t * res=can fail */
-    ES_OUT_MODIFY_PCR_SYSTEM, /* arg1=int is_absolute, arg2=vlc_tick_t, res=can fail */
-
     ES_OUT_POST_SUBNODE, /* arg1=input_item_node_t *, res=can fail */
 
     ES_OUT_VOUT_SET_MOUSE_EVENT, /* arg1= es_out_id_t* (video es),
@@ -268,20 +264,6 @@ VLC_USED static inline int es_out_SetMeta( es_out_t *out, const vlc_meta_t *meta
 }
 #define es_out_ControlSetMeta es_out_SetMeta
 
-/* Get the PCR system clock manipulation for external clock synchronization */
-VLC_USED static inline int es_out_GetPcrSystem( es_out_t *out, vlc_tick_t *pi_system, vlc_tick_t *pi_delay )
-{
-    return es_out_Control( out, ES_OUT_GET_PCR_SYSTEM, pi_system, pi_delay );
-}
-#define es_out_ControlGetPcrSystem es_out_GetPcrSystem
-
-/* Modify the PCR system clock manipulation for external clock synchronization */
-VLC_USED static inline int es_out_ModifyPcrSystem( es_out_t *out, bool b_absolute, vlc_tick_t i_system )
-{
-    return es_out_Control( out, ES_OUT_MODIFY_PCR_SYSTEM, b_absolute, i_system );
-}
-#define es_out_ControlModifyPcrSystem es_out_ModifyPcrSystem
-
 /**
  * @}
  */


=====================================
src/clock/input_clock.c
=====================================
@@ -412,15 +412,6 @@ void input_clock_ChangeSystemOrigin( input_clock_t *cl, bool b_absolute, vlc_tic
     UpdateListener( cl );
 }
 
-void input_clock_GetSystemOrigin( input_clock_t *cl, vlc_tick_t *pi_system, vlc_tick_t *pi_delay )
-{
-    assert( cl->b_has_reference );
-
-    *pi_system = cl->ref.system;
-    if( pi_delay )
-        *pi_delay  = cl->i_pts_delay;
-}
-
 #warning "input_clock_SetJitter needs more work"
 void input_clock_SetJitter( input_clock_t *cl,
                             vlc_tick_t i_pts_delay, int i_cr_average )


=====================================
src/clock/input_clock.h
=====================================
@@ -99,12 +99,6 @@ void    input_clock_ChangeRate( input_clock_t *, float rate );
  */
 void    input_clock_ChangePause( input_clock_t *, bool b_paused, vlc_tick_t i_date );
 
-/**
- * This function returns the original system value date and the delay for the current
- * reference point (a valid reference point must have been set).
- */
-void    input_clock_GetSystemOrigin( input_clock_t *, vlc_tick_t *pi_system, vlc_tick_t *pi_delay );
-
 /**
  * This function allows rebasing the original system value date (a valid
  * reference point must have been set).


=====================================
src/input/es_out.c
=====================================
@@ -3540,36 +3540,6 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
         return VLC_SUCCESS;
     }
 
-    case ES_OUT_GET_PCR_SYSTEM:
-    {
-        if( p_sys->b_buffering )
-            return VLC_EGENERIC;
-
-        es_out_pgrm_t *p_pgrm = p_sys->p_pgrm;
-        if( !p_pgrm )
-            return VLC_EGENERIC;
-
-        vlc_tick_t *pi_system = va_arg( args, vlc_tick_t *);
-        vlc_tick_t *pi_delay  = va_arg( args, vlc_tick_t *);
-        input_clock_GetSystemOrigin( p_pgrm->p_input_clock, pi_system, pi_delay );
-        return VLC_SUCCESS;
-    }
-
-    case ES_OUT_MODIFY_PCR_SYSTEM:
-    {
-        if( p_sys->b_buffering )
-            return VLC_EGENERIC;
-
-        es_out_pgrm_t *p_pgrm = p_sys->p_pgrm;
-        if( !p_pgrm )
-            return VLC_EGENERIC;
-
-        const bool    b_absolute = va_arg( args, int );
-        const vlc_tick_t i_system   = va_arg( args, vlc_tick_t );
-        input_clock_ChangeSystemOrigin( p_pgrm->p_input_clock, b_absolute, i_system );
-        return VLC_SUCCESS;
-    }
-
     case ES_OUT_POST_SUBNODE:
     {
         input_thread_t *input = p_sys->p_input;


=====================================
src/input/es_out_timeshift.c
=====================================
@@ -695,25 +695,9 @@ static int ControlLocked( es_out_t *p_out, input_source_t *in, int i_query,
         return ControlLockedGetEmpty( p_out, in, pb_empty );
     }
 
-    case ES_OUT_GET_PCR_SYSTEM:
-        if( p_sys->b_delayed )
-            return VLC_EGENERIC;
-        /* fall through */
     case ES_OUT_POST_SUBNODE:
         return es_out_in_vaControl( p_sys->p_out, in, i_query, args );
 
-    case ES_OUT_MODIFY_PCR_SYSTEM:
-    {
-        const bool    b_absolute = va_arg( args, int );
-        const vlc_tick_t i_system   = va_arg( args, vlc_tick_t );
-
-        if( b_absolute && p_sys->b_delayed )
-            return VLC_EGENERIC;
-
-        return es_out_in_Control( p_sys->p_out, in, i_query, b_absolute,
-                                  i_system );
-    }
-
     default:
         vlc_assert_unreachable();
         return VLC_EGENERIC;


=====================================
test/src/input/demux-run.c
=====================================
@@ -191,9 +191,6 @@ static int EsOutControl(es_out_t *out, input_source_t* in, int query, va_list ar
             break;
         case ES_OUT_SET_META:
             break;
-        case ES_OUT_GET_PCR_SYSTEM:
-        case ES_OUT_MODIFY_PCR_SYSTEM:
-            abort();
         default:
             return VLC_EGENERIC;
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e26bb6f497891fd353b3a11b4c758f5f7fecf618...fbb608d18c727db4a05c03abf03cd2bef7d7ae60

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e26bb6f497891fd353b3a11b4c758f5f7fecf618...fbb608d18c727db4a05c03abf03cd2bef7d7ae60
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