blob: fa5a52eaf10930fa3c19b39d667a95714ff64f50 [file] [log] [blame]
Tom Finegan2abe2d42013-11-18 14:39:51 -08001/*
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10#ifndef WEBMDEC_H_
11#define WEBMDEC_H_
12
13#include "./tools_common.h"
14
James Zern25cfd8e2014-01-18 12:16:11 -080015#ifdef __cplusplus
16extern "C" {
17#endif
18
Tom Finegan2abe2d42013-11-18 14:39:51 -080019struct nestegg;
20struct nestegg_packet;
21struct VpxInputContext;
22
23struct WebmInputContext {
24 uint32_t chunk;
25 uint32_t chunks;
26 uint32_t video_track;
27 struct nestegg *nestegg_ctx;
28 struct nestegg_packet *pkt;
29};
30
31int file_is_webm(struct WebmInputContext *webm_ctx,
32 struct VpxInputContext *vpx_ctx);
33
34int webm_read_frame(struct WebmInputContext *webm_ctx,
35 uint8_t **buffer,
36 size_t *bytes_in_buffer,
37 size_t *buffer_size);
38
39int webm_guess_framerate(struct WebmInputContext *webm_ctx,
40 struct VpxInputContext *vpx_ctx);
41
42void webm_free(struct WebmInputContext *webm_ctx);
43
James Zern25cfd8e2014-01-18 12:16:11 -080044#ifdef __cplusplus
45} // extern "C"
46#endif
47
Tom Finegan2abe2d42013-11-18 14:39:51 -080048#endif // WEBMDEC_H_