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

Francois Cartegnie fcvlcdev at free.fr
Tue Sep 26 23:24:25 CEST 2017


---
 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 54eec0f..41ff1a0 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -175,6 +175,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( p_dec, caps[p_dec->fmt_in.i_cat],
                                        "$codec", false );
@@ -1272,6 +1273,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 );
@@ -1747,6 +1750,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 b19c500..20fa25a 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -138,7 +138,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;
@@ -231,6 +231,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;
 }
@@ -316,6 +318,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.9.5



More information about the vlc-devel mailing list