FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavcodec
mediacodecdec.h
Go to the documentation of this file.
1
/*
2
* Android MediaCodec decoder
3
*
4
* Copyright (c) 2015-2016 Matthieu Bouron <matthieu.bouron stupeflix.com>
5
*
6
* This file is part of FFmpeg.
7
*
8
* FFmpeg is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* FFmpeg is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with FFmpeg; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*/
22
23
#ifndef AVCODEC_MEDIACODECDEC_H
24
#define AVCODEC_MEDIACODECDEC_H
25
26
#include <stdint.h>
27
#include <sys/types.h>
28
29
#include "
libavutil/frame.h
"
30
#include "
libavutil/pixfmt.h
"
31
32
#include "
avcodec.h
"
33
#include "
mediacodec_wrapper.h
"
34
35
typedef
struct
MediaCodecDecContext
{
36
37
char
*
codec_name
;
38
39
FFAMediaCodec
*
codec
;
40
FFAMediaFormat
*
format
;
41
42
int
started
;
43
int
flushing
;
44
int
eos
;
45
46
int
width
;
47
int
height
;
48
int
stride
;
49
int
slice_height
;
50
int
color_format
;
51
enum
AVPixelFormat
pix_fmt
;
52
int
crop_top
;
53
int
crop_bottom
;
54
int
crop_left
;
55
int
crop_right
;
56
57
uint64_t
dequeued_buffer_nb
;
58
59
int
first_buffer
;
60
double
first_buffer_at
;
61
62
}
MediaCodecDecContext
;
63
64
int
ff_mediacodec_dec_init
(
AVCodecContext
*avctx,
65
MediaCodecDecContext
*
s
,
66
const
char
*mime,
67
FFAMediaFormat
*
format
);
68
69
int
ff_mediacodec_dec_decode
(
AVCodecContext
*avctx,
70
MediaCodecDecContext
*
s
,
71
AVFrame
*
frame
,
72
int
*got_frame,
73
AVPacket
*
pkt
);
74
75
int
ff_mediacodec_dec_flush
(
AVCodecContext
*avctx,
76
MediaCodecDecContext
*
s
);
77
78
int
ff_mediacodec_dec_close
(
AVCodecContext
*avctx,
79
MediaCodecDecContext
*
s
);
80
81
#endif
/* AVCODEC_MEDIACODECDEC_H */
mediacodec_wrapper.h
s
const char * s
Definition:
avisynth_c.h:631
AVFrame
This structure describes decoded (raw) audio or video data.
Definition:
frame.h:184
MediaCodecDecContext
Definition:
mediacodecdec.h:35
MediaCodecDecContext::stride
int stride
Definition:
mediacodecdec.h:48
MediaCodecDecContext::eos
int eos
Definition:
mediacodecdec.h:44
MediaCodecDecContext::height
int height
Definition:
mediacodecdec.h:47
FFAMediaFormat
Definition:
mediacodec_wrapper.c:150
ff_mediacodec_dec_flush
int ff_mediacodec_dec_flush(AVCodecContext *avctx, MediaCodecDecContext *s)
Definition:
mediacodecdec.c:543
pkt
static AVPacket pkt
Definition:
demuxing_decoding.c:54
ff_mediacodec_dec_init
int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s, const char *mime, FFAMediaFormat *format)
Definition:
mediacodecdec.c:307
MediaCodecDecContext::width
int width
Definition:
mediacodecdec.h:46
frame
static AVFrame * frame
Definition:
demuxing_decoding.c:53
MediaCodecDecContext::crop_right
int crop_right
Definition:
mediacodecdec.h:55
MediaCodecDecContext::started
int started
Definition:
mediacodecdec.h:42
ff_mediacodec_dec_close
int ff_mediacodec_dec_close(AVCodecContext *avctx, MediaCodecDecContext *s)
Definition:
mediacodecdec.c:565
MediaCodecDecContext::pix_fmt
enum AVPixelFormat pix_fmt
Definition:
mediacodecdec.h:51
frame.h
reference-counted frame API
MediaCodecDecContext::color_format
int color_format
Definition:
mediacodecdec.h:50
MediaCodecDecContext::crop_bottom
int crop_bottom
Definition:
mediacodecdec.h:53
MediaCodecDecContext::flushing
int flushing
Definition:
mediacodecdec.h:43
MediaCodecDecContext::crop_left
int crop_left
Definition:
mediacodecdec.h:54
avcodec.h
Libavcodec external API header.
AVCodecContext
main external API structure.
Definition:
avcodec.h:1649
ff_mediacodec_dec_decode
int ff_mediacodec_dec_decode(AVCodecContext *avctx, MediaCodecDecContext *s, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition:
mediacodecdec.c:377
format
static const char * format
Definition:
movenc.c:47
MediaCodecDecContext::first_buffer
int first_buffer
Definition:
mediacodecdec.h:59
MediaCodecDecContext::codec
FFAMediaCodec * codec
Definition:
mediacodecdec.h:39
MediaCodecDecContext::format
FFAMediaFormat * format
Definition:
mediacodecdec.h:40
FFAMediaCodec
Definition:
mediacodec_wrapper.c:262
MediaCodecDecContext::crop_top
int crop_top
Definition:
mediacodecdec.h:52
pixfmt.h
pixel format definitions
MediaCodecDecContext::first_buffer_at
double first_buffer_at
Definition:
mediacodecdec.h:60
MediaCodecDecContext::slice_height
int slice_height
Definition:
mediacodecdec.h:49
MediaCodecDecContext::dequeued_buffer_nb
uint64_t dequeued_buffer_nb
Definition:
mediacodecdec.h:57
AVPixelFormat
AVPixelFormat
Pixel format.
Definition:
pixfmt.h:60
AVPacket
This structure stores compressed data.
Definition:
avcodec.h:1557
MediaCodecDecContext::codec_name
char * codec_name
Definition:
mediacodecdec.h:37
Generated on Mon Jun 27 2016 02:34:37 for FFmpeg by
1.8.6