Commit 3b4420cc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

decoder: use "spu decoder" capability for SPU decoders

parent ac866164
......@@ -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 )
......
......@@ -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 */
......
......@@ -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)
......
......@@ -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 )
......
......@@ -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 ()
......
......@@ -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()
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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)
......
......@@ -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)
......
......@@ -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 )
......
......@@ -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()
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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" )
......
......@@ -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 )
......
......@@ -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()
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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 ()
......
......@@ -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 )
{
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment