add GstBufferPool impl

This commit is contained in:
tinyzimmer
2020-09-29 22:05:29 +03:00
parent 6a0e69d0e1
commit f2ab0657c0
6 changed files with 397 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
inline GstAllocator * toGstAllocator (void *p) { return (GST_ALLOCATOR_CAST(p)); }
inline GstBin * toGstBin (void *p) { return (GST_BIN(p)); }
inline GstBufferList * toGstBufferList (void *p) { return (GST_BUFFER_LIST(p)); }
inline GstBufferPool * toGstBufferPool (void *p) { return (GST_BUFFER_POOL(p)); }
inline GstBuffer * toGstBuffer (void *p) { return (GST_BUFFER(p)); }
inline GstBus * toGstBus (void *p) { return (GST_BUS(p)); }
@@ -53,6 +54,35 @@ inline GstBuffer * makeBufferWritable (GstBuffer * buf)
return (gst_buffer_make_writable(buf));
}
inline GType bufferListType ()
{
return GST_TYPE_BUFFER_LIST;
}
/* BufferList Utilities */
inline gboolean bufferListIsWritable (GstBufferList * bufList)
{
return gst_buffer_list_is_writable(bufList);
}
inline GstBufferList * makeBufferListWritable (GstBufferList * bufList)
{
return gst_buffer_list_make_writable(bufList);
}
inline void addToBufferList (GstBufferList * bufList, GstBuffer * buf)
{
gst_buffer_list_add(bufList, buf);
}
/* BufferPool utilities */
inline gboolean bufferPoolIsFlushing (GstBufferPool * pool)
{
return GST_BUFFER_POOL_IS_FLUSHING(pool);
}
/* Object Utilities */
inline GObjectClass * getGObjectClass (void * p) { return (G_OBJECT_GET_CLASS(p)); }