[vlc-devel] [PATCH 1/3] input: enable decoders for data_es

Francois Cartegnie fcvlcdev at free.fr
Tue Mar 6 11:39:10 CET 2018


---
 src/input/decoder.c | 7 +++++++
 src/input/es_out.c  | 6 +++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 98817e6f39..b70429e5e4 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -174,6 +174,7 @@ static int LoadDecoder( decoder_t *p_dec, bool b_packetizer,
             [VIDEO_ES] = "video decoder",
             [AUDIO_ES] = "audio decoder",
             [SPU_ES] = "spu decoder",
+            [DATA_ES] = "data decoder",
         };
         p_dec->p_module = module_need_var( p_dec, caps[p_dec->fmt_in.i_cat],
                                            "codec" );
@@ -1293,6 +1294,8 @@ static void DecoderUpdateStatSpu( decoder_owner_sys_t *p_owner,
     (void) p_owner; (void) decoded; (void) lost;
 }
 
+#define DecoderUpdateStatData DecoderUpdateStatSpu
+
 static int DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )
 {
     assert( p_spu );
@@ -1762,6 +1765,10 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
             p_dec->pf_queue_sub = DecoderQueueSpu;
             p_owner->pf_update_stat = DecoderUpdateStatSpu;
             break;
+        case DATA_ES:
+            p_dec->pf_queue_cc = DecoderQueueCc;
+            p_owner->pf_update_stat = DecoderUpdateStatData;
+            break;
         default:
             msg_Err( p_dec, "unknown ES format" );
             UnloadDecoder( p_dec );
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 9ec3e7059b..f4f5402093 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -142,7 +142,7 @@ struct es_out_sys_t
     bool  b_active;
     int         i_mode;
 
-    es_out_es_props_t video, audio, sub;
+    es_out_es_props_t video, audio, sub, data;
 
     /* es/group to select */
     int         i_group_id;
@@ -237,6 +237,8 @@ static es_out_es_props_t * GetPropsByCat( es_out_sys_t *p_sys, int i_cat )
         return &p_sys->sub;
     case VIDEO_ES:
         return &p_sys->video;
+    case DATA_ES:
+        return &p_sys->data;
     }
     return NULL;
 }
@@ -322,6 +324,8 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
                     "audio-track-id", "audio-track", "audio-language", "audio" );
     EsOutPropsInit( &p_sys->sub,  false, p_input, ES_OUT_ES_POLICY_EXCLUSIVE,
                     "sub-track-id", "sub-track", "sub-language", "sub" );
+    EsOutPropsInit( &p_sys->data,  true, p_input, ES_OUT_ES_POLICY_SIMULTANEOUS,
+                    NULL, NULL, NULL, NULL );
 
     p_sys->i_group_id = var_GetInteger( p_input, "program" );
 
-- 
2.14.3



More information about the vlc-devel mailing list