1:
9:
10:
14:
15:
#ifndef GVD_API_PARAMS_H
16:
#define GVD_API_PARAMS_H
17:
18:
19:
#include <stdint.h>
20:
#include <stddef.h>
21:
22:
#include "gvd_error.h"
23:
24:
#ifndef GVD_MAX_ENUM
25:
26:
#define GVD_MAX_ENUM 0x7FFFFFFF
27:
#endif
28:
29:
30:
typedef int32_t (*
gvdCbFunc)(
void *,
void *,
gvdError);
31:
32:
33:
#define GVD_BUFFLAG_START (1 << 0)
34:
35:
36:
#define GVD_BUFFLAG_END (1 << 1)
37:
38:
40:
typedef struct {
41:
void *buffer;
42: int32_t size_buffer;
43: int32_t offset_data;
44: int32_t size_data;
45: int32_t seekid;
46: uint32_t timestamp;
47: uint32_t flags;
48: }
gvdInBufInfo;
49:
50:
52:
typedef struct {
53:
void *buffer;
54: int32_t size_buffer;
55: int32_t width;
56: int32_t height;
57: }
gvdOutBufInfo;
58:
59:
60:
typedef struct {
61:
void *buffer;
62: int32_t size_filled;
63: int32_t size_buffer;
64: int32_t timestamp;
65: int32_t seekid;
66: uint32_t frame_count;
67: uint32_t flags;
68: }
gvdFrameInfo;
69:
70:
71:
typedef struct {
72:
void *buffer;
73: int32_t size;
74: }
gvdDiscardBufInfo;
75:
76:
77:
typedef struct {
78: int32_t width;
79: int32_t height;
80: int32_t buf_count;
81: size_t buf_size;
82: }
gvdFrameSize;
83:
84:
typedef uint64_t
gvdStreamPosition;
85:
86:
87:
typedef struct {
88:
gvdError error;
89:
gvdStreamPosition pos;
90: int32_t seekid;
91: uint32_t frame_count;
92: }
gvdDecError;
93:
94:
95:
typedef struct {
96: uint32_t timestamp_ms;
97: uint32_t frame_id;
98: uint32_t index;
99: }
gvdTimeStamp;
100:
101:
102:
typedef enum {
103: GVD_SEEK_BUFINDEX_ABSOLUTE,
104: GVD_SEEK_BUFINDEX_RELATIVE,
105: GVD_SEEK_IMMEDIATE,
106: GVD_SEEK_FORCE_SIZE =
GVD_MAX_ENUM
107: }
gvdSeekType;
108:
109:
110:
typedef struct {
111:
gvdSeekType type;
112: int32_t index_offset;
113: uint32_t immediate_frame;
114: uint32_t immediate_byte;
115: }
gvdSeekParam;
116:
117:
118:
typedef enum {
119: GVD_SEEKPOS_SUCCESS,
120: GVD_SEEKPOS_ERROR,
121: GVD_SEEKPOS_FORCE_SIZE =
GVD_MAX_ENUM
122: }
gvdSeekPosResult;
123:
124:
125:
typedef struct {
126: uint32_t index;
127: uint32_t frame_id;
128: uint32_t stream_pos;
129:
gvdSeekPosResult result;
130: }
gvdSeekPosInfo;
131:
132:
137:
typedef struct {
138:
gvdCbFunc func_notify_fatalerror;
139:
void *param_notify_fatalerror;
140: uint32_t vramaddr_mask;
141: uint32_t bmuaddr_mask;
142: uint32_t stream_buf_size;
143: uint32_t stream_buf_num;
144: uint32_t stream_num;
145: }
gvdInitializeParam;
146:
147:
148:
typedef struct {
149: uint32_t frame_id;
150: uint32_t stream_pos;
151: }
gvdPositionBuffer;
152:
153:
#endif