The aout can exist even if the input thread is stopped. This makes
audio-related functions work in case where they would previously fail.
*/
VLC_API void input_resource_Terminate( input_resource_t * );
+/**
+ * \return the current audio output if any.
+ * Use vlc_object_release() to drop the reference.
+ */
+VLC_API audio_output_t *input_resource_HoldAout( input_resource_t * );
+
#endif
{
assert( mp != NULL );
- input_thread_t *p_input = libvlc_get_input_thread( mp );
- if( p_input == NULL )
- return NULL;
-
- audio_output_t * p_aout = input_GetAout( p_input );
- vlc_object_release( p_input );
+ audio_output_t *p_aout = input_resource_HoldAout( mp->input.p_resource );
if( p_aout == NULL )
libvlc_printerr( "No active audio output" );
return p_aout;
*/
void input_resource_PutAout( input_resource_t *, audio_output_t * );
-/**
- * This function returns the current aout if any.
- *
- * You must call vlc_object_release on the value returned (if non NULL).
- */
-audio_output_t *input_resource_HoldAout( input_resource_t *p_resource );
-
/**
* This function handles vout request.
*/
input_resource_Release
input_resource_TerminateVout
input_resource_Terminate
+input_resource_HoldAout
input_Start
input_Stop
input_vaControl