VLC  4.0.0-dev
es_out.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * es_out.h: Input es_out functions
3  *****************************************************************************
4  * Copyright (C) 1998-2008 VLC authors and VideoLAN
5  * Copyright (C) 2008 Laurent Aimar
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef LIBVLC_INPUT_ES_OUT_H
25 #define LIBVLC_INPUT_ES_OUT_H 1
26 
27 #include <vlc_common.h>
28 
30 {
31  ES_OUT_MODE_NONE, /* don't select anything */
32  ES_OUT_MODE_ALL, /* eg for stream output */
33  ES_OUT_MODE_AUTO, /* best audio/video or for input follow audio-track, sub-track */
34  ES_OUT_MODE_PARTIAL,/* select programs given after --programs */
35  ES_OUT_MODE_END /* mark the es_out as dead */
36 };
37 
39 {
40  /* set/get mode */
42 
43  /* Get date to wait before demuxing more data */
44  ES_OUT_GET_WAKE_UP, /* arg1=vlc_tick_t* res=cannot fail */
45 
46  /* Wrapper for some ES command to work with id */
47  ES_OUT_SET_ES_BY_ID, /* arg1= int, arg2= bool (forced) */
50 
51  /* Stop all selected ES and save the stopped state in a context. free the
52  * context or call ES_OUT_STOP_ALL_ES */
53  ES_OUT_STOP_ALL_ES, /* arg1=void ** */
54  /* Start all ES from the context returned by ES_OUT_STOP_ALL_ES */
55  ES_OUT_START_ALL_ES, /* arg1=void * */
56 
57  /* Get buffering state */
58  ES_OUT_GET_BUFFERING, /* arg1=bool* res=cannot fail */
59 
60  /* Set delay for an ES identifier */
61  ES_OUT_SET_ES_DELAY, /* arg1=es_out_id_t *, res=cannot fail */
62 
63  /* Set delay for a ES category */
64  ES_OUT_SET_DELAY, /* arg1=es_category_e, res=cannot fail */
65 
66  /* Set record state */
67  ES_OUT_SET_RECORD_STATE, /* arg1=bool res=can fail */
68 
69  /* Set pause state */
70  ES_OUT_SET_PAUSE_STATE, /* arg1=bool b_source_paused, bool b_paused arg2=vlc_tick_t res=can fail */
71 
72  /* Set rate */
73  ES_OUT_SET_RATE, /* arg1=double source_rate arg2=double rate res=can fail */
74 
75  /* Set next frame */
76  ES_OUT_SET_FRAME_NEXT, /* res=can fail */
77 
78  /* Set position/time/length */
79  ES_OUT_SET_TIMES, /* arg1=double f_position arg2=vlc_tick_t i_time arg3=vlc_tick_t i_normal_time arg4=vlc_tick_t i_length res=cannot fail */
80 
81  /* Set jitter */
82  ES_OUT_SET_JITTER, /* arg1=vlc_tick_t i_pts_delay arg2= vlc_tick_t i_pts_jitter, arg2=int i_cr_average res=cannot fail */
83 
84  /* Get forced group */
85  ES_OUT_GET_GROUP_FORCED, /* arg1=int * res=cannot fail */
86 
87  /* Set End Of Stream */
88  ES_OUT_SET_EOS, /* res=cannot fail */
89 
90  /* Set a VBI/Teletext page */
91  ES_OUT_SET_VBI_PAGE, /* arg1=unsigned res=can fail */
92 
93  /* Set VBI/Teletext menu transparent */
94  ES_OUT_SET_VBI_TRANSPARENCY /* arg1=bool res=can fail */
95 };
96 
97 static inline void es_out_SetMode( es_out_t *p_out, int i_mode )
98 {
99  int i_ret = es_out_Control( p_out, ES_OUT_SET_MODE, i_mode );
100  assert( !i_ret );
101 }
102 static inline vlc_tick_t es_out_GetWakeup( es_out_t *p_out )
103 {
104  vlc_tick_t i_wu;
105  int i_ret = es_out_Control( p_out, ES_OUT_GET_WAKE_UP, &i_wu );
106 
107  assert( !i_ret );
108  return i_wu;
109 }
110 static inline bool es_out_GetBuffering( es_out_t *p_out )
111 {
112  bool b;
113  int i_ret = es_out_Control( p_out, ES_OUT_GET_BUFFERING, &b );
114 
115  assert( !i_ret );
116  return b;
117 }
118 static inline bool es_out_GetEmpty( es_out_t *p_out )
119 {
120  bool b;
121  int i_ret = es_out_Control( p_out, ES_OUT_GET_EMPTY, &b );
122 
123  assert( !i_ret );
124  return b;
125 }
126 static inline void es_out_SetEsDelay( es_out_t *p_out, es_out_id_t *es, vlc_tick_t i_delay )
127 {
128  int i_ret = es_out_Control( p_out, ES_OUT_SET_ES_DELAY, es, i_delay );
129  assert( !i_ret );
130 }
131 static inline void es_out_SetDelay( es_out_t *p_out, int i_cat, vlc_tick_t i_delay )
132 {
133  int i_ret = es_out_Control( p_out, ES_OUT_SET_DELAY, i_cat, i_delay );
134  assert( !i_ret );
135 }
136 static inline int es_out_SetRecordState( es_out_t *p_out, bool b_record )
137 {
138  return es_out_Control( p_out, ES_OUT_SET_RECORD_STATE, b_record );
139 }
140 static inline int es_out_SetPauseState( es_out_t *p_out, bool b_source_paused, bool b_paused, vlc_tick_t i_date )
141 {
142  return es_out_Control( p_out, ES_OUT_SET_PAUSE_STATE, b_source_paused, b_paused, i_date );
143 }
144 static inline int es_out_SetRate( es_out_t *p_out, float source_rate, float rate )
145 {
146  return es_out_Control( p_out, ES_OUT_SET_RATE, source_rate, rate );
147 }
148 static inline int es_out_SetFrameNext( es_out_t *p_out )
149 {
150  return es_out_Control( p_out, ES_OUT_SET_FRAME_NEXT );
151 }
152 static inline void es_out_SetTimes( es_out_t *p_out, double f_position,
153  vlc_tick_t i_time, vlc_tick_t i_normal_time,
154  vlc_tick_t i_length )
155 {
156  int i_ret = es_out_Control( p_out, ES_OUT_SET_TIMES, f_position, i_time,
157  i_normal_time, i_length );
158  assert( !i_ret );
159 }
160 static inline void es_out_SetJitter( es_out_t *p_out,
161  vlc_tick_t i_pts_delay, vlc_tick_t i_pts_jitter, int i_cr_average )
162 {
163  int i_ret = es_out_Control( p_out, ES_OUT_SET_JITTER,
164  i_pts_delay, i_pts_jitter, i_cr_average );
165  assert( !i_ret );
166 }
167 static inline int es_out_GetGroupForced( es_out_t *p_out )
168 {
169  int i_group;
170  int i_ret = es_out_Control( p_out, ES_OUT_GET_GROUP_FORCED, &i_group );
171  assert( !i_ret );
172  return i_group;
173 }
174 static inline void es_out_Eos( es_out_t *p_out )
175 {
176  int i_ret = es_out_Control( p_out, ES_OUT_SET_EOS );
177  assert( !i_ret );
178 }
179 
180 es_out_t *input_EsOutNew( input_thread_t *, float rate );
182 
184 
185 #endif
Definition: es_out.h:67
es_out_mode_e
Definition: es_out.h:29
static bool es_out_GetEmpty(es_out_t *p_out)
Definition: es_out.h:118
Definition: es_out.h:48
Definition: es_out.h:47
Definition: vlc_es_out.h:121
Definition: es_out.h:61
es_out_query_private_e
Definition: es_out.h:38
static void es_out_SetTimes(es_out_t *p_out, double f_position, vlc_tick_t i_time, vlc_tick_t i_normal_time, vlc_tick_t i_length)
Definition: es_out.h:152
Definition: es_out.h:64
This file is a collection of common definitions and types.
Definition: es_out.h:44
Definition: es_out.h:49
static void es_out_SetJitter(es_out_t *p_out, vlc_tick_t i_pts_delay, vlc_tick_t i_pts_jitter, int i_cr_average)
Definition: es_out.h:160
Definition: es_out.h:73
static int es_out_SetRate(es_out_t *p_out, float source_rate, float rate)
Definition: es_out.h:144
Definition: es_out.h:79
static int es_out_GetGroupForced(es_out_t *p_out)
Definition: es_out.h:167
static void es_out_SetMode(es_out_t *p_out, int i_mode)
Definition: es_out.h:97
static vlc_tick_t es_out_GetWakeup(es_out_t *p_out)
Definition: es_out.h:102
Definition: es_out.h:32
static void es_out_SetEsDelay(es_out_t *p_out, es_out_id_t *es, vlc_tick_t i_delay)
Definition: es_out.h:126
static int es_out_SetPauseState(es_out_t *p_out, bool b_source_paused, bool b_paused, vlc_tick_t i_date)
Definition: es_out.h:140
Definition: es_out.h:94
static void es_out_Eos(es_out_t *p_out)
Definition: es_out.h:174
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
static bool es_out_GetBuffering(es_out_t *p_out)
Definition: es_out.h:110
Definition: vlc_es_out.h:139
static void es_out_SetDelay(es_out_t *p_out, int i_cat, vlc_tick_t i_delay)
Definition: es_out.h:131
es_out_t * input_EsOutNew(input_thread_t *, float rate)
Definition: es_out.c:476
Definition: es_out.c:94
Definition: vlc_es_out.h:92
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:88
Definition: es_out.h:91
Definition: es_out.h:53
static int es_out_SetFrameNext(es_out_t *p_out)
Definition: es_out.h:148
Definition: es_out.h:34
Definition: es_out.h:85
es_out_id_t * vlc_es_id_get_out(vlc_es_id_t *id)
Definition: es_out.c:4094
Definition: es_out.h:55
Main structure representing an input thread.
Definition: input_internal.h:47
Definition: es_out.h:88
static int es_out_Control(es_out_t *out, int i_query,...)
Definition: vlc_es_out.h:166
Definition: es_out.h:33
es_out_t * input_EsOutTimeshiftNew(input_thread_t *, es_out_t *, float i_rate)
Definition: es_out_timeshift.c:301
static int es_out_SetRecordState(es_out_t *p_out, bool b_record)
Definition: es_out.h:136
Definition: es_out.h:70
Definition: es_out.h:82
Definition: es_out.h:35
Definition: es_out.h:31
Definition: es_out.h:76
Definition: es_out.h:58
Definition: es_out.h:41