Revision 4de339e2 libavcodec/avcodec.h

View differences:

libavcodec/avcodec.h
1035 1035
#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
1036 1036
#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
1037 1037

  
1038
enum AVPacketSideDataType {
1039
    AV_PKT_DATA_PALETTE,
1040
};
1041

  
1038 1042
typedef struct AVPacket {
1039 1043
    /**
1040 1044
     * Presentation timestamp in AVStream->time_base units; the time at which
......
1057 1061
    int   stream_index;
1058 1062
    int   flags;
1059 1063
    /**
1064
     * Additional packet data that can be provided by the container.
1065
     * Packet can contain several types of side information.
1066
     */
1067
    struct {
1068
        uint8_t *data;
1069
        int      size;
1070
        enum AVPacketSideDataType type;
1071
    } *side_data;
1072
    int side_data_elems;
1073

  
1074
    /**
1060 1075
     * Duration of this packet in AVStream->time_base units, 0 if unknown.
1061 1076
     * Equals next_pts - this_pts in presentation order.
1062 1077
     */
......
3202 3217
 */
3203 3218
void av_free_packet(AVPacket *pkt);
3204 3219

  
3220
/**
3221
 * Allocate new information of a packet.
3222
 *
3223
 * @param pkt packet
3224
 * @param type side information type
3225
 * @param size side information size
3226
 * @return pointer to fresh allocated data or NULL otherwise
3227
 */
3228
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
3229
                                 int size);
3230

  
3231
/**
3232
 * Get side information from packet.
3233
 *
3234
 * @param pkt packet
3235
 * @param type desired side information type
3236
 * @param size pointer for side information size to store (optional)
3237
 * @return pointer to data if present or NULL otherwise
3238
 */
3239
uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
3240
                                 int *size);
3241

  
3205 3242
/* resample.c */
3206 3243

  
3207 3244
struct ReSampleContext;

Also available in: Unified diff