Miam-Player  0.8.0
A nice music player
frame.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
25 #ifndef AVUTIL_FRAME_H
26 #define AVUTIL_FRAME_H
27 
28 #include <stdint.h>
29 
30 #include "avutil.h"
31 #include "buffer.h"
32 #include "dict.h"
33 #include "rational.h"
34 #include "samplefmt.h"
35 #include "pixfmt.h"
36 #include "version.h"
37 
38 
124 };
125 
134 };
135 
136 
143 typedef struct AVFrameSideData {
145  uint8_t *data;
146  int size;
150 
184 typedef struct AVFrame {
185 #define AV_NUM_DATA_POINTERS 8
186 
199 
215  int linesize[AV_NUM_DATA_POINTERS];
216 
231  uint8_t **extended_data;
232 
236  int width, height;
237 
242 
248  int format;
249 
254 
258  enum AVPictureType pict_type;
259 
264 
268  int64_t pts;
269 
270 #if FF_API_PKT_PTS
271 
276  int64_t pkt_pts;
277 #endif
278 
284  int64_t pkt_dts;
285 
294 
298  int quality;
299 
303  void *opaque;
304 
305 #if FF_API_ERROR_FRAME
306 
310  uint64_t error[AV_NUM_DATA_POINTERS];
311 #endif
312 
318 
323 
328 
333 
344 
349 
353  uint64_t channel_layout;
354 
368 
386 
389 
401 #define AV_FRAME_FLAG_CORRUPT (1 << 0)
402 
405 #define AV_FRAME_FLAG_DISCARD (1 << 2)
406 
413  int flags;
414 
422  enum AVColorRange color_range;
423 
424  enum AVColorPrimaries color_primaries;
425 
427 
435  enum AVColorSpace colorspace;
436 
437  enum AVChromaLocation chroma_location;
438 
447 
455  int64_t pkt_pos;
456 
465  int64_t pkt_duration;
466 
475 
486 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
487 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
488 
496  int channels;
497 
506  int pkt_size;
507 
508 #if FF_API_FRAME_QP
509 
514  int8_t *qscale_table;
520  int qstride;
521 
524 
529 #endif
530 
535 } AVFrame;
536 
542 int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
543 void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
544 int64_t av_frame_get_pkt_duration (const AVFrame *frame);
545 void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
546 int64_t av_frame_get_pkt_pos (const AVFrame *frame);
547 void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
548 int64_t av_frame_get_channel_layout (const AVFrame *frame);
549 void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
550 int av_frame_get_channels (const AVFrame *frame);
551 void av_frame_set_channels (AVFrame *frame, int val);
552 int av_frame_get_sample_rate (const AVFrame *frame);
553 void av_frame_set_sample_rate (AVFrame *frame, int val);
555 void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
556 int av_frame_get_decode_error_flags (const AVFrame *frame);
557 void av_frame_set_decode_error_flags (AVFrame *frame, int val);
558 int av_frame_get_pkt_size(const AVFrame *frame);
559 void av_frame_set_pkt_size(AVFrame *frame, int val);
561 #if FF_API_FRAME_QP
562 int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
563 int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
564 #endif
565 enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);
566 void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val);
568 void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
569 
574 const char *av_get_colorspace_name(enum AVColorSpace val);
575 
586 AVFrame *av_frame_alloc(void);
587 
595 void av_frame_free(AVFrame **frame);
596 
612 int av_frame_ref(AVFrame *dst, const AVFrame *src);
613 
621 AVFrame *av_frame_clone(const AVFrame *src);
622 
626 void av_frame_unref(AVFrame *frame);
627 
635 void av_frame_move_ref(AVFrame *dst, AVFrame *src);
636 
658 int av_frame_get_buffer(AVFrame *frame, int align);
659 
672 int av_frame_is_writable(AVFrame *frame);
673 
685 int av_frame_make_writable(AVFrame *frame);
686 
698 int av_frame_copy(AVFrame *dst, const AVFrame *src);
699 
708 int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
709 
718 AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
719 
731  int size);
732 
739 
745 
750 
755 #endif /* AVUTIL_FRAME_H */
void av_frame_set_channels(AVFrame *frame, int val)
int coded_picture_number
Definition: frame.h:289
int av_frame_get_sample_rate(const AVFrame *frame)
int channels
Definition: frame.h:496
int64_t av_frame_get_pkt_duration(const AVFrame *frame)
int av_frame_get_pkt_size(const AVFrame *frame)
int64_t pts
Definition: frame.h:268
Definition: frame.h:112
int key_frame
Definition: frame.h:253
int quality
Definition: frame.h:298
Definition: frame.h:130
enum AVColorRange av_frame_get_color_range(const AVFrame *frame)
AVBufferRef * hw_frames_ctx
Definition: frame.h:534
AVFrameSideData ** side_data
Definition: frame.h:387
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type)
void av_frame_set_pkt_duration(AVFrame *frame, int64_t val)
Definition: buffer.h:81
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
AVBufferRef ** extended_buf
Definition: frame.h:381
int size
Definition: frame.h:146
void av_frame_set_pkt_size(AVFrame *frame, int val)
int8_t * av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
Definition: frame.h:184
Definition: frame.h:127
attribute_deprecated int64_t pkt_pts
Definition: frame.h:276
AVColorTransferCharacteristic
Definition: pixfmt.h:410
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
int display_picture_number
Definition: frame.h:293
Definition: frame.h:131
int64_t reordered_opaque
Definition: frame.h:343
AVFrame * av_frame_alloc(void)
AVColorSpace
Definition: pixfmt.h:436
attribute_deprecated int qstride
Definition: frame.h:520
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Definition: frame.h:51
void av_frame_set_metadata(AVFrame *frame, AVDictionary *val)
AVDictionary * metadata
Definition: frame.h:147
enum AVFrameSideDataType type
Definition: frame.h:144
AVBufferRef * qp_table_buf
Definition: frame.h:528
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val)
AVColorRange
Definition: pixfmt.h:457
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame)
int64_t pkt_dts
Definition: frame.h:284
AVColorPrimaries
Definition: pixfmt.h:389
int pkt_size
Definition: frame.h:506
Definition: frame.h:88
Definition: frame.h:71
int nb_side_data
Definition: frame.h:388
int64_t pkt_pos
Definition: frame.h:455
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val)
int repeat_pict
Definition: frame.h:317
void av_frame_set_channel_layout(AVFrame *frame, int64_t val)
attribute_deprecated int8_t * qscale_table
Definition: frame.h:514
Definition: frame.h:143
void av_frame_free(AVFrame **frame)
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
struct AVFrameSideData AVFrameSideData
Definition: frame.h:57
struct AVDictionary AVDictionary
Definition: dict.h:90
struct AVFrame AVFrame
int av_frame_get_decode_error_flags(const AVFrame *frame)
int top_field_first
Definition: frame.h:327
Definition: frame.h:123
int interlaced_frame
Definition: frame.h:322
Definition: frame.h:133
int av_frame_copy(AVFrame *dst, const AVFrame *src)
int flags
Definition: frame.h:413
void * opaque
Definition: frame.h:303
uint64_t channel_layout
Definition: frame.h:353
int64_t pkt_duration
Definition: frame.h:465
uint8_t * data
Definition: frame.h:145
Definition: frame.h:95
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
void av_frame_set_pkt_pos(AVFrame *frame, int64_t val)
AVFrameSideDataType
Definition: frame.h:47
int nb_samples
Definition: frame.h:241
AVBufferRef * buf
Definition: frame.h:148
const char * av_get_colorspace_name(enum AVColorSpace val)
AVFrame * av_frame_clone(const AVFrame *src)
AVDictionary * metadata
Definition: frame.h:474
Definition: frame.h:132
AVDictionary ** avpriv_frame_get_metadatap(AVFrame *frame)
Definition: frame.h:83
int av_frame_is_writable(AVFrame *frame)
int palette_has_changed
Definition: frame.h:332
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
int64_t best_effort_timestamp
Definition: frame.h:446
int decode_error_flags
Definition: frame.h:485
AVDictionary * av_frame_get_metadata(const AVFrame *frame)
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame)
int av_frame_get_channels(const AVFrame *frame)
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
#define AV_NUM_DATA_POINTERS
Definition: frame.h:185
void av_frame_set_decode_error_flags(AVFrame *frame, int val)
attribute_deprecated int qscale_type
Definition: frame.h:523
AVPictureType
Definition: avutil.h:266
Definition: frame.h:129
AVActiveFormatDescription
Definition: frame.h:126
int nb_extended_buf
Definition: frame.h:385
int format
Definition: frame.h:248
Definition: rational.h:58
int64_t av_frame_get_channel_layout(const AVFrame *frame)
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
int av_frame_get_buffer(AVFrame *frame, int align)
void av_frame_unref(AVFrame *frame)
int av_frame_make_writable(AVFrame *frame)
#define attribute_deprecated
Definition: attributes.h:98
int width
Definition: frame.h:236
Definition: frame.h:128
int sample_rate
Definition: frame.h:348
int64_t av_frame_get_pkt_pos(const AVFrame *frame)
void av_frame_set_sample_rate(AVFrame *frame, int val)
uint8_t ** extended_data
Definition: frame.h:231
AVRational sample_aspect_ratio
Definition: frame.h:263
AVChromaLocation
Definition: pixfmt.h:479
Definition: frame.h:107
Definition: frame.h:75
Definition: frame.h:62
Definition: frame.h:66
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)