mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
v4l2: small cleanups
This commit is contained in:
parent
01def08e7a
commit
be83e4f704
2 changed files with 8 additions and 15 deletions
|
@ -42,6 +42,8 @@ typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
|
||||||
typedef struct _GstV4l2BufferPoolClass GstV4l2BufferPoolClass;
|
typedef struct _GstV4l2BufferPoolClass GstV4l2BufferPoolClass;
|
||||||
typedef struct _GstMetaV4l2 GstMetaV4l2;
|
typedef struct _GstMetaV4l2 GstMetaV4l2;
|
||||||
|
|
||||||
|
#define GST_V4L2_BUFFER_POOL_LOCK(pool) g_mutex_lock ((pool)->lock)
|
||||||
|
#define GST_V4L2_BUFFER_POOL_UNLOCK(pool) g_mutex_unlock ((pool)->lock)
|
||||||
|
|
||||||
struct _GstV4l2BufferPool
|
struct _GstV4l2BufferPool
|
||||||
{
|
{
|
||||||
|
@ -71,10 +73,6 @@ struct _GstMetaV4l2 {
|
||||||
gpointer mem;
|
gpointer mem;
|
||||||
struct v4l2_buffer vbuffer;
|
struct v4l2_buffer vbuffer;
|
||||||
|
|
||||||
/* FIXME: have GstV4l2Src* instead, as this has GstV4l2BufferPool* */
|
|
||||||
/* FIXME: do we really want to fix this if GstV4l2Buffer/Pool is shared
|
|
||||||
* between v4l2src and v4l2sink??
|
|
||||||
*/
|
|
||||||
GstV4l2BufferPool *pool;
|
GstV4l2BufferPool *pool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,18 +80,14 @@ const GstMetaInfo * gst_meta_v4l2_get_info (void);
|
||||||
#define GST_META_V4L2_GET(buf) ((GstMetaV4l2 *)gst_buffer_get_meta(buf,gst_meta_v4l2_get_info()))
|
#define GST_META_V4L2_GET(buf) ((GstMetaV4l2 *)gst_buffer_get_meta(buf,gst_meta_v4l2_get_info()))
|
||||||
#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL))
|
#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL))
|
||||||
|
|
||||||
void gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool);
|
GstV4l2BufferPool * gst_v4l2_buffer_pool_new (GstV4l2Object *obj, gint num_buffers, gboolean requeuebuf);
|
||||||
GstV4l2BufferPool *gst_v4l2_buffer_pool_new (GstV4l2Object *obj, gint num_buffers, gboolean requeuebuf);
|
void gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool);
|
||||||
|
|
||||||
GstBuffer *gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
|
GstBuffer * gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
|
||||||
gboolean gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool *pool, GstBuffer *buf);
|
gboolean gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool *pool, GstBuffer *buf);
|
||||||
GstBuffer *gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool *pool);
|
GstBuffer * gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool *pool);
|
||||||
|
|
||||||
gint gst_v4l2_buffer_pool_available_buffers (GstV4l2BufferPool *pool);
|
gint gst_v4l2_buffer_pool_available_buffers (GstV4l2BufferPool *pool);
|
||||||
|
|
||||||
|
|
||||||
#define GST_V4L2_BUFFER_POOL_LOCK(pool) g_mutex_lock ((pool)->lock)
|
|
||||||
#define GST_V4L2_BUFFER_POOL_UNLOCK(pool) g_mutex_unlock ((pool)->lock)
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -2046,7 +2046,6 @@ gst_v4l2_object_get_nearest_size (GstV4l2Object * v4l2object,
|
||||||
* */
|
* */
|
||||||
#define fractions_are_equal(n1,d1,n2,d2) ((n1) == gst_util_uint64_scale_int((n2), (d1), (d2)))
|
#define fractions_are_equal(n1,d1,n2,d2) ((n1) == gst_util_uint64_scale_int((n2), (d1), (d2)))
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps)
|
gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue