FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vda_vt_internal.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 
19 #ifndef AVCODEC_VDA_VT_INTERNAL_H
20 #define AVCODEC_VDA_VT_INTERNAL_H
21 
22 void ff_vda_output_callback(void *vda_hw_ctx,
23  CFDictionaryRef user_info,
24  OSStatus status,
25  uint32_t infoFlags,
26  CVImageBufferRef image_buffer);
27 
30 
31 typedef struct VTContext {
32  // The current bitstream buffer.
34 
35  // The current size of the bitstream.
37 
38  // The reference size used for fast reallocation.
40 
41  // The core video buffer
42  CVImageBufferRef frame;
43 
44  // Current dummy frames context (depends on exact CVImageBufferRef params).
46 
47  // Non-NULL if the new hwaccel API is used. This is only a separate struct
48  // to ease compatibility with the old API.
50 } VTContext;
51 
56  const uint8_t *buffer,
57  uint32_t size);
59  const uint8_t *buffer,
60  uint32_t size);
63 #endif /* AVCODEC_VDA_VT_INTERNAL_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:201
uint8_t * bitstream
void ff_vda_output_callback(void *vda_hw_ctx, CFDictionaryRef user_info, OSStatus status, uint32_t infoFlags, CVImageBufferRef image_buffer)
Definition: vda_h264.c:273
CFDataRef ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx)
Definition: videotoolbox.c:90
uint8_t
int ff_videotoolbox_uninit(AVCodecContext *avctx)
Definition: videotoolbox.c:343
static AVFrame * frame
int ff_videotoolbox_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
Definition: videotoolbox.c:75
ptrdiff_t size
Definition: opengl_enc.c:101
int allocated_size
void ff_vda_default_free(AVCodecContext *avctx)
int ff_videotoolbox_buffer_create(VTContext *vtctx, AVFrame *frame)
Definition: videotoolbox.c:281
int bitstream_size
int ff_videotoolbox_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: videotoolbox.c:316
CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx)
Definition: videotoolbox.c:123
main external API structure.
Definition: avcodec.h:1761
int ff_vda_default_init(AVCodecContext *avctx)
Definition: vda_h264.c:330
A reference to a data buffer.
Definition: buffer.h:81
struct AVVideotoolboxContext * vt_ctx
int ff_videotoolbox_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: videotoolbox.c:300
struct AVBufferRef * cached_hw_frames_ctx
This struct holds all the information that needs to be passed between the caller and libavcodec for i...
Definition: videotoolbox.h:46
GLuint buffer
Definition: opengl_enc.c:102
CVImageBufferRef frame