- /* Test the requested capability */
- switch( i_capability )
- {
- case MODULE_CAPABILITY_ACCESS:
- i_ret = p_first->p_module->p_functions->access.functions.
- access.pf_open( (struct input_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_DEMUX:
- i_ret = p_first->p_module->p_functions->demux.functions.
- demux.pf_init( (struct input_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_NETWORK:
- i_ret = p_first->p_module->p_functions->network.functions.
- network.pf_open( (struct network_socket_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_DECODER:
- i_ret = p_first->p_module->p_functions->dec.functions.
- dec.pf_probe( (u8 *)p_data );
- break;
-
- case MODULE_CAPABILITY_INTF:
- i_ret = p_first->p_module->p_functions->intf.functions.
- intf.pf_open( (struct intf_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_AOUT:
- i_ret = p_first->p_module->p_functions->aout.functions.
- aout.pf_open( (struct aout_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_VOUT:
- i_ret = p_first->p_module->p_functions->vout.functions.
- vout.pf_create( (struct vout_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_CHROMA:
- i_ret = p_first->p_module->p_functions->chroma.functions.
- chroma.pf_init( (struct vout_thread_s *)p_data );
- break;
-
- case MODULE_CAPABILITY_IDCT:
- case MODULE_CAPABILITY_IMDCT:
- case MODULE_CAPABILITY_MOTION:
- case MODULE_CAPABILITY_DOWNMIX:
- case MODULE_CAPABILITY_MEMCPY:
- /* This one always works */
- i_ret = 0;
- break;
-
- default:
- intf_ErrMsg( "module error: unknown module type %i",
- i_capability );
- i_ret = -1;
- break;
- }
-
- /* If the high score was broken, we have a new champion */
- if( i_ret == 0 )