OpenMAXBellagio  0.9.3
OMX_ContentPipe.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 The Khronos Group Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject
10  * to the following conditions:
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
30 #ifndef OMX_CONTENTPIPE_H
31 #define OMX_CONTENTPIPE_H
32 
33 #ifndef KD_EACCES
34 /* OpenKODE error codes. CPResult values may be zero (indicating success
35  or one of the following values) */
36 #define KD_EACCES (1)
37 #define KD_EADDRINUSE (2)
38 #define KD_EAGAIN (5)
39 #define KD_EBADF (7)
40 #define KD_EBUSY (8)
41 #define KD_ECONNREFUSED (9)
42 #define KD_ECONNRESET (10)
43 #define KD_EDEADLK (11)
44 #define KD_EDESTADDRREQ (12)
45 #define KD_ERANGE (35)
46 #define KD_EEXIST (13)
47 #define KD_EFBIG (14)
48 #define KD_EHOSTUNREACH (15)
49 #define KD_EINVAL (17)
50 #define KD_EIO (18)
51 #define KD_EISCONN (20)
52 #define KD_EISDIR (21)
53 #define KD_EMFILE (22)
54 #define KD_ENAMETOOLONG (23)
55 #define KD_ENOENT (24)
56 #define KD_ENOMEM (25)
57 #define KD_ENOSPC (26)
58 #define KD_ENOSYS (27)
59 #define KD_ENOTCONN (28)
60 #define KD_EPERM (33)
61 #define KD_ETIMEDOUT (36)
62 #define KD_EILSEQ (19)
63 #endif
64 
66 typedef OMX_U32 CPresult;
67 typedef char * CPstring;
68 typedef void * CPhandle;
69 typedef OMX_U32 CPuint;
70 typedef OMX_S32 CPint;
71 typedef char CPbyte;
72 typedef OMX_BOOL CPbool;
73 
77 typedef enum CP_ORIGINTYPE {
83  CP_OriginMax = 0X7FFFFFFF
85 
89 typedef enum CP_ACCESSTYPE {
95  CP_AccessMax = 0X7FFFFFFF
97 
102 {
117  CP_CheckBytesMax = 0X7FFFFFFF
119 
123 typedef enum CP_EVENTTYPE{
129  CP_EventMax = 0X7FFFFFFF
130 } CP_EVENTTYPE;
131 
135 typedef struct CP_PIPETYPE
136 {
138  CPresult (*Open)( CPhandle* hContent, CPstring szURI, CP_ACCESSTYPE eAccess );
139 
141  CPresult (*Close)( CPhandle hContent );
142 
144  CPresult (*Create)( CPhandle *hContent, CPstring szURI );
145 
147  CPresult (*CheckAvailableBytes)( CPhandle hContent, CPuint nBytesRequested, CP_CHECKBYTESRESULTTYPE *eResult );
148 
150  CPresult (*SetPosition)( CPhandle hContent, CPint nOffset, CP_ORIGINTYPE eOrigin);
151 
153  CPresult (*GetPosition)( CPhandle hContent, CPuint *pPosition);
154 
157  CPresult (*Read)( CPhandle hContent, CPbyte *pData, CPuint nSize);
158 
171  CPresult (*ReadBuffer)( CPhandle hContent, CPbyte **ppBuffer, CPuint *nSize, CPbool bForbidCopy);
172 
174  CPresult (*ReleaseReadBuffer)(CPhandle hContent, CPbyte *pBuffer);
175 
178  CPresult (*Write)( CPhandle hContent, CPbyte *data, CPuint nSize);
179 
183  CPresult (*GetWriteBuffer)( CPhandle hContent, CPbyte **ppBuffer, CPuint nSize);
184 
187  CPresult (*WriteBuffer)( CPhandle hContent, CPbyte *pBuffer, CPuint nFilledSize);
188 
190  CPresult (*RegisterCallback)( CPhandle hContent, CPresult (*ClientCallback)(CP_EVENTTYPE eEvent, CPuint iParam));
191 
192 } CP_PIPETYPE;
193 
194 #endif
195 
void * CPhandle
char * CPstring
unsigned long OMX_U32
Definition: OMX_Types.h:145
signed long OMX_S32
Definition: OMX_Types.h:148
CPresult(* Write)(CPhandle hContent, CPbyte *data, CPuint nSize)
CPresult(* ReadBuffer)(CPhandle hContent, CPbyte **ppBuffer, CPuint *nSize, CPbool bForbidCopy)
CP_CHECKBYTESRESULTTYPE
CPresult(* Read)(CPhandle hContent, CPbyte *pData, CPuint nSize)
OMX_BOOL CPbool
OMX_BOOL
Definition: OMX_Types.h:189
char CPbyte
CPresult(* ReleaseReadBuffer)(CPhandle hContent, CPbyte *pBuffer)
CP_EVENTTYPE
CPresult(* Close)(CPhandle hContent)
CP_ACCESSTYPE
CPresult(* WriteBuffer)(CPhandle hContent, CPbyte *pBuffer, CPuint nFilledSize)
CP_ORIGINTYPE
CPresult(* RegisterCallback)(CPhandle hContent, CPresult(*ClientCallback)(CP_EVENTTYPE eEvent, CPuint iParam))
OMX_U32 CPresult
struct CP_PIPETYPE CP_PIPETYPE
CPresult(* CheckAvailableBytes)(CPhandle hContent, CPuint nBytesRequested, CP_CHECKBYTESRESULTTYPE *eResult)
CPresult(* GetWriteBuffer)(CPhandle hContent, CPbyte **ppBuffer, CPuint nSize)
CPresult(* SetPosition)(CPhandle hContent, CPint nOffset, CP_ORIGINTYPE eOrigin)
OMX_U32 CPuint
CPresult(* Create)(CPhandle *hContent, CPstring szURI)
OMX_S32 CPint
CPresult(* GetPosition)(CPhandle hContent, CPuint *pPosition)
CPresult(* Open)(CPhandle *hContent, CPstring szURI, CP_ACCESSTYPE eAccess)

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo