1/*************************************************************************************
2 * INTEL CONFIDENTIAL
3 * Copyright 2008-2009 Intel Corporation All Rights Reserved.
4 * The source code contained or described herein and all documents related
5 * to the source code ("Material") are owned by Intel Corporation or its
6 * suppliers or licensors. Title to the Material remains with Intel
7 * Corporation or its suppliers and licensors. The Material contains trade
8 * secrets and proprietary and confidential information of Intel or its
9 * suppliers and licensors. The Material is protected by worldwide copyright
10 * and trade secret laws and treaty provisions. No part of the Material may
11 * be used, copied, reproduced, modified, published, uploaded, posted,
12 * transmitted, distributed, or disclosed in any way without Intel’s prior
13 * express written permission.
14 *
15 * No license under any patent, copyright, trade secret or other intellectual
16 * property right is granted to or conferred upon you by disclosure or delivery
17 * of the Materials, either expressly, by implication, inducement, estoppel or
18 * otherwise. Any license under such intellectual property rights must be express
19 * and approved by Intel in writing.
20 ************************************************************************************/
21
22#ifndef MIX_RESULT_H
23#define MIX_RESULT_H
24
25#include <glib.h>
26
27typedef gint32 MIX_RESULT;
28
29#define MIX_SUCCEEDED(result_code) ((((MIX_RESULT)(result_code)) & 0x80000000) == 0)
30
31typedef enum {
32	/** General success */
33	MIX_RESULT_SUCCESS 				= 	(MIX_RESULT) 0x00000000,
34        MIX_RESULT_SUCCESS_CHG = (MIX_RESULT)0x00000001,
35
36	/** Module specific success starting number */
37
38	/** Starting success number for Audio */
39	MIX_RESULT_SUCCESS_AUDIO_START			=	(MIX_RESULT) 0x00010000,
40	/** Starting success number for Video */
41	MIX_RESULT_SUCCESS_VIDEO_START			=	(MIX_RESULT) 0x00020000,
42	/** Starting success number for DRM */
43	MIX_RESULT_SUCCESS_DRM_START			= 	(MIX_RESULT) 0x00030000
44} MIX_SUCCESS_COMMON;
45
46typedef enum {
47	/** General failure */
48	MIX_RESULT_FAIL					= 	(MIX_RESULT) 0x80000000,
49	MIX_RESULT_NULL_PTR				=	(MIX_RESULT) 0x80000001,
50	MIX_RESULT_LPE_NOTAVAIL			= 	(MIX_RESULT) 0X80000002,
51	MIX_RESULT_DIRECT_NOTAVAIL		=	(MIX_RESULT) 0x80000003,
52	MIX_RESULT_NOT_SUPPORTED		=	(MIX_RESULT) 0x80000004,
53	MIX_RESULT_CONF_MISMATCH		=	(MIX_RESULT) 0x80000005,
54	MIX_RESULT_RESUME_NEEDED		=	(MIX_RESULT) 0x80000007,
55	MIX_RESULT_WRONGMODE			= 	(MIX_RESULT) 0x80000008,
56	MIX_RESULT_RESOURCES_NOTAVAIL = (MIX_RESULT)0x80000009,
57        MIX_RESULT_INVALID_PARAM = (MIX_RESULT)0x8000000a,
58        MIX_RESULT_ALREADY_INIT = (MIX_RESULT)0x8000000b,
59        MIX_RESULT_WRONG_STATE = (MIX_RESULT)0x8000000c,
60        MIX_RESULT_NOT_INIT = (MIX_RESULT)0x8000000d,
61        MIX_RESULT_NOT_CONFIGURED = (MIX_RESULT)0x8000000e,
62        MIX_RESULT_STREAM_NOTAVAIL = (MIX_RESULT)0x8000000f,
63        MIX_RESULT_CODEC_NOTAVAIL = (MIX_RESULT)0x80000010,
64        MIX_RESULT_CODEC_NOTSUPPORTED = (MIX_RESULT)0x80000011,
65        MIX_RESULT_INVALID_COUNT = (MIX_RESULT)0x80000012,
66        MIX_RESULT_NOT_ACP = (MIX_RESULT)0x80000013,
67	MIX_RESULT_INVALID_DECODE_MODE = (MIX_RESULT)0x80000014,
68        MIX_RESULT_INVALID_STREAM_NAME = (MIX_RESULT)0x80000015,
69        MIX_RESULT_NO_MEMORY = (MIX_RESULT)0x80000016,
70        MIX_RESULT_NEED_RETRY = (MIX_RESULT)0x80000017,
71        MIX_RESULT_SYSTEM_ERRNO = (MIX_RESULT)0x80000018,
72
73	/** Module specific errors starting number */
74
75	/** Starting error number for Audio */
76	MIX_RESULT_ERROR_AUDIO_START			=	(MIX_RESULT) 0x80010000,
77	/** Starting error number for Video */
78	MIX_RESULT_ERROR_VIDEO_START			=	(MIX_RESULT) 0x80020000,
79	/** Starting error number for DRM */
80	MIX_RESULT_ERROR_DRM_START				= 	(MIX_RESULT) 0x80030000
81} MIX_ERROR_COMMON;
82
83  /* New success code should be added just above this line */
84//  MIX_RESULT_IAM_DISABLED,            /* 0x80000008 */
85//  MIX_RESULT_IAM_NOTAVAIL,            /* 0x80000009 */
86//  MIX_RESULT_IAM_REG_FAILED,          /* 0x8000000f */
87
88
89
90#endif	// MIX_RESULT_H
91