* Try to buffer at least this amount of data before flushing it
*/
int min_packet_size;
+
+ /**
+ * If set, all output will be wrapped in the Metacube format,
+ * for consumption by the Cubemap reflector. This is so that Cubemap
+ * can know what the header is, and where it is possible to start
+ * the stream (ie., from keyframes) without actually parsing and
+ * understanding the mux. Only relevant if write_flag is set.
+ *
+ * When wrapping in Metacube, s->buffer will have room for a 16-byte
+ * Metacube header while writing, which is constructed in avio_flush()
+ * before sending. This header is invisible to the calling code;
+ * e.g., it will not be counted in seeks and similar.
+ */
+ int metacube;
+
+ /**
+ * If the metacube flag is set, we need to know whether we've seen
+ * at least one sync point marker (AVIO_DATA_MARKER_SYNC_POINT),
+ * as many muxes don't send them out at all. If we haven't seen any sync
+ * point markers, we assume that all packets (in particular
+ * AVIO_DATA_MARKER_UNKNOWN) are valid sync start points.
+ * (This may not hold for all codecs in practice.)
+ */
+ int seen_sync_point;
} AVIOContext;
/**
*/
#define AVIO_FLAG_NONBLOCK 8
+/**
+ * If set, all output will be wrapped in the Metacube format.
+ * See AVIOContext::metacube for more information.
+ */
+#define AVIO_FLAG_METACUBE 16
+
/**
* Use direct mode.
* avio_read and avio_write should if possible be satisfied directly