[vlc-commits] decoder: use "spu decoder" capability for SPU decoders

Rémi Denis-Courmont git at videolan.org
Mon Jun 19 19:59:32 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 19 20:50:34 2017 +0300| [3b4420ccf93d2a37c6c9eb8f9d9e259d88db184f] | committer: Rémi Denis-Courmont

decoder: use "spu decoder" capability for SPU decoders

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

 modules/codec/arib/aribsub.c       | 2 +-
 modules/codec/avcodec/avcodec.c    | 2 +-
 modules/codec/avcodec/subtitle.c   | 3 ---
 modules/codec/cc.c                 | 2 +-
 modules/codec/cvdsub.c             | 2 +-
 modules/codec/ddummy.c             | 4 ++--
 modules/codec/dvbsub.c             | 2 +-
 modules/codec/kate.c               | 2 +-
 modules/codec/libass.c             | 2 +-
 modules/codec/scte18.c             | 2 +-
 modules/codec/scte27.c             | 2 +-
 modules/codec/spudec/spudec.c      | 2 +-
 modules/codec/stl.c                | 2 +-
 modules/codec/subsdec.c            | 2 +-
 modules/codec/substx3g.c           | 2 +-
 modules/codec/subsusf.c            | 2 +-
 modules/codec/svcdsub.c            | 2 +-
 modules/codec/telx.c               | 2 +-
 modules/codec/textst.c             | 2 +-
 modules/codec/ttml/ttml.c          | 2 +-
 modules/codec/zvbi.c               | 2 +-
 modules/misc/stats.c               | 2 +-
 modules/stream_out/transcode/spu.c | 2 +-
 src/input/decoder.c                | 2 +-
 24 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/modules/codec/arib/aribsub.c b/modules/codec/arib/aribsub.c
index 32042b30aa..ad55c2e15f 100644
--- a/modules/codec/arib/aribsub.c
+++ b/modules/codec/arib/aribsub.c
@@ -52,7 +52,7 @@ vlc_module_begin ()
 #   define ARIBSUB_CFG_PREFIX "aribsub-"
     set_description( N_("ARIB subtitles decoder") )
     set_shortname( N_("ARIB subtitles") )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, Close )
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 104f7c44bb..f286a3adaf 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -88,7 +88,7 @@ vlc_module_begin ()
 
     add_submodule()
     add_shortcut("ffmpeg")
-    set_capability("decoder", 70)
+    set_capability("spu decoder", 70)
     set_callbacks(InitSubtitleDec, EndSubtitleDec)
 
     add_obsolete_bool( "ffmpeg-dr" ) /* removed since 2.1.0 */
diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
index c29bbc4fbd..3495caea0b 100644
--- a/modules/codec/avcodec/subtitle.c
+++ b/modules/codec/avcodec/subtitle.c
@@ -55,9 +55,6 @@ static void Flush(decoder_t *);
 int InitSubtitleDec(vlc_object_t *obj)
 {
     decoder_t *dec = (decoder_t *)obj;
-    if (dec->fmt_in.i_cat != SPU_ES)
-        return VLC_EGENERIC;
-
     const AVCodec *codec;
     AVCodecContext *context = ffmpeg_AllocContext(dec, &codec);
     if (context == NULL)
diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index ce8600c5f8..030771ff07 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -58,7 +58,7 @@ static void Close( vlc_object_t * );
 vlc_module_begin ()
     set_shortname( N_("CC 608/708"))
     set_description( N_("Closed Captions decoder") )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_category( CAT_INPUT )
         set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, Close )
diff --git a/modules/codec/cvdsub.c b/modules/codec/cvdsub.c
index 29fdae2507..313b103458 100644
--- a/modules/codec/cvdsub.c
+++ b/modules/codec/cvdsub.c
@@ -48,7 +48,7 @@ static void DecoderClose  ( vlc_object_t * );
 
 vlc_module_begin ()
     set_description( N_("CVD subtitle decoder") )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_callbacks( DecoderOpen, DecoderClose )
 
     add_submodule ()
diff --git a/modules/codec/ddummy.c b/modules/codec/ddummy.c
index 193660a413..266e636b49 100644
--- a/modules/codec/ddummy.c
+++ b/modules/codec/ddummy.c
@@ -45,7 +45,7 @@ static void CloseDecoder( vlc_object_t * );
 vlc_module_begin ()
     set_shortname( N_("Dummy") )
     set_description( N_("Dummy decoder") )
-    set_capability( "decoder", 0 )
+    set_capability( "spu decoder", 0 )
     set_callbacks( OpenDecoder, CloseDecoder )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
@@ -63,7 +63,7 @@ vlc_module_begin ()
     add_submodule ()
     set_section( N_( "Dump decoder" ), NULL )
     set_description( N_("Dump decoder") )
-    set_capability( "decoder", -1 )
+    set_capability( "spu decoder", -1 )
     set_callbacks( OpenDecoderDump, CloseDecoder )
     add_shortcut( "dump" )
     add_submodule()
diff --git a/modules/codec/dvbsub.c b/modules/codec/dvbsub.c
index 00a31edb04..495e5f9ac4 100644
--- a/modules/codec/dvbsub.c
+++ b/modules/codec/dvbsub.c
@@ -120,7 +120,7 @@ vlc_module_begin ()
 #   define DVBSUB_CFG_PREFIX "dvbsub-"
     set_description( N_("DVB subtitles decoder") )
     set_shortname( N_("DVB subtitles") )
-    set_capability( "decoder", 80 )
+    set_capability( "spu decoder", 80 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, Close )
diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 10ea65fc74..6717a6dc8c 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -268,7 +268,7 @@ vlc_module_begin ()
     set_shortname( N_("Kate"))
     set_description( N_("Kate overlay decoder") )
     set_help( HELP_TEXT )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_callbacks( OpenDecoder, CloseDecoder )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 7d7f265f58..de53a618ef 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -55,7 +55,7 @@ static void Destroy( vlc_object_t * );
 vlc_module_begin ()
     set_shortname( N_("Subtitles (advanced)"))
     set_description( N_("Subtitle renderers using libass") )
-    set_capability( "decoder", 100 )
+    set_capability( "spu decoder", 100 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Create, Destroy )
diff --git a/modules/codec/scte18.c b/modules/codec/scte18.c
index 6900e92fb4..cce6ba9495 100644
--- a/modules/codec/scte18.c
+++ b/modules/codec/scte18.c
@@ -40,7 +40,7 @@ static void Close(vlc_object_t *);
 vlc_module_begin ()
     set_description(N_("SCTE-18 decoder"))
     set_shortname(N_("SCTE-18"))
-    set_capability( "decoder", 51)
+    set_capability( "spu decoder", 51)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_SCODEC)
     set_callbacks(Open, Close)
diff --git a/modules/codec/scte27.c b/modules/codec/scte27.c
index 3231f6316e..bcea12551d 100644
--- a/modules/codec/scte27.c
+++ b/modules/codec/scte27.c
@@ -41,7 +41,7 @@ static void Close(vlc_object_t *);
 vlc_module_begin ()
     set_description(N_("SCTE-27 decoder"))
     set_shortname(N_("SCTE-27"))
-    set_capability( "decoder", 51)
+    set_capability( "spu decoder", 51)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_SCODEC)
     set_callbacks(Open, Close)
diff --git a/modules/codec/spudec/spudec.c b/modules/codec/spudec/spudec.c
index ae2a739f17..22ce35856c 100644
--- a/modules/codec/spudec/spudec.c
+++ b/modules/codec/spudec/spudec.c
@@ -49,7 +49,7 @@ static void Close         ( vlc_object_t * );
 vlc_module_begin ()
     set_description( N_("DVD subtitles decoder") )
     set_shortname( N_("DVD subtitles") )
-    set_capability( "decoder", 75 )
+    set_capability( "spu decoder", 75 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( DecoderOpen, Close )
diff --git a/modules/codec/stl.c b/modules/codec/stl.c
index 1875678e37..38b60e1f7e 100644
--- a/modules/codec/stl.c
+++ b/modules/codec/stl.c
@@ -47,7 +47,7 @@ vlc_module_begin()
     set_description(N_("EBU STL subtitles decoder"))
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_SCODEC)
-    set_capability("decoder", 10)
+    set_capability("spu decoder", 10)
     set_callbacks(Open, Close)
 vlc_module_end()
 
diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 57657ec959..4bfa952c00 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -180,7 +180,7 @@ static void CloseDecoder  ( vlc_object_t * );
 vlc_module_begin ()
     set_shortname( N_("Subtitles"))
     set_description( N_("Text subtitle decoder") )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_callbacks( OpenDecoder, CloseDecoder )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
diff --git a/modules/codec/substx3g.c b/modules/codec/substx3g.c
index 546d99be33..c8ab896e28 100644
--- a/modules/codec/substx3g.c
+++ b/modules/codec/substx3g.c
@@ -39,7 +39,7 @@ static int Decode( decoder_t *, block_t * );
 vlc_module_begin ()
     set_description( N_("tx3g subtitles decoder") )
     set_shortname( N_("tx3g subtitles") )
-    set_capability( "decoder", 100 )
+    set_capability( "spu decoder", 100 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, NULL )
diff --git a/modules/codec/subsusf.c b/modules/codec/subsusf.c
index 1a94b6b4fd..14b07e051a 100644
--- a/modules/codec/subsusf.c
+++ b/modules/codec/subsusf.c
@@ -46,7 +46,7 @@ static void CloseDecoder  ( vlc_object_t * );
  "VLC partly implements this, but you can choose to disable all formatting.")
 
 vlc_module_begin ()
-    set_capability( "decoder", 40 )
+    set_capability( "spu decoder", 40 )
     set_shortname( N_("USFSubs"))
     set_description( N_("USF subtitles decoder") )
     set_callbacks( OpenDecoder, CloseDecoder )
diff --git a/modules/codec/svcdsub.c b/modules/codec/svcdsub.c
index 259dced2f5..a154bc9cb3 100644
--- a/modules/codec/svcdsub.c
+++ b/modules/codec/svcdsub.c
@@ -48,7 +48,7 @@ vlc_module_begin ()
     set_shortname( N_("SVCD subtitles") )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_callbacks( DecoderOpen, DecoderClose )
 
     add_obsolete_integer ( MODULE_STRING "-debug" )
diff --git a/modules/codec/telx.c b/modules/codec/telx.c
index 07a2d7c68c..c25653bd7f 100644
--- a/modules/codec/telx.c
+++ b/modules/codec/telx.c
@@ -70,7 +70,7 @@ static int  Decode( decoder_t *, block_t * );
 vlc_module_begin ()
     set_description( N_("Teletext subtitles decoder") )
     set_shortname( "Teletext" )
-    set_capability( "decoder", 50 )
+    set_capability( "spu decoder", 50 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, Close )
diff --git a/modules/codec/textst.c b/modules/codec/textst.c
index 6e00909d77..d48c88b2cc 100644
--- a/modules/codec/textst.c
+++ b/modules/codec/textst.c
@@ -49,7 +49,7 @@ vlc_module_begin()
     set_description(N_("HDMV TextST subtitles decoder"))
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_SCODEC)
-    set_capability("decoder", 10)
+    set_capability("spu decoder", 10)
     set_callbacks(Open, Close)
 vlc_module_end()
 
diff --git a/modules/codec/ttml/ttml.c b/modules/codec/ttml/ttml.c
index cb9b4b6066..4727b28cbf 100644
--- a/modules/codec/ttml/ttml.c
+++ b/modules/codec/ttml/ttml.c
@@ -40,7 +40,7 @@
  *****************************************************************************/
 
 vlc_module_begin ()
-    set_capability( "decoder", 10 )
+    set_capability( "spu decoder", 10 )
     set_shortname( N_("TTML decoder"))
     set_description( N_("TTML subtitles decoder") )
     set_callbacks( OpenDecoder, CloseDecoder )
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index 4b72c0cbaf..602bb42b25 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -94,7 +94,7 @@ static const int level_zvbi_values[] =
 vlc_module_begin ()
     set_description( N_("VBI and Teletext decoder") )
     set_shortname( N_("VBI & Teletext") )
-    set_capability( "decoder", 51 )
+    set_capability( "spu decoder", 51 )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
     set_callbacks( Open, Close )
diff --git a/modules/misc/stats.c b/modules/misc/stats.c
index ec5dfee2c7..9fccf5622f 100644
--- a/modules/misc/stats.c
+++ b/modules/misc/stats.c
@@ -232,7 +232,7 @@ vlc_module_begin ()
     add_submodule()
         set_section( N_( "Stats decoder" ), NULL )
         set_description( N_("Stats decoder function") )
-        set_capability( "decoder", 0 )
+        set_capability( "spu decoder", 0 )
         add_shortcut( "stats" )
         set_callbacks( OpenDecoder, NULL )
     add_submodule ()
diff --git a/modules/stream_out/transcode/spu.c b/modules/stream_out/transcode/spu.c
index 07ef82dec9..b5ef8db309 100644
--- a/modules/stream_out/transcode/spu.c
+++ b/modules/stream_out/transcode/spu.c
@@ -84,7 +84,7 @@ int transcode_spu_new( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
     /* id->p_decoder->p_cfg = p_sys->p_spu_cfg; */
 
     id->p_decoder->p_module =
-        module_need( id->p_decoder, "decoder", "$codec", false );
+        module_need( id->p_decoder, "spu decoder", "$codec", false );
 
     if( !id->p_decoder->p_module )
     {
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 50155283b3..aa380b640b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -174,7 +174,7 @@ static int LoadDecoder( decoder_t *p_dec, bool b_packetizer,
         const char caps[ES_CATEGORY_COUNT][16] = {
             [VIDEO_ES] = "video decoder",
             [AUDIO_ES] = "audio decoder",
-            [SPU_ES] = "decoder",
+            [SPU_ES] = "spu decoder",
         };
         p_dec->p_module = module_need( p_dec, caps[p_dec->fmt_in.i_cat],
                                        "$codec", false );



More information about the vlc-commits mailing list