API Guide Home
(Online version only)

palmOneCodecPluginMgrCommon.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
00003  * All rights reserved.
00004  ******************************************************************************/
00005 /**
00006  * @defgroup    Codec Codec Plugin Manager
00007  * @brief       This library is used to provide support for audio/video/image
00008  *              codecs plugin and encoding/decoding routines.
00009  *
00010  * The Codec Plugin Manager library is used to unify all different type of
00011  * codecs that are available for palmOne devices and provide a generic
00012  * API for developers to access these codecs for encoding/decoding.
00013  *
00014  * A typical application would use the library the following way:
00015  * - Check if an input/output format pair is supported [optional]
00016  * - Create a CodecSession with parameters that match the formats
00017  * - Call EncodeDecode()
00018  * - ...
00019  * - Delete the session
00020  *
00021  * For more information, please also check the palmOne Developer Guide.
00022  *
00023  * @{
00024  * @}
00025  */
00026 /**
00027  * @ingroup Codec
00028  */
00029 
00030 /**
00031  * @file    palmOneCodecPluginMgrCommon.h
00032  * @version 3.0
00033  *
00034  * @brief   Public 68K common header file for Codec Plugin Manager API - Library Definitions.
00035  *
00036  * This file contains the library constants and error codes used in the APIs.
00037  * <hr>
00038  */
00039 
00040 #ifndef _PALMONECODECPLUGINMGRCOMMON_H_
00041 #define _PALMONECODECPLUGINMGRCOMMON_H_
00042 
00043 #include <PalmTypes.h>
00044 #include <ErrorBase.h>
00045 #include <SystemMgr.h>
00046 
00047 
00048 /***********************************************************************
00049  * Type and creator of the Library
00050  ***********************************************************************/
00051 
00052 #define kCodecMgrLibName        "CodecPluginMgr"    /**< CodecPluginMgr library name. */
00053 #define kCodecMgrLibType        'aext'              /**< CodecPluginMgr library type. */
00054 #define kCodecMgrLibCreator     'CdMg'              /**< CodecPluginMgr creator ID. */
00055 
00056 
00057 /***********************************************************************
00058  * Library versioning
00059  ***********************************************************************/
00060 
00061 /**
00062  * @name Library Versions
00063  */
00064 /*@{*/
00065 #define kCodecMgrLibVersion3    sysMakeROMVersion(3, 0, 0, sysROMStageRelease, 0)
00066 #define kCodecMgrLibVersion     kCodecMgrLibVersion3
00067 /*@}*/
00068 
00069 /***********************************************************************
00070  * Error codes
00071  ***********************************************************************/
00072 
00073 /** Codec Plug-In Manager error codes. */
00074 #define kCodecMgrLibErrorClass      (oemErrorClass + 0x100)
00075 
00076 /**
00077  * @name Library Error Codes
00078  */
00079 /*@{*/
00080 /** Returned from CodecMgrLibClose() if the library is still open. */
00081 #define kCodecMgrLibErrStillOpen    (kCodecMgrLibErrorClass | 0x01)
00082 /** Internal error. */
00083 #define kCodecMgrLibErrInternal     (kCodecMgrLibErrorClass | 0x02)
00084 /** Bad parameters. */
00085 #define kCodecMgrLibErrBadParam     (kCodecMgrLibErrorClass | 0x03)
00086 /** API or Codec not supported. */
00087 #define kCodecMgrLibNotSupported    (kCodecMgrLibErrorClass | 0x04)
00088 /** Bad Codec Manager version. */
00089 #define kCodecMgrLibBadVersion      (kCodecMgrLibErrorClass | 0x05)
00090 /** No codec available. */
00091 #define kCodecMgrLibNoCodec         (kCodecMgrLibErrorClass | 0x06)
00092 /*@}*/
00093 
00094 /** Codec Plugins error codes. */
00095 #define kCodecPluginErrorClass      (oemErrorClass + 0x300)
00096 
00097 /**
00098  * @name Codec Session Error Codes
00099  */
00100 /*@{*/
00101 /** Codec Plug-In Bad parameters. */
00102 #define kCodecErrBadParam           (kCodecPluginErrorClass | 0x01)
00103 /** Buffer Over-run. */
00104 #define kCodecErrBufferOverrun      (kCodecPluginErrorClass | 0x02)
00105 /** Buffer Under-run. */
00106 #define kCodecErrBufferUnderrun     (kCodecPluginErrorClass | 0x03)
00107 /** Frame Error. */
00108 #define kCodecErrFrameError         (kCodecPluginErrorClass | 0x04)
00109 /** Invalid Header. */
00110 #define kCodecErrInvalidHeader      (kCodecPluginErrorClass | 0x05)
00111 /** Sync not found. */
00112 #define kCodecSyncNotFound          (kCodecPluginErrorClass | 0x06)
00113 /** Invalide decoding/encoding state. */
00114 #define kCodecErrInvalidState       (kCodecPluginErrorClass | 0x07)
00115 /** Alignment error. */
00116 #define kCodecErrAlignment          (kCodecPluginErrorClass | 0x08)
00117 /** Parsing error. */
00118 #define kCodecErrParsing            (kCodecPluginErrorClass | 0x09)
00119 /** Out of memory. */
00120 #define kCodecErrNoMemory           (kCodecPluginErrorClass | 0x10)
00121 /** Not being authorized. */
00122 #define kCodecErrUnAuthorized       (kCodecPluginErrorClass | 0x11)
00123 /** Unknown error. */
00124 #define kCodecErrUnknown            (kCodecPluginErrorClass | 0xFF)
00125 /*@}*/
00126 
00127 /******************************************************************
00128  * Constants and Types
00129  ******************************************************************/
00130 
00131 /**
00132  * @name CodecSupportedFormatEnumerate Iterator
00133  */
00134 /*@{*/
00135 #define palmCodecIteratorStart      (0xfffffffeL)   /**< Start iterator. */
00136 #define palmCodecIteratorStop       (0xffffffffL)   /**< Stop iterator.  */
00137 /*@}*/
00138 
00139 #define palmCodecNullID             (0)             /**< Null ID. */
00140 #define palmCodecInvalidSession     (NULL)          /**< Invalid session. */
00141 
00142 /** Palm Codec Session. */
00143 typedef void    *PalmCodecSession;
00144 
00145 /** Palm Codec Format. */
00146 typedef UInt32  PalmCodecFormat;
00147 
00148 /***********************************************************************
00149  * Library trap
00150  ***********************************************************************/
00151 
00152 /**
00153  * @name Function Traps
00154  */
00155 /*@{*/
00156 #define kCodecMgrLibTrapLibAPIVersion           (sysLibTrapCustom + 0)
00157 #define kCodecMgrLibTrapCreateSession           (sysLibTrapCustom + 1)
00158 #define kCodecMgrLibTrapCreateSessionByID       (sysLibTrapCustom + 2)
00159 #define kCodecMgrLibTrapDeleteSession           (sysLibTrapCustom + 3)
00160 #define kCodecMgrLibTrapResetSession            (sysLibTrapCustom + 4)
00161 #define kCodecMgrLibTrapGetMaxDestBufferSize    (sysLibTrapCustom + 5)
00162 #define kCodecMgrLibTrapEncodeDecode            (sysLibTrapCustom + 6)
00163 #define kCodecMgrLibTrapCustomControl           (sysLibTrapCustom + 7)
00164 #define kCodecMgrLibTrapEnumerateFormats        (sysLibTrapCustom + 8)
00165 #define kCodecMgrLibTrapIsFormatSupported       (sysLibTrapCustom + 9)
00166 #define kCodecMgrLibTrapGetSessionInfo          (sysLibTrapCustom + 10)
00167 /*@}*/
00168 
00169 #endif  // _PALMONECODECPLUGINMGRCOMMON_H_

Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide