| 1 |
|
| 2 |
> |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef __MXF_ESSENCE_H__ |
| 21 |
#define __MXF_ESSENCE_H__ |
| 22 |
|
| 23 |
#include <gst/gst.h> |
| 24 |
#include <gst/base/gstadapter.h> |
| 25 |
|
| 26 |
#include "mxftypes.h" |
| 27 |
#include "mxfmetadata.h" |
| 28 |
|
| 29 |
typedef enum { |
| 30 |
MXF_ESSENCE_WRAPPING_FRAME_WRAPPING, |
| 31 |
MXF_ESSENCE_WRAPPING_CLIP_WRAPPING, |
| 32 |
MXF_ESSENCE_WRAPPING_CUSTOM_WRAPPING, |
| 33 |
MXF_ESSENCE_WRAPPING_UNKNOWN_WRAPPING |
| 34 |
} MXFEssenceWrapping; |
| 35 |
|
| 36 |
typedef GstFlowReturn (*MXFEssenceElementHandleFunc) (const MXFUL *key, GstBuffer *buffer, GstCaps *caps, MXFMetadataTimelineTrack *track, gpointer mapping_data, GstBuffer **outbuf); |
| 37 |
|
| 38 |
typedef struct { |
| 39 |
gboolean (*handles_descriptor) (const MXFMetadataFileDescriptor *d); |
| 40 |
MXFEssenceWrapping (*get_track_wrapping) (const MXFMetadataTimelineTrack *track); |
| 41 |
GstCaps * (*create_caps) (MXFMetadataTimelineTrack *track, GstTagList **tags, gboolean * intra_only, MXFEssenceElementHandleFunc *handler, gpointer *mapping_data); |
| 42 |
} MXFEssenceElementHandler; |
| 43 |
|
| 44 |
typedef GstFlowReturn (*MXFEssenceElementWriteFunc) (GstBuffer *buffer, gpointer mapping_data, GstAdapter *adapter, GstBuffer **outbuf, gboolean flush); |
| 45 |
|
| 46 |
typedef struct { |
| 47 |
MXFMetadataFileDescriptor * (*get_descriptor) (GstPadTemplate *tmpl, GstCaps *caps, MXFEssenceElementWriteFunc *handler, gpointer *mapping_data); |
| 48 |
void (*update_descriptor) (MXFMetadataFileDescriptor *d, GstCaps *caps, gpointer mapping_data, GstBuffer *buf); |
| 49 |
void (*get_edit_rate) (MXFMetadataFileDescriptor *a, GstCaps *caps, gpointer mapping_data, GstBuffer *buf, MXFMetadataSourcePackage *package, MXFMetadataTimelineTrack *track, MXFFraction *edit_rate); |
| 50 |
guint32 (*get_track_number_template) (MXFMetadataFileDescriptor *a, GstCaps *caps, gpointer mapping_data); |
| 51 |
const GstPadTemplate *pad_template; |
| 52 |
MXFUL data_definition; |
| 53 |
} MXFEssenceElementWriter; |
| 54 |
|
| 55 |
void mxf_essence_element_handler_register (const MXFEssenceElementHandler *handler); |
| 56 |
const MXFEssenceElementHandler * mxf_essence_element_handler_find (const MXFMetadataTimelineTrack *track); |
| 57 |
|
| 58 |
void mxf_essence_element_writer_register (const MXFEssenceElementWriter *writer); |
| 59 |
const GstPadTemplate ** mxf_essence_element_writer_get_pad_templates (void); |
| 60 |
const MXFEssenceElementWriter *mxf_essence_element_writer_find (const GstPadTemplate *templ); |
| 61 |
|
| 62 |
#endif |