VLC 4.0.0-dev
Loading...
Searching...
No Matches
es_out_timeshift.c File Reference
Include dependency graph for es_out_timeshift.c:

Data Structures

struct  ts_cmd_header_t
 
struct  ts_cmd_add_t
 
struct  ts_cmd_del_t
 
struct  ts_cmd_send_t
 
struct  ts_cmd_control_t
 
struct  ts_cmd_privcontrol_t
 
union  ts_cmd_t
 
struct  ts_storage_t
 
struct  ts_thread_t
 
struct  es_out_id_t
 
struct  es_out_timeshift
 

Macros

#define attribute_packed
 
#define MAX_COMMAND_SIZE   sizeof(ts_cmd_t)
 
#define TS_STORAGE_COMMAND_PREALLOC   30000
 

Typedefs

typedef struct ts_storage_t ts_storage_t
 

Enumerations

enum  ts_storage_cmd_type_e {
  C_ADD = 0 , C_SEND , C_DEL , C_CONTROL ,
  C_PRIVCONTROL
}
 

Functions

static void Del (es_out_t *, es_out_id_t *)
 
static int TsStart (struct es_out_timeshift *)
 
static void TsAutoStop (es_out_t *)
 
static void TsStop (ts_thread_t *)
 
static void TsPushCmd (ts_thread_t *, ts_cmd_t *)
 
static int TsPopCmdLocked (ts_thread_t *, ts_cmd_t *, bool b_flush)
 
static bool TsHasCmd (ts_thread_t *)
 
static bool TsIsUnused (ts_thread_t *)
 
static int TsChangePause (ts_thread_t *, bool b_source_paused, bool b_paused, vlc_tick_t i_date)
 
static int TsChangeRate (ts_thread_t *, float src_rate, float rate)
 
static void * TsRun (void *)
 
static ts_storage_tTsStorageNew (const char *psz_path, int64_t i_tmp_size_max)
 
static void TsStorageDelete (ts_storage_t *)
 
static void TsStoragePack (ts_storage_t *p_storage)
 
static bool TsStorageIsFull (ts_storage_t *, const ts_cmd_t *p_cmd)
 
static bool TsStorageIsEmpty (ts_storage_t *)
 
static void TsStoragePushCmd (ts_storage_t *, const ts_cmd_t *p_cmd, bool b_flush)
 
static void TsStoragePopCmd (ts_storage_t *p_storage, ts_cmd_t *p_cmd, bool b_flush)
 
static void CmdClean (ts_cmd_t *)
 
static int CmdInitAdd (ts_cmd_add_t *, input_source_t *, es_out_id_t *, const es_format_t *, bool b_copy)
 
static void CmdInitSend (ts_cmd_send_t *, es_out_id_t *, block_t *)
 
static int CmdInitDel (ts_cmd_del_t *, es_out_id_t *)
 
static int CmdInitControl (ts_cmd_control_t *, input_source_t *, int i_query, va_list, bool b_copy)
 
static int CmdInitPrivControl (ts_cmd_privcontrol_t *, input_source_t *, int i_query, va_list, bool b_copy)
 
static void CmdCleanAdd (ts_cmd_add_t *)
 
static void CmdCleanSend (ts_cmd_send_t *)
 
static void CmdCleanControl (ts_cmd_control_t *)
 
static void CmdCleanPrivControl (ts_cmd_privcontrol_t *)
 
static void CmdExecuteAdd (struct es_out_timeshift *, ts_cmd_add_t *)
 
static int CmdExecuteSend (struct es_out_timeshift *, ts_cmd_send_t *)
 
static void CmdExecuteDel (struct es_out_timeshift *, ts_cmd_del_t *)
 
static int CmdExecuteControl (struct es_out_timeshift *, ts_cmd_control_t *)
 
static int CmdExecutePrivControl (struct es_out_timeshift *, ts_cmd_privcontrol_t *)
 
static int GetTmpFile (char **filename, const char *dirname)
 
static struct es_out_timeshiftPRIV (es_out_t *out)
 
static void Destroy (es_out_t *p_out)
 
static es_out_id_tAdd (es_out_t *p_out, input_source_t *in, const es_format_t *p_fmt)
 
static int Send (es_out_t *p_out, es_out_id_t *p_es, block_t *p_block)
 
static int es_out_in_vaControl (struct vlc_input_es_out *p_out, input_source_t *in, int i_query, va_list args)
 
static int es_out_in_Control (struct vlc_input_es_out *p_out, input_source_t *in, int i_query,...)
 
static int es_out_in_vaPrivControl (struct vlc_input_es_out *out, input_source_t *in, int i_query, va_list args)
 
static int es_out_in_PrivControl (struct vlc_input_es_out *p_out, input_source_t *in, int i_query,...)
 
static int ControlLockedGetEmpty (struct es_out_timeshift *p_sys, input_source_t *in, bool *pb_empty)
 
static int ControlLockedGetWakeup (struct es_out_timeshift *p_sys, input_source_t *in, vlc_tick_t *pi_wakeup)
 
static int ControlLockedGetBuffering (struct es_out_timeshift *p_sys, input_source_t *in, bool *pb_buffering)
 
static int ControlLockedSetPauseState (struct es_out_timeshift *p_sys, input_source_t *in, bool b_source_paused, bool b_paused, vlc_tick_t i_date)
 
static int ControlLockedSetRate (struct es_out_timeshift *p_sys, input_source_t *in, float src_rate, float rate)
 
static int ControlLockedSetFrameNext (struct es_out_timeshift *p_sys, input_source_t *in)
 
static int ControlLocked (es_out_t *p_out, input_source_t *in, int i_query, va_list args)
 
static int Control (es_out_t *p_tsout, input_source_t *in, int i_query, va_list args)
 
static int PrivControlLocked (struct vlc_input_es_out *p_tsout, input_source_t *in, int i_query, va_list args)
 
static int PrivControl (struct vlc_input_es_out *p_tsout, input_source_t *in, int i_query, va_list args)
 
struct vlc_input_es_outinput_EsOutTimeshiftNew (input_thread_t *p_input, struct vlc_input_es_out *p_next_out, float rate)
 
static void TsDestroy (ts_thread_t *p_ts)
 

Variables

static const struct es_out_callbacks es_out_timeshift_cbs
 
static const size_t TsStorageSizeofCommand []
 

Macro Definition Documentation

◆ attribute_packed

#define attribute_packed

◆ MAX_COMMAND_SIZE

#define MAX_COMMAND_SIZE   sizeof(ts_cmd_t)

◆ TS_STORAGE_COMMAND_PREALLOC

#define TS_STORAGE_COMMAND_PREALLOC   30000

Typedef Documentation

◆ ts_storage_t

typedef struct ts_storage_t ts_storage_t

Enumeration Type Documentation

◆ ts_storage_cmd_type_e

Enumerator
C_ADD 
C_SEND 
C_DEL 
C_CONTROL 
C_PRIVCONTROL 

Function Documentation

◆ Add()

◆ CmdClean()

◆ CmdCleanAdd()

static void CmdCleanAdd ( ts_cmd_add_t p_cmd)
static

◆ CmdCleanControl()

◆ CmdCleanPrivControl()

static void CmdCleanPrivControl ( ts_cmd_privcontrol_t p_cmd)
static

References ts_cmd_privcontrol_t::in, and input_source_Release().

Referenced by CmdClean(), and TsRun().

◆ CmdCleanSend()

static void CmdCleanSend ( ts_cmd_send_t p_cmd)
static

References block_Release, and ts_cmd_send_t::p_block.

Referenced by CmdClean(), and TsRun().

◆ CmdExecuteAdd()

◆ CmdExecuteControl()

◆ CmdExecuteDel()

◆ CmdExecutePrivControl()

◆ CmdExecuteSend()

◆ CmdInitAdd()

◆ CmdInitControl()

◆ CmdInitDel()

static int CmdInitDel ( ts_cmd_del_t p_cmd,
es_out_id_t p_es 
)
static

◆ CmdInitPrivControl()

◆ CmdInitSend()

static void CmdInitSend ( ts_cmd_send_t p_cmd,
es_out_id_t p_es,
block_t p_block 
)
static

◆ Control()

static int Control ( es_out_t p_tsout,
input_source_t in,
int  i_query,
va_list  args 
)
static

◆ ControlLocked()

◆ ControlLockedGetBuffering()

static int ControlLockedGetBuffering ( struct es_out_timeshift p_sys,
input_source_t in,
bool *  pb_buffering 
)
static

◆ ControlLockedGetEmpty()

static int ControlLockedGetEmpty ( struct es_out_timeshift p_sys,
input_source_t in,
bool *  pb_empty 
)
static

◆ ControlLockedGetWakeup()

◆ ControlLockedSetFrameNext()

static int ControlLockedSetFrameNext ( struct es_out_timeshift p_sys,
input_source_t in 
)
static

◆ ControlLockedSetPauseState()

◆ ControlLockedSetRate()

◆ Del()

◆ Destroy()

◆ es_out_in_Control()

static int es_out_in_Control ( struct vlc_input_es_out p_out,
input_source_t in,
int  i_query,
  ... 
)
inlinestatic

◆ es_out_in_PrivControl()

◆ es_out_in_vaControl()

static int es_out_in_vaControl ( struct vlc_input_es_out p_out,
input_source_t in,
int  i_query,
va_list  args 
)
inlinestatic

◆ es_out_in_vaPrivControl()

static int es_out_in_vaPrivControl ( struct vlc_input_es_out out,
input_source_t in,
int  i_query,
va_list  args 
)
inlinestatic

◆ GetTmpFile()

static int GetTmpFile ( char **  filename,
const char *  dirname 
)
static

◆ input_EsOutTimeshiftNew()

◆ PRIV()

◆ PrivControl()

static int PrivControl ( struct vlc_input_es_out p_tsout,
input_source_t in,
int  i_query,
va_list  args 
)
static

◆ PrivControlLocked()

◆ Send()

◆ TsAutoStop()

◆ TsChangePause()

◆ TsChangeRate()

◆ TsDestroy()

static void TsDestroy ( ts_thread_t p_ts)
static

Referenced by TsStart(), and TsStop().

◆ TsHasCmd()

◆ TsIsUnused()

◆ TsPopCmdLocked()

◆ TsPushCmd()

◆ TsRun()

◆ TsStart()

◆ TsStop()

◆ TsStorageDelete()

◆ TsStorageIsEmpty()

static bool TsStorageIsEmpty ( ts_storage_t p_storage)
static

◆ TsStorageIsFull()

◆ TsStorageNew()

◆ TsStoragePack()

static void TsStoragePack ( ts_storage_t p_storage)
static

◆ TsStoragePopCmd()

◆ TsStoragePushCmd()

Variable Documentation

◆ es_out_timeshift_cbs

const struct es_out_callbacks es_out_timeshift_cbs
static
Initial value:
=
{
.add = Add,
.send = Send,
.del = Del,
.control = Control,
.destroy = Destroy,
}
static int Control(es_out_t *p_tsout, input_source_t *in, int i_query, va_list args)
Definition es_out_timeshift.c:730
static es_out_id_t * Add(es_out_t *p_out, input_source_t *in, const es_format_t *p_fmt)
Definition es_out_timeshift.c:385
static void Del(es_out_t *, es_out_id_t *)
Definition es_out_timeshift.c:434
static int Send(es_out_t *p_out, es_out_id_t *p_es, block_t *p_block)
Definition es_out_timeshift.c:414
static void Destroy(es_out_t *p_out)
Definition es_out_timeshift.c:367

Referenced by input_EsOutTimeshiftNew().

◆ TsStorageSizeofCommand

const size_t TsStorageSizeofCommand[]
static
Initial value:
=
{
[C_ADD] = sizeof(ts_cmd_add_t),
[C_SEND] = sizeof(ts_cmd_send_t),
[C_DEL] = sizeof(ts_cmd_del_t),
}
@ C_SEND
Definition es_out_timeshift.c:67
@ C_CONTROL
Definition es_out_timeshift.c:69
@ C_DEL
Definition es_out_timeshift.c:68
@ C_ADD
Definition es_out_timeshift.c:66
@ C_PRIVCONTROL
Definition es_out_timeshift.c:70
Definition es_out_timeshift.c:80
Definition es_out_timeshift.c:104
Definition es_out_timeshift.c:88
Definition es_out_timeshift.c:154
Definition es_out_timeshift.c:94

Referenced by TsStoragePopCmd(), and TsStoragePushCmd().