tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

video_writer.h (1674B)


      1 /*
      2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
      3 *
      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.
     10 */
     11 
     12 #ifndef AOM_COMMON_VIDEO_WRITER_H_
     13 #define AOM_COMMON_VIDEO_WRITER_H_
     14 
     15 #include "common/video_common.h"
     16 
     17 enum { kContainerIVF } UENUM1BYTE(AvxContainer);
     18 
     19 struct AvxVideoWriterStruct;
     20 typedef struct AvxVideoWriterStruct AvxVideoWriter;
     21 
     22 #ifdef __cplusplus
     23 extern "C" {
     24 #endif
     25 
     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);
     32 
     33 // Frees all resources associated with AvxVideoWriter* returned from
     34 // aom_video_writer_open() call.
     35 void aom_video_writer_close(AvxVideoWriter *writer);
     36 
     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);
     40 // Set fourcc.
     41 void aom_video_writer_set_fourcc(AvxVideoWriter *writer, uint32_t fourcc);
     42 
     43 #ifdef __cplusplus
     44 }  // extern "C"
     45 #endif
     46 
     47 #endif  // AOM_COMMON_VIDEO_WRITER_H_