[vlc-commits] demux: mock: add teletext codec parameters

Francois Cartegnie git at videolan.org
Wed Jun 17 09:19:38 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun  4 15:38:07 2020 +0200| [e62eefa05553d84fc4f810b8dad10cf67235f4d8] | committer: Francois Cartegnie

demux: mock: add teletext codec parameters

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e62eefa05553d84fc4f810b8dad10cf67235f4d8
---

 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;
 



More information about the vlc-commits mailing list