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 CODEC_COMMON_INTERFACE_H 12 #define CODEC_COMMON_INTERFACE_H 13 14 #define __export 15 #define _export 16 #define dll_export __declspec( dllexport ) 17 #define dll_import __declspec( dllimport ) 18 19 // Playback ERROR Codes. 20 #define NO_DECODER_ERROR 0 21 #define REMOTE_DECODER_ERROR -1 22 23 #define DFR_BAD_DCT_COEFF -100 24 #define DFR_ZERO_LENGTH_FRAME -101 25 #define DFR_FRAME_SIZE_INVALID -102 26 #define DFR_OUTPUT_BUFFER_OVERFLOW -103 27 #define DFR_INVALID_FRAME_HEADER -104 28 #define FR_INVALID_MODE_TOKEN -110 29 #define ETR_ALLOCATION_ERROR -200 30 #define ETR_INVALID_ROOT_PTR -201 31 #define SYNCH_ERROR -400 32 #define BUFFER_UNDERFLOW_ERROR -500 33 #define PB_IB_OVERFLOW_ERROR -501 34 35 // External error triggers 36 #define PB_HEADER_CHECKSUM_ERROR -601 37 #define PB_DATA_CHECKSUM_ERROR -602 38 39 // DCT Error Codes 40 #define DDCT_EXPANSION_ERROR -700 41 #define DDCT_INVALID_TOKEN_ERROR -701 42 43 // exception_errors 44 #define GEN_EXCEPTIONS -800 45 #define EX_UNQUAL_ERROR -801 46 47 // Unrecoverable error codes 48 #define FATAL_PLAYBACK_ERROR -1000 49 #define GEN_ERROR_CREATING_CDC -1001 50 #define GEN_THREAD_CREATION_ERROR -1002 51 #define DFR_CREATE_BMP_FAILED -1003 52 53 // YUV buffer configuration structure 54 typedef struct 55 { 56 int y_width; 57 int y_height; 58 int y_stride; 59 60 int uv_width; 61 int uv_height; 62 int uv_stride; 63 64 unsigned char *y_buffer; 65 unsigned char *u_buffer; 66 unsigned char *v_buffer; 67 68 } YUV_BUFFER_CONFIG; 69 typedef enum 70 { 71 C_SET_KEY_FRAME, 72 C_SET_FIXED_Q, 73 C_SET_FIRSTPASS_FILE, 74 C_SET_EXPERIMENTAL_MIN, 75 C_SET_EXPERIMENTAL_MAX = C_SET_EXPERIMENTAL_MIN + 255, 76 C_SET_CHECKPROTECT, 77 C_SET_TESTMODE, 78 C_SET_INTERNAL_SIZE, 79 C_SET_RECOVERY_FRAME, 80 C_SET_REFERENCEFRAME, 81 C_SET_GOLDENFRAME 82 83 #ifndef VP50_COMP_INTERFACE 84 // Specialist test facilities. 85 // C_VCAP_PARAMS, // DO NOT USE FOR NOW WITH VFW CODEC 86 #endif 87 88 } C_SETTING; 89 90 typedef unsigned long C_SET_VALUE; 91 92 93 #endif 94