Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
21f9f381 by Loïc at 2023-03-16T14:20:37+00:00
stream: move get_seekpoint typed control to specific stream section

This is done because the type is different from stream and demux.

- - - - -
6baee5a4 by Loïc at 2023-03-16T14:20:37+00:00
stream: move get_title typed control to stream specific section

- - - - -
2a4957c0 by Loïc at 2023-03-16T14:20:37+00:00
demux: introduce typed operations for demux

This commit introduce a typed virtual table for operations on demux,
aiming at replacing the legacy pf_control() callback which is using
va_list. As a counterpart to the typed virtual table, typed methods
are also introduce.

The operations can be implemented by the modules directly right now
and will be used when possible. This is done to provide type safety
at every level.

When no operation is provided (ie, demux_t.ops is NULL) by a module
implementation, the legacy pf_control will be used instead as a
fallback.

The commit doesn't migrate any of modules yet.

- - - - -
bdc6edb1 by Loïc at 2023-03-16T14:20:37+00:00
demux: add more helper methods

This commit adds more helper methods for demux_t.

- - - - -


4 changed files:

- include/vlc_demux.h
- include/vlc_stream.h
- src/input/demux.c
- src/input/stream.c


Changes:

=====================================
include/vlc_demux.h
=====================================
@@ -312,6 +312,183 @@ static inline int demux_Control( demux_t *p_demux, int 
i_query, ... )
  * Miscellaneous helpers for demuxers
  *************************************************************************/
 
+VLC_USED static inline bool vlc_demux_CanSeek(demux_t *demux)
+{
+    bool can_seek = false;
+    demux_Control(demux, DEMUX_CAN_SEEK, &can_seek);
+    return can_seek;
+}
+
+VLC_USED static inline bool vlc_demux_CanPause(demux_t *demux)
+{
+    bool can_pause = false;
+    demux_Control(demux, DEMUX_CAN_PAUSE, &can_pause);
+    return can_pause;
+}
+
+VLC_USED static inline bool vlc_demux_CanPace(demux_t *demux)
+{
+    bool can_control_pace = false;
+    demux_Control(demux, DEMUX_CAN_CONTROL_PACE, &can_control_pace);
+    return can_control_pace;
+}
+
+VLC_USED static inline bool vlc_demux_CanRate(demux_t *demux)
+{
+    bool can_control_rate = false;
+    demux_Control(demux, DEMUX_CAN_CONTROL_RATE, &can_control_rate);
+    return can_control_rate;
+}
+
+VLC_USED static inline bool vlc_demux_CanRecord(demux_t *demux)
+{
+    bool can_record = false;
+    demux_Control(demux, DEMUX_CAN_RECORD, &can_record);
+    return can_record;
+}
+
+VLC_USED static inline bool vlc_demux_HasUnsupportedMeta(demux_t *demux)
+{
+    bool has_unsupported_meta = false;
+    demux_Control(demux, DEMUX_HAS_UNSUPPORTED_META, &has_unsupported_meta);
+    return has_unsupported_meta;
+}
+
+VLC_USED static inline int vlc_demux_GetPtsDelay(demux_t *demux, vlc_tick_t 
*pts_delay)
+{
+    return demux_Control(demux, DEMUX_GET_PTS_DELAY, pts_delay);
+}
+
+VLC_USED static inline int vlc_demux_GetSeekpoint(demux_t *demux, int 
*seekpoint)
+{
+    return demux_Control(demux, DEMUX_GET_SEEKPOINT, seekpoint);
+}
+
+VLC_USED static inline int vlc_demux_GetSignal(demux_t *demux, double 
*quality, double *strength)
+{
+    return demux_Control(demux, DEMUX_GET_SIGNAL, quality, strength);
+}
+
+VLC_USED static inline int vlc_demux_GetTitle(demux_t *demux, int *title)
+{
+    return demux_Control(demux, DEMUX_GET_TITLE, title);
+}
+
+VLC_USED static inline int vlc_demux_GetMeta(demux_t *demux, vlc_meta_t *meta)
+{
+    return demux_Control(demux, DEMUX_GET_META, meta);
+}
+
+VLC_USED static inline int vlc_demux_GetType(demux_t *demux, int *type)
+{
+    return demux_Control(demux, DEMUX_GET_TYPE, type);
+}
+
+VLC_USED static inline int vlc_demux_GetTitleInfo(demux_t *demux, 
input_title_t ***title_info, int *size, int *pi_title_offset, int 
*pi_seekpoint_offset)
+{
+    return demux_Control(demux, DEMUX_GET_TITLE_INFO, title_info, size, 
pi_title_offset, pi_seekpoint_offset);
+}
+
+VLC_USED static inline int vlc_demux_GetPosition(demux_t *demux, double 
*position)
+{
+    return demux_Control(demux, DEMUX_GET_POSITION, position);
+}
+
+VLC_USED static inline int vlc_demux_GetLength(demux_t *demux, vlc_tick_t 
*length)
+{
+    return demux_Control(demux, DEMUX_GET_LENGTH, length);
+}
+
+VLC_USED static inline int vlc_demux_GetTime(demux_t *demux, vlc_tick_t *time)
+{
+    return demux_Control(demux, DEMUX_GET_TIME, time);
+}
+
+VLC_USED static inline int vlc_demux_GetNormalTime(demux_t *demux, vlc_tick_t 
*normal_time)
+{
+    return demux_Control(demux, DEMUX_GET_NORMAL_TIME, normal_time);
+}
+
+VLC_USED static inline int vlc_demux_GetFPS(demux_t *demux, double *fps)
+{
+    return demux_Control(demux, DEMUX_GET_FPS, fps);
+}
+
+VLC_USED static inline int vlc_demux_GetAttachments(demux_t *demux, 
input_attachment_t ***attachments)
+{
+    return demux_Control(demux, DEMUX_GET_ATTACHMENTS, attachments);
+}
+
+VLC_USED static inline int vlc_demux_SetPauseState(demux_t *demux, bool 
pause_state)
+{
+    return demux_Control(demux, DEMUX_SET_PAUSE_STATE, pause_state);
+}
+
+VLC_USED static inline int vlc_demux_SetSeekPoint(demux_t *demux, int 
seekpoint)
+{
+    return demux_Control(demux, DEMUX_SET_SEEKPOINT, seekpoint);
+}
+
+VLC_USED static inline int vlc_demux_SetTitle(demux_t *demux, int title)
+{
+    return demux_Control(demux, DEMUX_SET_TITLE, title);
+}
+
+VLC_USED static inline int vlc_demux_SetRate(demux_t *demux, float rate)
+{
+    return demux_Control(demux, DEMUX_SET_RATE, rate);
+}
+
+VLC_USED static inline int vlc_demux_SetRecordState(demux_t *demux, bool 
record_state, const char *dir_path, const char *ext)
+{
+    return demux_Control(demux, DEMUX_SET_RECORD_STATE, record_state, 
dir_path, ext);
+}
+
+VLC_USED static inline int vlc_demux_NavActivate(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_ACTIVATE);
+}
+
+VLC_USED static inline int vlc_demux_NavUp(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_UP);
+}
+
+VLC_USED static inline int vlc_demux_NavDown(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_DOWN);
+}
+
+VLC_USED static inline int vlc_demux_NavLeft(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_LEFT);
+}
+
+VLC_USED static inline int vlc_demux_NavRight(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_RIGHT);
+}
+
+VLC_USED static inline int vlc_demux_NavPopup(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_POPUP);
+}
+
+VLC_USED static inline int vlc_demux_NavMenu(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_NAV_MENU);
+}
+
+VLC_USED static inline int vlc_demux_FilterEnable(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_FILTER_ENABLE);
+}
+
+VLC_USED static inline int vlc_demux_FilterDisable(demux_t *demux)
+{
+    return demux_Control(demux, DEMUX_FILTER_DISABLE);
+}
+
 #ifndef __cplusplus
 static inline void demux_UpdateTitleFromStream( demux_t *demux,
     int *restrict titlep, int *restrict seekpointp,
@@ -373,7 +550,7 @@ static inline int demux_SetPosition( demux_t *p_demux, 
double pos, bool precise,
     if( !absolute )
     {
         double current_pos;
-        int ret = demux_Control( p_demux, DEMUX_GET_POSITION, &current_pos );
+        int ret = vlc_demux_GetPosition( p_demux, &current_pos );
         if( ret != VLC_SUCCESS )
             return ret;
         pos += current_pos;
@@ -392,7 +569,7 @@ static inline int demux_SetTime( demux_t *p_demux, 
vlc_tick_t time, bool precise
     if( !absolute )
     {
         vlc_tick_t current_time;
-        int ret = demux_Control( p_demux, DEMUX_GET_TIME, &current_time );
+        int ret = vlc_demux_GetTime( p_demux, &current_time );
         if( ret != VLC_SUCCESS )
             return ret;
         time += current_time;


=====================================
include/vlc_stream.h
=====================================
@@ -47,9 +47,7 @@ struct vlc_stream_operations {
     bool (*can_control_pace)(stream_t *);
 
     int (*get_pts_delay)(stream_t *, vlc_tick_t *);
-    int (*get_seekpoint)(stream_t *, unsigned *);
     int (*get_signal)(stream_t *, double *, double *);
-    int (*get_title)(stream_t *, unsigned *);
     int (*get_meta)(stream_t *, vlc_meta_t *);
     int (*get_type)(stream_t *, int *);
 
@@ -63,6 +61,8 @@ struct vlc_stream_operations {
         struct {
             bool (*can_fastseek)(stream_t *);
 
+            int (*get_title)(stream_t *, unsigned *);
+            int (*get_seekpoint)(stream_t *, unsigned *);
             int (*get_size)(stream_t *, uint64_t *);
             int (*get_title_info)(stream_t *, input_title_t ***, int *);
             int (*get_content_type)(stream_t *, char **);
@@ -74,7 +74,44 @@ struct vlc_stream_operations {
             int (*set_private_id_ca)(stream_t *, void *);
         } stream;
         struct {
-            /* TODO: Add the demux callbacks */
+            bool (*can_record)(demux_t *);
+            bool (*can_control_rate)(demux_t *);
+
+            bool (*has_unsupported_meta)(demux_t *);
+
+            int (*get_title)(demux_t *, int *);
+            int (*get_seekpoint)(demux_t *, int *);
+            double (*get_position)(demux_t *);
+            vlc_tick_t (*get_length)(demux_t *);
+            vlc_tick_t (*get_time)(demux_t *);
+            int (*get_normal_time)(demux_t *, vlc_tick_t *);
+            int (*get_title_info)(demux_t *, input_title_t ***, int *, int *, 
int *);
+            int (*get_fps)(demux_t *, double *);
+            int (*get_attachments)(demux_t *, input_attachment_t ***);
+
+            int (*set_position)(demux_t *, double, bool);
+            int (*set_time)(demux_t *, vlc_tick_t, bool);
+            int (*set_next_demux_time)(demux_t *, vlc_tick_t);
+            int (*set_record_state)(demux_t *, bool, const char *);
+            int (*set_rate)(demux_t *, float *);
+            int (*set_group_default)(demux_t *);
+            int (*set_group_all)(demux_t *);
+            int (*set_group_list)(demux_t *, size_t, const int *);
+            int (*set_es)(demux_t *, int);
+            int (*set_es_list)(demux_t *, size_t, const int *);
+           
+            int (*nav_activate)(demux_t *);
+            int (*nav_up)(demux_t *);
+            int (*nav_down)(demux_t *);
+            int (*nav_left)(demux_t *);
+            int (*nav_right)(demux_t *);
+            int (*nav_popup)(demux_t *);
+            int (*nav_menu)(demux_t *);
+
+            int (*filter_enable)(demux_t *);
+            int (*filter_disable)(demux_t *);
+
+            int (*test_and_clear_flags)(demux_t *, unsigned *);
         } demux;
     };
 };


=====================================
src/input/demux.c
=====================================
@@ -160,6 +160,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, 
input_thread_t *p_input,
     p_demux->pf_demux   = NULL;
     p_demux->pf_control = NULL;
     p_demux->p_sys      = NULL;
+    p_demux->ops        = NULL;
 
     char *modbuf = NULL;
     bool strict = true;
@@ -235,7 +236,294 @@ int demux_Demux(demux_t *demux)
 
 int demux_vaControl( demux_t *demux, int query, va_list args )
 {
-    return demux->pf_control( demux, query, args );
+    if (demux->ops == NULL)
+        return demux->pf_control( demux, query, args );
+
+    switch (query) {
+        case DEMUX_CAN_SEEK:
+        {
+            bool *can_seek = va_arg(args, bool *);
+            if (demux->ops->can_seek != NULL) {
+                *can_seek = demux->ops->can_seek(demux);
+            } else {
+                *can_seek = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_CAN_PAUSE:
+        {
+            bool *can_pause = va_arg(args, bool *);
+            if (demux->ops->can_pause != NULL) {
+                *can_pause = demux->ops->can_pause(demux);
+            } else {
+                *can_pause = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_CAN_RECORD:
+        {
+            bool *can_record = va_arg(args, bool *);
+            if (demux->ops->demux.can_record != NULL) {
+                *can_record = demux->ops->demux.can_record(demux);
+            } else {
+                *can_record = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_CAN_CONTROL_PACE:
+        {
+            bool *can_control_pace = va_arg(args, bool *);
+            if (demux->ops->can_control_pace != NULL) {
+                *can_control_pace = demux->ops->can_control_pace(demux);
+            } else {
+                *can_control_pace = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_CAN_CONTROL_RATE:
+        {
+            bool *can_control_rate = va_arg(args, bool *);
+            if (demux->ops->demux.can_control_rate != NULL) {
+                *can_control_rate = demux->ops->demux.can_control_rate(demux);
+            } else {
+                *can_control_rate = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_HAS_UNSUPPORTED_META:
+        {
+            bool *has_unsupported_meta = va_arg(args, bool *);
+            if (demux->ops->demux.has_unsupported_meta != NULL) {
+                *has_unsupported_meta = 
demux->ops->demux.has_unsupported_meta(demux);
+            } else {
+                *has_unsupported_meta = false;
+            }
+            return VLC_SUCCESS;
+        }
+        case DEMUX_GET_PTS_DELAY:
+            if (demux->ops->get_pts_delay != NULL) {
+                vlc_tick_t *pts_delay = va_arg(args, vlc_tick_t *);
+                return demux->ops->get_pts_delay(demux, pts_delay);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_TITLE_INFO:
+            if (demux->ops->demux.get_title_info != NULL) {
+                input_title_t ***title_info = va_arg(args, input_title_t ***);
+                int *size = va_arg(args, int *);
+                int *pi_title_offset = va_arg(args, int *);
+                int *pi_seekpoint_offset = va_arg(args, int *);
+                return demux->ops->demux.get_title_info(demux, title_info, 
size, pi_title_offset, pi_seekpoint_offset);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_TITLE:
+            if (demux->ops->demux.get_title != NULL) {
+                int *title = va_arg(args, int *);
+                return demux->ops->demux.get_title(demux, title);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_SEEKPOINT:
+            if (demux->ops->demux.get_seekpoint != NULL) {
+                int *seekpoint = va_arg(args, int *);
+                return demux->ops->demux.get_seekpoint(demux, seekpoint);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_META:
+            if (demux->ops->get_meta != NULL) {
+                vlc_meta_t *meta = va_arg(args, vlc_meta_t *);
+                return demux->ops->get_meta(demux, meta);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_SIGNAL:
+            if (demux->ops->get_signal != NULL) {
+                double *quality = va_arg(args, double *);
+                double *strength = va_arg(args, double *);
+                return demux->ops->get_signal(demux, quality, strength);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_TYPE:
+            if (demux->ops->get_type != NULL) {
+                int *type = va_arg(args, int *);
+                return demux->ops->get_type(demux, type);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_POSITION:
+            if (demux->ops->demux.get_position != NULL) {
+                *va_arg(args, double *) = 
demux->ops->demux.get_position(demux);
+                return VLC_SUCCESS;
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_LENGTH:
+            if (demux->ops->demux.get_length != NULL) {
+                *va_arg(args, vlc_tick_t *) = 
demux->ops->demux.get_length(demux);
+                return VLC_SUCCESS;
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_TIME:
+            if (demux->ops->demux.get_time != NULL) {
+                *va_arg(args, vlc_tick_t *) = 
demux->ops->demux.get_time(demux);
+                return VLC_SUCCESS;
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_NORMAL_TIME:
+            if (demux->ops->demux.get_normal_time != NULL) {
+                vlc_tick_t *normal_time = va_arg(args, vlc_tick_t *);
+                return demux->ops->demux.get_normal_time(demux, normal_time);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_FPS:
+            if (demux->ops->demux.get_fps != NULL) {
+                double *fps = va_arg(args, double *);
+                return demux->ops->demux.get_fps(demux, fps);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_GET_ATTACHMENTS:
+            if (demux->ops->demux.get_attachments != NULL) {
+                input_attachment_t ***attachments = va_arg(args, 
input_attachment_t ***);
+                return demux->ops->demux.get_attachments(demux, attachments);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_SEEKPOINT:
+            if (demux->ops->set_seek_point != NULL) {
+                int seekpoint = va_arg(args, int);
+                return demux->ops->set_seek_point(demux, seekpoint);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_TITLE:
+            if (demux->ops->set_title != NULL) {
+                int title = va_arg(args, int);
+                return demux->ops->set_title(demux, title);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_PAUSE_STATE:
+            if (demux->ops->set_pause_state != NULL) {
+                bool pause_state = (bool)va_arg(args, int);
+                return demux->ops->set_pause_state(demux, pause_state);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_RECORD_STATE:
+            if (demux->ops->demux.set_record_state != NULL) {
+                bool record_state = (bool)va_arg(args, int);
+                const char *dir_path = NULL;
+                if (record_state) {
+                    dir_path = va_arg(args, const char *);
+                }
+                return demux->ops->demux.set_record_state(demux, record_state, 
dir_path);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_POSITION:
+        {
+            if (demux->ops->demux.set_position != NULL) {
+                double position = va_arg(args, double);
+                bool precise = (bool)va_arg(args, int);
+                return demux->ops->demux.set_position(demux, position, 
precise);
+            }
+            return VLC_EGENERIC;
+        }
+        case DEMUX_SET_TIME:
+        {
+            if (demux->ops->demux.set_time != NULL) {
+                vlc_tick_t time = va_arg(args, vlc_tick_t);
+                bool precise = (bool)va_arg(args, int);
+                return demux->ops->demux.set_time(demux, time, precise);
+            }
+            return VLC_EGENERIC;
+        }
+        case DEMUX_SET_NEXT_DEMUX_TIME:
+            if (demux->ops->demux.set_next_demux_time != NULL) {
+                vlc_tick_t next_demux_time = va_arg(args, vlc_tick_t);
+                return demux->ops->demux.set_next_demux_time(demux, 
next_demux_time);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_RATE:
+            if (demux->ops->demux.set_next_demux_time != NULL) {
+                float *rate = va_arg(args, float *);
+                return demux->ops->demux.set_rate(demux, rate);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_GROUP_DEFAULT:
+            if (demux->ops->demux.set_group_default != NULL) {
+                return demux->ops->demux.set_group_default(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_GROUP_ALL:
+            if (demux->ops->demux.set_group_all != NULL) {
+                return demux->ops->demux.set_group_all(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_GROUP_LIST:
+            if (demux->ops->demux.set_group_list != NULL) {
+                size_t size = va_arg(args, size_t);
+                const int *idx = va_arg(args, const int *);
+                return demux->ops->demux.set_group_list(demux, size, idx);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_ES:
+            if (demux->ops->demux.set_es != NULL) {
+                int es = va_arg(args, int);
+                return demux->ops->demux.set_es(demux, es);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_SET_ES_LIST:
+            if (demux->ops->demux.set_es_list != NULL) {
+                size_t size = va_arg(args, size_t);
+                const int *idx = va_arg(args, const int *);
+                return demux->ops->demux.set_es_list(demux, size, idx);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_ACTIVATE:
+            if (demux->ops->demux.nav_activate != NULL) {
+                return demux->ops->demux.nav_activate(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_UP:
+            if (demux->ops->demux.nav_up != NULL) {
+                return demux->ops->demux.nav_up(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_DOWN:
+            if (demux->ops->demux.nav_down != NULL) {
+                return demux->ops->demux.nav_down(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_LEFT:
+            if (demux->ops->demux.nav_left != NULL) {
+                return demux->ops->demux.nav_left(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_RIGHT:
+            if (demux->ops->demux.nav_right != NULL) {
+                return demux->ops->demux.nav_right(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_POPUP:
+            if (demux->ops->demux.nav_popup != NULL) {
+                return demux->ops->demux.nav_popup(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_NAV_MENU:
+            if (demux->ops->demux.nav_menu != NULL) {
+                return demux->ops->demux.nav_menu(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_FILTER_ENABLE:
+            if (demux->ops->demux.filter_enable != NULL) {
+                return demux->ops->demux.filter_enable(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_FILTER_DISABLE:
+            if (demux->ops->demux.filter_disable != NULL) {
+                return demux->ops->demux.filter_disable(demux);
+            }
+            return VLC_EGENERIC;
+        case DEMUX_TEST_AND_CLEAR_FLAGS:
+            if (demux->ops->demux.test_and_clear_flags != NULL) {
+                unsigned *flags = va_arg(args, unsigned *);
+                return demux->ops->demux.test_and_clear_flags(demux, flags);
+            }
+            return VLC_EGENERIC;
+        default:
+            vlc_assert_unreachable();
+    }
 }
 
 /*****************************************************************************


=====================================
src/input/stream.c
=====================================
@@ -803,15 +803,15 @@ int vlc_stream_vaControl(stream_t *s, int cmd, va_list 
args)
             }
             return VLC_EGENERIC;
         case STREAM_GET_TITLE:
-            if (s->ops->get_title != NULL) {
+            if (s->ops->stream.get_title != NULL) {
                 unsigned *title = va_arg(args, unsigned *);
-                return s->ops->get_title(s, title);
+                return s->ops->stream.get_title(s, title);
             }
             return VLC_EGENERIC;
         case STREAM_GET_SEEKPOINT:
-            if (s->ops->get_seekpoint != NULL) {
+            if (s->ops->stream.get_seekpoint != NULL) {
                 unsigned *seekpoint = va_arg(args, unsigned *);
-                return s->ops->get_seekpoint(s, seekpoint);
+                return s->ops->stream.get_seekpoint(s, seekpoint);
             }
             return VLC_EGENERIC;
         case STREAM_GET_META:



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/5f60396843627874ef7470447d19c5411f067834...bdc6edb1e087f3597136b2ba197d731ed80a4016

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to