Libav
frame.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of Libav.
4  *
5  * Libav is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * Libav is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with Libav; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
26 #ifndef AVUTIL_FRAME_H
27 #define AVUTIL_FRAME_H
28 
29 #include <stdint.h>
30 
31 #include "avutil.h"
32 #include "buffer.h"
33 #include "dict.h"
34 #include "rational.h"
35 #include "samplefmt.h"
36 #include "version.h"
37 
38 
72 };
73 
74 typedef struct AVFrameSideData {
77  int size;
80 
107 typedef struct AVFrame {
108 #define AV_NUM_DATA_POINTERS 8
109 
114 
126 
142 
146  int width, height;
147 
152 
158  int format;
159 
164 
169 
170 #if FF_API_AVFRAME_LAVC
173 #endif
174 
179 
183  int64_t pts;
184 
188  int64_t pkt_pts;
189 
193  int64_t pkt_dts;
194 
203 
207  int quality;
208 
209 #if FF_API_AVFRAME_LAVC
212 
217  int8_t *qscale_table;
222  int qstride;
223 
226 
233 
245  int16_t (*motion_val[2])[2];
246 
252  uint32_t *mb_type;
253 
258  short *dct_coeff;
259 
265  int8_t *ref_index[2];
266 #endif
267 
271  void *opaque;
272 
277 
278 #if FF_API_AVFRAME_LAVC
280  int type;
281 #endif
282 
288 
293 
298 
303 
304 #if FF_API_AVFRAME_LAVC
307 
313 #endif
314 
325 
326 #if FF_API_AVFRAME_LAVC
327 
331 
336 
343 #endif
344 
349 
353  uint64_t channel_layout;
354 
366 
384 
387 
398 #define AV_FRAME_FLAG_CORRUPT (1 << 0)
399 
406  int flags;
407 } AVFrame;
408 
419 AVFrame *av_frame_alloc(void);
420 
428 void av_frame_free(AVFrame **frame);
429 
441 int av_frame_ref(AVFrame *dst, const AVFrame *src);
442 
450 AVFrame *av_frame_clone(const AVFrame *src);
451 
455 void av_frame_unref(AVFrame *frame);
456 
460 void av_frame_move_ref(AVFrame *dst, AVFrame *src);
461 
479 int av_frame_get_buffer(AVFrame *frame, int align);
480 
493 int av_frame_is_writable(AVFrame *frame);
494 
506 int av_frame_make_writable(AVFrame *frame);
507 
516 int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
517 
526 AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
527 
538  enum AVFrameSideDataType type,
539  int size);
540 
546  enum AVFrameSideDataType type);
547 
552 #endif /* AVUTIL_FRAME_H */