Commit 3946b13f authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

add stream_Custom

parent a799753e
...@@ -159,6 +159,11 @@ VLC_API block_t * stream_Block( stream_t *s, size_t ); ...@@ -159,6 +159,11 @@ VLC_API block_t * stream_Block( stream_t *s, size_t );
VLC_API char * stream_ReadLine( stream_t * ); VLC_API char * stream_ReadLine( stream_t * );
VLC_API input_item_t *stream_ReadDir( 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. * Get the size of the stream.
*/ */
......
...@@ -56,6 +56,14 @@ typedef struct stream_priv_t ...@@ -56,6 +56,14 @@ typedef struct stream_priv_t
} text; } text;
} stream_priv_t; } 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 * Allocates a VLC stream object
*/ */
...@@ -73,6 +81,7 @@ stream_t *stream_CommonNew(vlc_object_t *parent, void (*destroy)(stream_t *)) ...@@ -73,6 +81,7 @@ stream_t *stream_CommonNew(vlc_object_t *parent, void (*destroy)(stream_t *))
s->pf_read = NULL; s->pf_read = NULL;
s->pf_readdir = NULL; s->pf_readdir = NULL;
s->pf_control = NULL; s->pf_control = NULL;
s->p_sys = NULL;
s->p_input = NULL; s->p_input = NULL;
assert(destroy != NULL); assert(destroy != NULL);
priv->destroy = destroy; priv->destroy = destroy;
......
...@@ -394,6 +394,7 @@ spu_RegisterChannel ...@@ -394,6 +394,7 @@ spu_RegisterChannel
spu_ClearChannel spu_ClearChannel
stream_Block stream_Block
stream_Control stream_Control
stream_CustomNew
stream_Delete stream_Delete
stream_DemuxNew stream_DemuxNew
stream_DemuxSend stream_DemuxSend
......
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