X-Git-Url: https://git.ti.com/gitweb?p=glsdk%2Fdual-decode.git;a=blobdiff_plain;f=include%2Fcommon.h;h=c05879971c0272daa54abea8114a8d1f9c16392e;hp=b626f9dacbd9f5f6ab4e41c67105e80205157a66;hb=fc80293a6ed5b97b536488b59bf63edb1f40ab8c;hpb=1fa14ed1d4f6c082d7cfefcfd1356a587f09685d diff --git a/include/common.h b/include/common.h old mode 100755 new mode 100644 index b626f9d..c058799 --- a/include/common.h +++ b/include/common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Texas Instruments Incorporated + * Copyright (c) 2012-2013, Texas Instruments Incorporated * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,25 +44,71 @@ * * @brief Declares global variables and utility functions */ - #ifndef __COMMON_H__ #define __COMMON_H__ -/*Error codes*/ +#include +#include + +/** + *Extern variables which flags passed as options. + */ + +/** + * @brief The decode mode of the appplication : single, dual or none. + */ +extern gint decodeMode; + +/** + * @brief Array to store filenames of the media files + */ + +extern gchar *filename[]; + +/** + * @brief Stores if version of the application is asked on the command line. + */ + +extern gboolean version; + +/** + * @brief Video sink to be used. + */ + +extern gchar *sink; + +/** + * @brief Variable for processing the filenames passed as command line + * arguments. + */ + +extern gchar **files; +/** + * @brief Version of the application. + */ + +extern const gchar *version_text; + + +/** + *Error codes + */ #define ERR_SUCCESS 0 -#define ERR_XNOTFOUND 1 -#define ERR_INVALIDPARAM 2 -#define ERR_FILENOTFOUND 3 -#define ERR_OPTIONPARSE 4 -#define ERR_BUG 5 +#define ERR_XNOTFOUND -1 +#define ERR_INVALIDPARAM -2 +#define ERR_FILENOTFOUND -3 +#define ERR_OPTIONPARSE -4 +#define ERR_BUG -5 -/*Dual decode, maximum pipelines = 2*/ +/** + *Dual decode, maximum pipelines = 2 + */ #define NUM_MAX_FILES 2 #define PATH_MAX_LEN (PATH_MAX + strlen("file://")) -/*Decode mode*/ -/* +/** + * Decode mode of the application. * DECODE_MODE_NONE only applicable if * application is started without any * filename argument. This flag is used only @@ -70,16 +116,12 @@ * during startup */ #define DECODE_MODE_NONE 0 - #define DECODE_MODE_SINGLE 1 #define DECODE_MODE_DUAL 2 -/*Extern variables which flags passed as options*/ -extern gint decodeMode; -extern gchar *filename[]; -extern gboolean version; -extern gchar *sink; -extern gchar **files; +/** + * Initial position of the media file + */ +#define SEEK_START 0 -extern const gchar *version_text; #endif /*__COMMON_H__*/