[vlc-devel] [PATCH 6/7] demux: mock: add teletext codec parameters
Francois Cartegnie
fcvlcdev at free.fr
Tue Jun 9 10:38:51 CEST 2020
---
modules/demux/mock.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mock.c b/modules/demux/mock.c
index 1799a221f8..44507643d7 100644
--- a/modules/demux/mock.c
+++ b/modules/demux/mock.c
@@ -132,7 +132,8 @@ var_Read_unsigned(const char *psz)
#define LIST_OPTIONS_SUB \
Y(sub, packetized, bool, add_bool, var_InheritBool, true)\
Y(sub, add_track_at, vlc_tick_t, add_integer, var_InheritInteger, VLC_TICK_INVALID) \
- Y(sub, format, vlc_fourcc_t, add_string, var_InheritFourcc, "subt")
+ Y(sub, format, vlc_fourcc_t, add_string, var_InheritFourcc, "subt") \
+ Y(sub, page, unsigned, add_integer, var_InheritInteger, 0)
/* var_name, type, module_header_type, getter, default_value */
#define LIST_OPTIONS_GLOBAL \
@@ -666,6 +667,9 @@ ConfigureSubTrack(demux_t *demux,
VLC_UNUSED(demux);
fmt->i_codec = options->format;
+ fmt->subs.teletext.i_magazine = options->page / 100 % 10;
+ fmt->subs.teletext.i_page = (((options->page / 10) % 10) << 4) +
+ (options->page % 10);
fmt->b_packetized = options->packetized;
--
2.25.4
More information about the vlc-devel
mailing list