]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/dual-decode.git/blob - include/common.h
Header file for GUI.
[glsdk/dual-decode.git] / include / common.h
1 /*\r
2  *  Copyright (c) 2010-2011, Texas Instruments Incorporated\r
3  *\r
4  *  Redistribution and use in source and binary forms, with or without\r
5  *  modification, are permitted provided that the following conditions\r
6  *  are met:\r
7  *\r
8  *  *  Redistributions of source code must retain the above copyright\r
9  *     notice, this list of conditions and the following disclaimer.\r
10  *\r
11  *  *  Redistributions in binary form must reproduce the above copyright\r
12  *     notice, this list of conditions and the following disclaimer in the\r
13  *     documentation and/or other materials provided with the distribution.\r
14  *\r
15  *  *  Neither the name of Texas Instruments Incorporated nor the names of\r
16  *     its contributors may be used to endorse or promote products derived\r
17  *     from this software without specific prior written permission.\r
18  *\r
19  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
20  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
21  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
22  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
23  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
24  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
25  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
26  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
27  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
28  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
29  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
30  *\r
31  *  Contact information for paper mail:\r
32  *  Texas Instruments\r
33  *  Post Office Box 655303\r
34  *  Dallas, Texas 75265\r
35  *  Contact information:\r
36  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm\r
37  *  ?DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact\r
38  *  ============================================================================\r
39  *\r
40  */\r
41 \r
42 /**\r
43  * @file                common.h\r
44  *\r
45  * @brief               Declares global variables and utility functions\r
46  */\r
47 \r
48 #ifndef __COMMON_H__\r
49 #define __COMMON_H__\r
50 \r
51 /*Error codes*/\r
52 #define ERR_SUCCESS 0\r
53 #define ERR_XNOTFOUND 1\r
54 #define ERR_INVALIDPARAM 2\r
55 #define ERR_FILENOTFOUND 3\r
56 #define ERR_OPTIONPARSE 4\r
57 #define ERR_BUG 5\r
58 \r
59 /*Dual decode, maximum pipelines = 2*/\r
60 #define NUM_MAX_FILES 2\r
61 #define PATH_MAX_LEN (PATH_MAX + strlen("file://"))\r
62 \r
63 /*Decode mode*/\r
64 \r
65 /*\r
66  * DECODE_MODE_NONE only applicable if \r
67  * application is started without any \r
68  * filename argument. This flag is used only\r
69  * for setting the mode of the application \r
70  * during startup\r
71  */\r
72 #define DECODE_MODE_NONE 0\r
73 \r
74 #define DECODE_MODE_SINGLE 1 \r
75 #define DECODE_MODE_DUAL 2\r
76 \r
77 /*Extern variables which flags passed as options*/\r
78 extern gint decodeMode; \r
79 extern gchar *filename[];\r
80 extern gboolean version;\r
81 extern gchar *sink;\r
82 extern gchar **files;\r
83 \r
84 extern const gchar *version_text;\r
85 #endif /*__COMMON_H__*/\r