2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 #ifndef VIDEO_WRITER_H_
13 #define VIDEO_WRITER_H_
15 #include "./video_common.h"
17 typedef enum { kContainerIVF
} AvxContainer
;
19 struct AvxVideoWriterStruct
;
20 typedef struct AvxVideoWriterStruct AvxVideoWriter
;
26 // Finds and opens writer for specified container format.
27 // Returns an opaque AvxVideoWriter* upon success, or NULL upon failure.
28 // Right now only IVF format is supported.
29 AvxVideoWriter
*aom_video_writer_open(const char *filename
,
30 AvxContainer container
,
31 const AvxVideoInfo
*info
);
33 // Frees all resources associated with AvxVideoWriter* returned from
34 // aom_video_writer_open() call.
35 void aom_video_writer_close(AvxVideoWriter
*writer
);
37 // Writes frame bytes to the file.
38 int aom_video_writer_write_frame(AvxVideoWriter
*writer
, const uint8_t *buffer
,
39 size_t size
, int64_t pts
);
45 #endif // VIDEO_WRITER_H_