VLC  3.0.21
Data Structures | Functions
resource.c File Reference
Include dependency graph for resource.c:

Data Structures

struct  input_resource_t
 

Functions

static void DestroySout (input_resource_t *p_resource)
 
static sout_instance_tRequestSout (input_resource_t *p_resource, sout_instance_t *p_sout, const char *psz_sout)
 
static void DestroyVout (input_resource_t *p_resource)
 
static void DisplayVoutTitle (input_resource_t *p_resource, vout_thread_t *p_vout)
 
static vout_thread_tRequestVout (input_resource_t *p_resource, vout_thread_t *p_vout, const video_format_t *p_fmt, unsigned dpb_size, bool b_recycle)
 
static vout_thread_tHoldVout (input_resource_t *p_resource)
 
static void HoldVouts (input_resource_t *p_resource, vout_thread_t ***ppp_vout, size_t *pi_vout)
 
audio_output_tinput_resource_GetAout (input_resource_t *p_resource)
 This function creates or recycles an audio output. More...
 
void input_resource_PutAout (input_resource_t *p_resource, audio_output_t *p_aout)
 This function retains or destroys an audio output. More...
 
audio_output_tinput_resource_HoldAout (input_resource_t *p_resource)
 
void input_resource_ResetAout (input_resource_t *p_resource)
 Prevents the existing audio output (if any) from being recycled. More...
 
input_resource_tinput_resource_New (vlc_object_t *p_parent)
 It creates an empty input resource handler. More...
 
void input_resource_Release (input_resource_t *p_resource)
 It releases an input resource. More...
 
input_resource_tinput_resource_Hold (input_resource_t *p_resource)
 This function holds the input_resource_t itself. More...
 
void input_resource_SetInput (input_resource_t *p_resource, input_thread_t *p_input)
 This function set the associated input. More...
 
vout_thread_tinput_resource_RequestVout (input_resource_t *p_resource, vout_thread_t *p_vout, const video_format_t *p_fmt, unsigned dpb_size, bool b_recycle)
 This function handles vout request. More...
 
vout_thread_tinput_resource_HoldVout (input_resource_t *p_resource)
 This function returns one of the current vout if any. More...
 
void input_resource_HoldVouts (input_resource_t *p_resource, vout_thread_t ***ppp_vout, size_t *pi_vout)
 This function returns all current vouts if any. More...
 
void input_resource_TerminateVout (input_resource_t *p_resource)
 Forcefully destroys the video output (e.g. More...
 
bool input_resource_HasVout (input_resource_t *p_resource)
 This function return true if there is at least one vout in the resources. More...
 
sout_instance_tinput_resource_RequestSout (input_resource_t *p_resource, sout_instance_t *p_sout, const char *psz_sout)
 This function handles sout request. More...
 
void input_resource_TerminateSout (input_resource_t *p_resource)
 This function deletes the current sout in the resources. More...
 
void input_resource_Terminate (input_resource_t *p_resource)
 This function releases all resources (object). More...
 

Function Documentation

◆ DestroySout()

static void DestroySout ( input_resource_t p_resource)
static

◆ DestroyVout()

static void DestroyVout ( input_resource_t p_resource)
static

◆ DisplayVoutTitle()

static void DisplayVoutTitle ( input_resource_t p_resource,
vout_thread_t p_vout 
)
static

◆ HoldVout()

static vout_thread_t* HoldVout ( input_resource_t p_resource)
static

◆ HoldVouts()

static void HoldVouts ( input_resource_t p_resource,
vout_thread_t ***  ppp_vout,
size_t *  pi_vout 
)
static

◆ input_resource_GetAout()

audio_output_t* input_resource_GetAout ( input_resource_t p_resource)

◆ input_resource_HasVout()

bool input_resource_HasVout ( input_resource_t p_resource)

This function return true if there is at least one vout in the resources.

It can only be called on detached resources.

Referenced by Thread().

◆ input_resource_Hold()

input_resource_t* input_resource_Hold ( input_resource_t p_resource)

This function holds the input_resource_t itself.

Referenced by Create().

◆ input_resource_HoldAout()

audio_output_t* input_resource_HoldAout ( input_resource_t )
Returns
the current audio output if any. Use vlc_object_release() to drop the reference.

Referenced by input_vaControl(), and playlist_GetAout().

◆ input_resource_HoldVout()

vout_thread_t* input_resource_HoldVout ( input_resource_t )

This function returns one of the current vout if any.

You must call vlc_object_release on the value returned (if non NULL).

Referenced by DeleteDecoder(), and spu_new_buffer().

◆ input_resource_HoldVouts()

void input_resource_HoldVouts ( input_resource_t ,
vout_thread_t ***  ,
size_t *   
)

This function returns all current vouts if any.

You must call vlc_object_release on all values returned (if non NULL).

Referenced by input_vaControl().

◆ input_resource_New()

input_resource_t* input_resource_New ( vlc_object_t )

It creates an empty input resource handler.

The given object MUST stay alive as long as the input_resource_t is not deleted.

References input_resource_t::lock, input_resource_t::lock_hold, input_resource_t::p_parent, input_resource_t::refs, and vlc_mutex_init().

Referenced by Create(), and playlist_Create().

◆ input_resource_PutAout()

void input_resource_PutAout ( input_resource_t p_resource,
audio_output_t p_aout 
)

This function retains or destroys an audio output.

Referenced by aout_update_format(), DeleteDecoder(), playlist_Create(), and ReloadDecoder().

◆ input_resource_Release()

void input_resource_Release ( input_resource_t p_resource)

It releases an input resource.

Referenced by input_Destructor(), and playlist_Destroy().

◆ input_resource_RequestSout()

sout_instance_t* input_resource_RequestSout ( input_resource_t p_resource,
sout_instance_t p_sout,
const char *  psz_sout 
)

This function handles sout request.

References input_resource_t::lock, RequestSout(), vlc_mutex_lock(), and vlc_mutex_unlock().

◆ input_resource_RequestVout()

vout_thread_t* input_resource_RequestVout ( input_resource_t p_resource,
vout_thread_t p_vout,
const video_format_t p_fmt,
unsigned  dpb_size,
bool  b_recycle 
)

This function handles vout request.

Referenced by aout_request_vout(), DeleteDecoder(), and vout_update_format().

◆ input_resource_ResetAout()

void input_resource_ResetAout ( input_resource_t p_resource)

Prevents the existing audio output (if any) from being recycled.

◆ input_resource_SetInput()

void input_resource_SetInput ( input_resource_t p_resource,
input_thread_t p_input 
)

This function set the associated input.

Referenced by Create().

◆ input_resource_Terminate()

void input_resource_Terminate ( input_resource_t p_resource)

This function releases all resources (object).

Referenced by Thread().

◆ input_resource_TerminateSout()

void input_resource_TerminateSout ( input_resource_t p_resource)

This function deletes the current sout in the resources.

◆ input_resource_TerminateVout()

void input_resource_TerminateVout ( input_resource_t )

Forcefully destroys the video output (e.g.

when the playlist is stopped).

Referenced by EsOutControlLocked(), and Thread().

◆ RequestSout()

static sout_instance_t* RequestSout ( input_resource_t p_resource,
sout_instance_t p_sout,
const char *  psz_sout 
)
static

◆ RequestVout()

static vout_thread_t* RequestVout ( input_resource_t p_resource,
vout_thread_t p_vout,
const video_format_t p_fmt,
unsigned  dpb_size,
bool  b_recycle 
)
static