add stream_Custom

This commit is contained in:
Francois Cartegnie 2015-09-25 16:41:29 +02:00
parent a799753e32
commit 3946b13fa2
3 changed files with 15 additions and 0 deletions

View File

@ -159,6 +159,11 @@ VLC_API block_t * stream_Block( stream_t *s, size_t );
VLC_API char * stream_ReadLine( stream_t * );
VLC_API input_item_t *stream_ReadDir( stream_t * );
/**
* Low level custom stream creation.
*/
VLC_API stream_t *stream_CustomNew(vlc_object_t *, void (*)(stream_t *));
/**
* Get the size of the stream.
*/

View File

@ -56,6 +56,14 @@ typedef struct stream_priv_t
} text;
} stream_priv_t;
/**
* Allocates a custom VLC stream object
*/
stream_t *stream_CustomNew(vlc_object_t *parent, void (*destroy)(stream_t *))
{
return stream_CommonNew(parent, destroy);
}
/**
* Allocates a VLC stream object
*/
@ -73,6 +81,7 @@ stream_t *stream_CommonNew(vlc_object_t *parent, void (*destroy)(stream_t *))
s->pf_read = NULL;
s->pf_readdir = NULL;
s->pf_control = NULL;
s->p_sys = NULL;
s->p_input = NULL;
assert(destroy != NULL);
priv->destroy = destroy;

View File

@ -394,6 +394,7 @@ spu_RegisterChannel
spu_ClearChannel
stream_Block
stream_Control
stream_CustomNew
stream_Delete
stream_DemuxNew
stream_DemuxSend