VLC  4.0.0-dev
Data Structures | Macros | Functions
resource.c File Reference
Include dependency graph for resource.c:

Data Structures

struct  vout_resource
 
struct  input_resource_t
 

Macros

#define resource_GetFirstVoutRsc(resource)   vlc_list_first_entry_or_null(&resource->vout_rscs, struct vout_resource, node)
 

Functions

static struct vout_resourceresource_GetVoutRsc (input_resource_t *resource, vout_thread_t *vout)
 
static struct vout_resourcevout_resource_Create (vout_thread_t *vout)
 
static void vout_resource_Add (struct vout_resource *vout_rsc, input_resource_t *resource)
 
static vout_thread_tvout_resource_Remove (struct vout_resource *vout_rsc)
 
static void DestroySout (input_resource_t *p_resource)
 
static void DestroyVout (input_resource_t *p_resource)
 
static void DisplayVoutTitle (input_resource_t *p_resource, vout_thread_t *p_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)
 
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...
 
static void input_resource_PutVoutLocked (input_resource_t *p_resource, vout_thread_t *vout, bool *has_stopped)
 
void input_resource_PutVout (input_resource_t *p_resource, vout_thread_t *vout, bool *stopped)
 
static struct vout_resourceRequestVoutRsc (input_resource_t *p_resource)
 
vout_thread_tinput_resource_RequestVout (input_resource_t *p_resource, vlc_video_context *vctx, const vout_configuration_t *cfg, enum vlc_vout_order *order, bool *has_started)
 
vout_thread_tinput_resource_HoldVout (input_resource_t *p_resource)
 This function returns one of the current vout if any. More...
 
vout_thread_tinput_resource_HoldDummyVout (input_resource_t *p_resource)
 This function returns the dummy vout. 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_StopFreeVout (input_resource_t *p_resource)
 
sout_instance_tinput_resource_RequestSout (input_resource_t *p_resource, const char *psz_sout)
 This function handles sout request. More...
 
void input_resource_PutSout (input_resource_t *resource, sout_instance_t *sout)
 
void input_resource_TerminateSout (input_resource_t *p_resource)
 This function deletes the current sout in the resources. More...
 

Macro Definition Documentation

◆ resource_GetFirstVoutRsc

#define resource_GetFirstVoutRsc (   resource)    vlc_list_first_entry_or_null(&resource->vout_rscs, struct vout_resource, node)

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

◆ input_resource_GetAout()

audio_output_t* input_resource_GetAout ( input_resource_t p_resource)

◆ input_resource_Hold()

input_resource_t* input_resource_Hold ( input_resource_t p_resource)

This function holds the input_resource_t itself.

References input_resource_t::rc, and vlc_atomic_rc_inc().

Referenced by Create().

◆ input_resource_HoldAout()

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

References aout_Hold(), input_resource_t::lock_hold, input_resource_t::p_aout, vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by ControlNav(), ViewpointApply(), and vlc_player_aout_Hold().

◆ input_resource_HoldDummyVout()

vout_thread_t* input_resource_HoldDummyVout ( input_resource_t )

This function returns the dummy vout.

It will be the parent of the future main vout and can be used to pre-configure it.

References input_resource_t::p_vout_dummy, and vout_Hold().

Referenced by vlc_player_vout_Hold(), and vlc_player_vout_HoldAll().

◆ 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 vout_Release() on the value returned (if non NULL).

References input_resource_t::lock_hold, resource_GetFirstVoutRsc, vlc_mutex_lock(), vlc_mutex_unlock(), vout_resource::vout, and vout_Hold().

Referenced by ModuleThread_NewSpuBuffer(), vlc_player_vout_Hold(), and vlc_player_vout_TriggerOption().

◆ input_resource_HoldVouts()

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

◆ input_resource_New()

input_resource_t* input_resource_New ( vlc_object_t )

◆ input_resource_PutAout()

void input_resource_PutAout ( input_resource_t p_resource,
audio_output_t p_aout 
)

◆ input_resource_PutSout()

void input_resource_PutSout ( input_resource_t resource,
sout_instance_t sout 
)

◆ input_resource_PutVout()

void input_resource_PutVout ( input_resource_t p_resource,
vout_thread_t vout,
bool *  stopped 
)

◆ input_resource_PutVoutLocked()

static void input_resource_PutVoutLocked ( input_resource_t p_resource,
vout_thread_t vout,
bool *  has_stopped 
)
static

◆ input_resource_Release()

void input_resource_Release ( input_resource_t p_resource)

◆ input_resource_RequestSout()

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

◆ input_resource_RequestVout()

vout_thread_t* input_resource_RequestVout ( input_resource_t p_resource,
vlc_video_context vctx,
const vout_configuration_t cfg,
enum vlc_vout_order order,
bool *  has_started 
)

◆ input_resource_ResetAout()

void input_resource_ResetAout ( input_resource_t p_resource)

◆ input_resource_SetInput()

void input_resource_SetInput ( input_resource_t p_resource,
input_thread_t p_input 
)

◆ input_resource_StopFreeVout()

void input_resource_StopFreeVout ( input_resource_t p_resource)

◆ input_resource_TerminateSout()

void input_resource_TerminateSout ( input_resource_t p_resource)

This function deletes the current sout in the resources.

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

Referenced by input_resource_PutSout(), and vlc_player_destructor_Thread().

◆ RequestVoutRsc()

static struct vout_resource* RequestVoutRsc ( input_resource_t p_resource)
static

◆ resource_GetVoutRsc()

static struct vout_resource* resource_GetVoutRsc ( input_resource_t resource,
vout_thread_t vout 
)
inlinestatic

◆ vout_resource_Add()

static void vout_resource_Add ( struct vout_resource vout_rsc,
input_resource_t resource 
)
inlinestatic

◆ vout_resource_Create()

static struct vout_resource* vout_resource_Create ( vout_thread_t vout)
inlinestatic

◆ vout_resource_Remove()

static vout_thread_t* vout_resource_Remove ( struct vout_resource vout_rsc)
inlinestatic