diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/load_plugins.c | 23 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 4 |
2 files changed, 25 insertions, 2 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) { diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 05a9144d6..ae0e235e8 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -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: xine_internal.h,v 1.173 2006/08/08 03:25:03 miguelfreitas Exp $ + * $Id: xine_internal.h,v 1.174 2006/08/12 01:43:26 miguelfreitas Exp $ * */ @@ -453,6 +453,8 @@ audio_decoder_t *_x_get_audio_decoder (xine_stream_t *stream, uint8_t stream_ty void _x_free_audio_decoder (xine_stream_t *stream, audio_decoder_t *decoder); spu_decoder_t *_x_get_spu_decoder (xine_stream_t *stream, uint8_t stream_type); void _x_free_spu_decoder (xine_stream_t *stream, spu_decoder_t *decoder); +/* check for decoder availability - but don't try to initialize it */ +int _x_decoder_available (xine_t *xine, uint32_t buftype); /* * load_video_output_plugin |