m4vh263_decoder_pv_types.h revision 3306cfee3bf38ab207a0504e49c2d492bb73ffbf
1/* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------$
17 */
18
19#ifndef M4V_H263_DECODER_PV_TYPES_H_
20#define M4V_H263_DECODER_PV_TYPES_H_
21
22#include <stdint.h>
23#include <string.h>
24
25// Redefine the int types
26typedef uint8_t uint8;
27typedef uint16_t uint16;
28typedef int16_t int16;
29typedef uint32_t uint32;
30typedef int32_t int32;
31typedef unsigned int uint;
32
33// Redefine the oscl memory management routines
34#define oscl_memcpy memcpy
35#define oscl_memset memset
36#define oscl_malloc malloc
37#define oscl_free free
38#define oscl_memcmp memcmp
39#define OSCL_DELETE(ptr) { delete(ptr); }
40
41// Request status values.  These are negative so that
42// they won't conflict with system error codes.
43const int32 OSCL_REQUEST_ERR_NONE = 0;
44const int32 OSCL_REQUEST_PENDING = (-0x7fffffff);
45const int32 OSCL_REQUEST_ERR_CANCEL = (-1);
46const int32 OSCL_REQUEST_ERR_GENERAL = (-2);
47
48// Request status type
49class OsclAOStatus
50{
51    public:
52        OsclAOStatus();
53        OsclAOStatus(int32 aStatus);
54        int32 operator=(int32 aStatus);
55        int32 operator==(int32 aStatus) const;
56        int32 operator!=(int32 aStatus) const;
57        int32 operator>=(int32 aStatus) const;
58        int32 operator<=(int32 aStatus) const;
59        int32 operator>(int32 aStatus) const;
60        int32 operator<(int32 aStatus) const;
61        int32 Value() const;
62    private:
63        int32 iStatus;
64};
65
66#endif  // M4V_H263_DECODER_PV_TYPES_H_
67