mxfmux: Port to GstAggregator

This commit is contained in:
Sebastian Dröge 2015-10-23 18:38:33 +03:00
parent 8b3953b887
commit d6a5e4ff16
3 changed files with 328 additions and 289 deletions

View file

@ -20,10 +20,13 @@ libgstmxf_la_SOURCES = \
mxfdms1.c mxfdms1.c
libgstmxf_la_CFLAGS = \ libgstmxf_la_CFLAGS = \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \
$(GST_CFLAGS) $(GST_CFLAGS)
libgstmxf_la_LIBADD = \ libgstmxf_la_LIBADD = \
$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
$(GST_PLUGINS_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-@GST_API_VERSION@ \ -lgstvideo-@GST_API_VERSION@ \
-lgstaudio-@GST_API_VERSION@ \ -lgstaudio-@GST_API_VERSION@ \

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstadapter.h> #include <gst/base/gstadapter.h>
#include <gst/base/gstcollectpads.h> #include <gst/base/gstaggregator.h>
#include "mxfessence.h" #include "mxfessence.h"
@ -39,26 +39,6 @@ G_BEGIN_DECLS
#define GST_IS_MXF_MUX_CLASS(klass) \ #define GST_IS_MXF_MUX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MXF_MUX)) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MXF_MUX))
typedef struct
{
GstCollectData collect;
guint64 pos;
GstClockTime last_timestamp;
MXFMetadataFileDescriptor *descriptor;
GstAdapter *adapter;
gboolean have_complete_edit_unit;
gpointer mapping_data;
const MXFEssenceElementWriter *writer;
MXFEssenceElementWriteFunc write_func;
MXFMetadataSourcePackage *source_package;
MXFMetadataTimelineTrack *source_track;
} GstMXFMuxPad;
typedef enum typedef enum
{ {
GST_MXF_MUX_STATE_HEADER, GST_MXF_MUX_STATE_HEADER,
@ -68,14 +48,9 @@ typedef enum
} GstMXFMuxState; } GstMXFMuxState;
typedef struct _GstMXFMux { typedef struct _GstMXFMux {
GstElement element; GstAggregator parent;
GstPad *srcpad;
GstCollectPads *collect;
/* <private> */ /* <private> */
GstPadEventFunction collect_event;
GstMXFMuxState state; GstMXFMuxState state;
guint n_pads; guint n_pads;
@ -96,7 +71,7 @@ typedef struct _GstMXFMux {
} GstMXFMux; } GstMXFMux;
typedef struct _GstMXFMuxClass { typedef struct _GstMXFMuxClass {
GstElementClass parent; GstAggregatorClass parent;
} GstMXFMuxClass; } GstMXFMuxClass;
GType gst_mxf_mux_get_type (void); GType gst_mxf_mux_get_type (void);