Commit 3110a86a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Write accessor for relevant block_fifo_t state

parent b228fab6
...@@ -281,5 +281,7 @@ VLC_EXPORT( void, block_FifoEmpty, ( block_fifo_t * ) ); ...@@ -281,5 +281,7 @@ VLC_EXPORT( void, block_FifoEmpty, ( block_fifo_t * ) );
VLC_EXPORT( int, block_FifoPut, ( block_fifo_t *, block_t * ) ); VLC_EXPORT( int, block_FifoPut, ( block_fifo_t *, block_t * ) );
VLC_EXPORT( block_t *, block_FifoGet, ( block_fifo_t * ) ); VLC_EXPORT( block_t *, block_FifoGet, ( block_fifo_t * ) );
VLC_EXPORT( block_t *, block_FifoShow, ( block_fifo_t * ) ); VLC_EXPORT( block_t *, block_FifoShow, ( block_fifo_t * ) );
VLC_EXPORT( size_t, block_FifoSize, ( const block_fifo_t *p_fifo ) );
VLC_EXPORT( size_t, block_FifoCount, ( const block_fifo_t *p_fifo ) );
#endif /* VLC_BLOCK_H */ #endif /* VLC_BLOCK_H */
...@@ -70,6 +70,8 @@ __block_FifoNew ...@@ -70,6 +70,8 @@ __block_FifoNew
block_FifoPut block_FifoPut
block_FifoRelease block_FifoRelease
block_FifoShow block_FifoShow
block_FifoCount
block_FifoSize
__block_New __block_New
block_Realloc block_Realloc
config_ChainCreate config_ChainCreate
......
...@@ -155,6 +155,19 @@ static void BlockRelease( block_t *p_block ) ...@@ -155,6 +155,19 @@ static void BlockRelease( block_t *p_block )
/***************************************************************************** /*****************************************************************************
* block_fifo_t management * block_fifo_t management
*****************************************************************************/ *****************************************************************************/
#if 0
struct block_fifo_t
{
vlc_mutex_t lock; /* fifo data lock */
vlc_cond_t wait; /* fifo data conditional variable */
int i_depth;
block_t *p_first;
block_t **pp_last;
int i_size;
};
#endif
block_fifo_t *__block_FifoNew( vlc_object_t *p_obj ) block_fifo_t *__block_FifoNew( vlc_object_t *p_obj )
{ {
block_fifo_t *p_fifo; block_fifo_t *p_fifo;
...@@ -269,6 +282,14 @@ block_t *block_FifoShow( block_fifo_t *p_fifo ) ...@@ -269,6 +282,14 @@ block_t *block_FifoShow( block_fifo_t *p_fifo )
vlc_mutex_unlock( &p_fifo->lock ); vlc_mutex_unlock( &p_fifo->lock );
return( b ); return( b );
}
size_t block_FifoSize( const block_fifo_t *p_fifo )
{
return p_fifo->i_size;
} }
size_t block_FifoCount( const block_fifo_t *p_fifo )
{
return p_fifo->i_depth;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment