From af78d2543c41a5407e688b077c664cc6d386bc97 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 12 Aug 2006 01:43:26 +0000 Subject: don't report extensions/mimetypes if required decoder is missing (implemented for mp3 demuxer only) CVS patchset: 8177 CVS date: 2006/08/12 01:43:26 --- src/xine-engine/load_plugins.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index dbd6007fd..8de61a103 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.223 2006/07/21 03:31:42 dgp85 Exp $ + * $Id: load_plugins.c,v 1.224 2006/08/12 01:43:26 miguelfreitas Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -1932,6 +1932,27 @@ void _x_free_audio_decoder (xine_stream_t *stream, audio_decoder_t *ad) { } } +int _x_decoder_available (xine_t *xine, uint32_t buftype) +{ + plugin_catalog_t *catalog = xine->plugin_catalog; + int stream_type = (buftype>>16) & 0xFF; + + if ( (buftype & 0xFF000000) == BUF_VIDEO_BASE ) { + if( catalog->video_decoder_map[stream_type][0] ) + return 1; + } else + if ( (buftype & 0xFF000000) == BUF_AUDIO_BASE ) { + if( catalog->audio_decoder_map[stream_type][0] ) + return 1; + } else + if ( (buftype & 0xFF000000) == BUF_SPU_BASE ) { + if( catalog->spu_decoder_map[stream_type][0] ) + return 1; + } + + return 0; +} + #ifdef LOG static void _display_file_plugin_list (xine_list_t *list, plugin_file_t *file) { -- cgit v1.2.3