return true;
}
-bool input_EsOutIsBuffering( es_out_t *out )
-{
- return out->p_sys->b_buffering;
-}
void input_EsOutFrameNext( es_out_t *out )
{
es_out_sys_t *p_sys = out->p_sys;
return es_out_Control( out, i_new_query, p_es );
}
+ case ES_OUT_GET_BUFFERING:
+ pb = (bool *)va_arg( args, bool* );
+ *pb = p_sys->b_buffering;
+ return VLC_SUCCESS;
+
default:
msg_Err( p_sys->p_input, "unknown query in es_out_Control" );
return VLC_EGENERIC;
enum es_out_query_private_e
{
/* Get date to wait before demuxing more data */
- ES_OUT_GET_WAKE_UP = ES_OUT_PRIVATE_START, /* arg1=mtime_t* res=cannot fail */
+ ES_OUT_GET_WAKE_UP = ES_OUT_PRIVATE_START, /* arg1=mtime_t* res=cannot fail */
/* Wrapper for some ES command to work with id */
ES_OUT_SET_ES_BY_ID,
ES_OUT_RESTART_ES_BY_ID,
ES_OUT_SET_ES_DEFAULT_BY_ID,
+
+ /* Get buffering state */
+ ES_OUT_GET_BUFFERING, /* arg1=bool* res=cannot fail */
};
static inline mtime_t es_out_GetWakeup( es_out_t *p_out )
assert( !i_ret );
return i_wu;
}
+static inline bool es_out_GetBuffering( es_out_t *p_out )
+{
+ bool b;
+ int i_ret = es_out_Control( p_out, ES_OUT_GET_BUFFERING, &b );
+
+ assert( !i_ret );
+ return b;
+}
+
es_out_t *input_EsOutNew( input_thread_t *, int i_rate );
void input_EsOutChangePause( es_out_t *, bool b_paused, mtime_t i_date );
void input_EsOutChangePosition( es_out_t * );
bool input_EsOutDecodersIsEmpty( es_out_t * );
-bool input_EsOutIsBuffering( es_out_t * );
void input_EsOutFrameNext( es_out_t * );
void input_EsOutLock( es_out_t * );
/* FIXME if p_input->i_state == PAUSE_S the access/access_demux
* is paused -> this may cause problem with some of them
* The same problem can be seen when seeking while paused */
- input_EsOutLock( p_input->p->p_es_out );
b_paused = p_input->i_state == PAUSE_S &&
- !input_EsOutIsBuffering( p_input->p->p_es_out );
- input_EsOutUnlock( p_input->p->p_es_out );
+ !es_out_GetBuffering( p_input->p->p_es_out );
if( !b_paused )
{