diff options
Diffstat (limited to 'ext/raw1394/gstdv1394src.h')
-rw-r--r-- | ext/raw1394/gstdv1394src.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/ext/raw1394/gstdv1394src.h b/ext/raw1394/gstdv1394src.h index 425628da..23fc65bb 100644 --- a/ext/raw1394/gstdv1394src.h +++ b/ext/raw1394/gstdv1394src.h @@ -23,13 +23,11 @@ #include <gst/gst.h> -#include <libraw1394/raw1394.h> - +#include <gst/base/gstpushsrc.h> -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +#include <libraw1394/raw1394.h> +G_BEGIN_DECLS #define GST_TYPE_DV1394SRC \ (gst_dv1394src_get_type()) @@ -45,16 +43,20 @@ extern "C" { typedef struct _GstDV1394Src GstDV1394Src; typedef struct _GstDV1394SrcClass GstDV1394SrcClass; -struct _GstDV1394Src { - GstElement element; +#define GST_DV_GET_LOCK(dv) (GST_DV1394SRC (dv)->dv_lock) +#define GST_DV_LOCK(dv) g_mutex_lock(GST_DV_GET_LOCK (dv)) +#define GST_DV_UNLOCK(dv) g_mutex_unlock(GST_DV_GET_LOCK (dv)) - GstPad *srcpad; +struct _GstDV1394Src { + GstPushSrc element; // consecutive=2, skip=4 will skip 4 frames, then let 2 consecutive ones thru gint consecutive; gint skip; gboolean drop_incomplete; + GMutex *dv_lock; + gint num_ports; gint port; gint channel; @@ -65,7 +67,6 @@ struct _GstDV1394Src { struct raw1394_portinfo pinfo[16]; raw1394handle_t handle; - gboolean started; GstBuffer *buf; GstBuffer *frame; @@ -80,7 +81,7 @@ struct _GstDV1394Src { }; struct _GstDV1394SrcClass { - GstElementClass parent_class; + GstPushSrcClass parent_class; /* signal */ void (*frame_dropped) (GstElement *elem); @@ -88,9 +89,6 @@ struct _GstDV1394SrcClass { GType gst_dv1394src_get_type(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif /* __GST_GST1394_H__ */ |