summaryrefslogtreecommitdiff
path: root/gst/mxf/mxfdemux.h
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2021-07-15 10:45:46 +0200
committerEdward Hervey <bilboed@bilboed.com>2021-07-21 14:33:19 +0000
commit38ec61c58647e5185bcc01c888e711b05326a1a0 (patch)
treee2930dc33bed0d06b47cd308818057576849156c /gst/mxf/mxfdemux.h
parent40d369005455e0e17fb34043fcad88c414d7cfba (diff)
downloadgstreamer-plugins-bad-38ec61c58647e5185bcc01c888e711b05326a1a0.tar.gz
mxfdemux: Use KLV for position/content tracking
* For pull-based, this avoids pulling content if it's not needed (ex: skipping filler packet, not downloading the content if we only need to know if/where an essence packet is, etc...). Allows reducing i/o usage to the minimum. * This also allows doing sub-klv position tracking, and opens the way for non-frame-wrapping handling Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Diffstat (limited to 'gst/mxf/mxfdemux.h')
-rw-r--r--gst/mxf/mxfdemux.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h
index 8ddd714f3..2936ccb4b 100644
--- a/gst/mxf/mxfdemux.h
+++ b/gst/mxf/mxfdemux.h
@@ -49,6 +49,24 @@ typedef struct _GstMXFDemuxClass GstMXFDemuxClass;
typedef struct _GstMXFDemuxPad GstMXFDemuxPad;
typedef struct _GstMXFDemuxPadClass GstMXFDemuxPadClass;
+
+/*
+ * GstMXFKLV is used to pass around information about a KLV.
+ *
+ * It optionally contains the content of the klv (data field).
+ */
+typedef struct {
+ MXFUL key;
+ guint64 offset; /* absolute offset of K */
+ gsize length; /* Size of data (i.e. V) */
+ guint64 data_offset; /* relative offset of data (i.e. size of 'KL') */
+ GstBuffer *data; /* Can be NULL in pull-mode. */
+
+ /* For partial reads (ex: clip/custom wrapping essence), the amount of data
+ * already consumed within. If 0, all of length+data_offset was consumed */
+ guint64 consumed;
+} GstMXFKLV;
+
typedef struct _GstMXFDemuxPartition GstMXFDemuxPartition;
typedef struct _GstMXFDemuxEssenceTrack GstMXFDemuxEssenceTrack;