[vlc-devel] [PATCH 5/6] demux: mock: add teletext codec parameters
Francois Cartegnie
fcvlcdev at free.fr
Mon Jun 15 22:03:23 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 70b3fc1432..7ed4371121 100644
--- a/modules/demux/mock.c
+++ b/modules/demux/mock.c
@@ -132,7 +132,8 @@ var_Read_unsigned(const char *psz)
#define OPTIONS_SUB(Y) \
Y(sub, packetized, bool, add_bool, Bool, true)\
Y(sub, add_track_at, vlc_tick_t, add_integer, Integer, VLC_TICK_INVALID) \
- Y(sub, format, vlc_fourcc_t, add_string, Fourcc, "subt")
+ Y(sub, format, vlc_fourcc_t, add_string, Fourcc, "subt") \
+ Y(sub, page, unsigned, add_integer, Integer, 0)
/* var_name, type, module_header_type, getter, default_value */
#define OPTIONS_GLOBAL(X) \
@@ -680,6 +681,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