FFmpeg
Loading...
Searching...
No Matches
hw_base_encode.c
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#include <stdio.h>
20
22
23int main(void)
24{
25 AVCodecContext avctx = { 0 };
26
27 for (int delay = 0; delay <= 3; delay++) {
28 for (int count = 0; count <= 4; count++) {
29 FFHWBaseEncodePicture pic = { 0 };
31 int ret;
32
33 ctx.decode_delay = delay;
34 ctx.input_order = count;
35 ctx.first_pts = 100;
36 if (count) {
37 pic.pts = ctx.first_pts + 10 * (count - 1);
38 ctx.pic_end = &pic;
39 }
40 if (count > delay)
41 ctx.dts_pts_diff = 10 * delay;
42
44 printf("delay=%d frames=%d return=%d eof=%d pts_diff=%"PRId64"\n",
45 delay, count, ret, ctx.end_of_stream, ctx.dts_pts_diff);
46 }
47 }
48 return 0;
49}
static AVFormatContext * ctx
#define NULL
Definition coverity.c:32
__device__ int printf(const char *,...)
int ret
Definition ffplay.c:391
static int hw_base_encode_send_frame(AVCodecContext *avctx, FFHWBaseEncodeContext *ctx, AVFrame *frame)
main external API structure.
Definition avcodec.h:443
int main(void)