1 /*
2  *  Copyright (c) 2010 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 
11 #ifndef VPX_VP8_COMMON_ONYXD_H_
12 #define VPX_VP8_COMMON_ONYXD_H_
13 
14 /* Create/destroy static data structures. */
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 #include "vpx_scale/yv12config.h"
19 #include "ppflags.h"
20 #include "vpx_ports/mem.h"
21 #include "vpx/vpx_codec.h"
22 #include "vpx/vp8.h"
23 
24 struct VP8D_COMP;
25 struct VP8Common;
26 
27 typedef struct {
28   int Width;
29   int Height;
30   int Version;
31   int postprocess;
32   int max_threads;
33   int error_concealment;
34 } VP8D_CONFIG;
35 
36 typedef enum { VP8D_OK = 0 } VP8D_SETTING;
37 
38 void vp8dx_initialize(void);
39 
40 void vp8dx_set_setting(struct VP8D_COMP *comp, VP8D_SETTING oxst, int x);
41 
42 int vp8dx_get_setting(struct VP8D_COMP *comp, VP8D_SETTING oxst);
43 
44 int vp8dx_receive_compressed_data(struct VP8D_COMP *pbi, int64_t time_stamp);
45 int vp8dx_get_raw_frame(struct VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd,
46                         int64_t *time_stamp, int64_t *time_end_stamp,
47                         vp8_ppflags_t *flags);
48 int vp8dx_references_buffer(struct VP8Common *oci, int ref_frame);
49 
50 vpx_codec_err_t vp8dx_get_reference(struct VP8D_COMP *pbi,
51                                     enum vpx_ref_frame_type ref_frame_flag,
52                                     YV12_BUFFER_CONFIG *sd);
53 vpx_codec_err_t vp8dx_set_reference(struct VP8D_COMP *pbi,
54                                     enum vpx_ref_frame_type ref_frame_flag,
55                                     YV12_BUFFER_CONFIG *sd);
56 int vp8dx_get_quantizer(const struct VP8D_COMP *pbi);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif  // VPX_VP8_COMMON_ONYXD_H_
63