diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2006-08-12 01:43:26 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2006-08-12 01:43:26 +0000 |
commit | af78d2543c41a5407e688b077c664cc6d386bc97 (patch) | |
tree | 5fed63fcd8567674d4689c4777f17af6d6a7c991 /src/xine-engine/load_plugins.c | |
parent | d5bd5710c23300e1ba95ff596556f25317993de7 (diff) | |
download | xine-lib-af78d2543c41a5407e688b077c664cc6d386bc97.tar.gz xine-lib-af78d2543c41a5407e688b077c664cc6d386bc97.tar.bz2 |
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
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r-- | src/xine-engine/load_plugins.c | 23 |
1 files changed, 22 insertions, 1 deletions
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) { |