summaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0bb11c1..07bae87 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1046,6 +1046,10 @@ typedef struct AVPanScan{
#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
+enum AVPacketSideDataType {
+ AV_PKT_DATA_PALETTE,
+};
+
typedef struct AVPacket {
/**
* Presentation timestamp in AVStream->time_base units; the time at which
@@ -1068,6 +1072,17 @@ typedef struct AVPacket {
int stream_index;
int flags;
/**
+ * Additional packet data that can be provided by the container.
+ * Packet can contain several types of side information.
+ */
+ struct {
+ uint8_t *data;
+ int size;
+ enum AVPacketSideDataType type;
+ } *side_data;
+ int side_data_elems;
+
+ /**
* Duration of this packet in AVStream->time_base units, 0 if unknown.
* Equals next_pts - this_pts in presentation order.
*/
@@ -3224,6 +3239,28 @@ int av_dup_packet(AVPacket *pkt);
*/
void av_free_packet(AVPacket *pkt);
+/**
+ * Allocate new information of a packet.
+ *
+ * @param pkt packet
+ * @param type side information type
+ * @param size side information size
+ * @return pointer to fresh allocated data or NULL otherwise
+ */
+uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+ int size);
+
+/**
+ * Get side information from packet.
+ *
+ * @param pkt packet
+ * @param type desired side information type
+ * @param size pointer for side information size to store (optional)
+ * @return pointer to data if present or NULL otherwise
+ */
+uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+ int *size);
+
/* resample.c */
struct ReSampleContext;
OpenPOWER on IntegriCloud