?? nccglob.h
字號(hào):
/*COPYRIGHT, LICENSE AND WARRANTY INFORMATIONThis software module has been originally developed by Nokia Corporation. Provided that a person, entity or a company willing to use the Software (hereinafter Licensee) comply with all the terms and conditions of this Statement and subject to the limitations set forth in this Statement Nokia grants to such Licensee a non-exclusive, sub-licensable, worldwide, limited license under copyrights owned by Nokia to use the Software for the sole purpose of creating, manufacturing, selling, marketing, or distributing (including the right to make modifications to the Software) a fully compliant decoder implementation (hereinafter "Decoder") of ITU-T Recommendation H.264 / ISO/IEC International Standard 14496-10 and an encoder implementation producing output that is decodable with the Decoder.Nokia retains the ownership of copyrights to the Software. There is no patent nor other intellectual property right of Nokia licensed under this Statement (except the copyright license above). Licensee hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if patent licenses are required, it is their responsibility to acquire the license before utilizing the Software.The license by Nokia is subject to that the Licensee grants to Nokia the non-exclusive, worldwide, royalty-free, perpetual and irrevocable covenant that the Licensee(s) shall not bring a suit before any court or administrative agency or otherwise assert a claim for infringement under the Licensee intellectual property rights that, but for a license, would be infringed by the Software against (a) Nokia or Nokia's Affiliate; or (b) other recipient of a license and covenant not to sue with respect to the Software from Nokia; or (c) contractor, customer or distributor of a party listed above in a or b, which suit or claim is related to the Software or use thereof.The Licensee(s) further agrees to grant a reciprocal license to Nokia (as granted by Nokia to the Licensee(s) on the modifications made by Licensee(s) to the Software. THE SOFTWARE IS PROVIDED "AS IS" AND THE ORIGINAL DEVELOPER DISCLAIMS ANY AND ALL WARRANTIES WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. THOSE INTENDING TO USE THE SOFTWARE ARE EXPRESSLY ADVISED THAT ITS USE MAY INFRINGE EXISTING PATENTS AND BE SUBJECT TO ROYALTY PAYMENTS TO PATENT OWNERS. ANYONE USING THE SOFTWARE ON THE BASIS OF THIS LICENSE AGREES TO OBTAIN THE NECESSARY PERMISSIONS FROM ANY AND ALL APPLICABLE PATENT OWNERS FOR SUCH USE.IN NO EVENT SHALL THE ORIGINAL DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.This copyright, license and warranty information notice must be retained in all copies and derivative works of the Software or substantial portions thereof.*/#ifndef _NCCGLOB_H_#define _NCCGLOB_H_#include <stdlib.h> /* for memory allocation functions and exit */#include "debug.h"/* * Common error indication values */#define NCC_OK 1#define NCC_ERROR -1/* * Wrappers for memory allocation functions * * These wrappers are intended to replace standard C functions * malloc, calloc, realloac and free. They differ from standard functions * in automatically including the check against NULL pointer. If a NULL * pointer is detected, nccExit is called. One may also * build some debugging features in these functions. * * Define NCC_ALLOC_NO_NULL_CHECK if the check against NULL pointer is not * wanted. This define may be used e.g. in a Win32 codec backed up with * structured error handling (SEH). */#ifdef NCC_ALLOC_NO_NULL_CHECK #define nccMalloc malloc #define nccCalloc calloc #define nccRealloc realloc #define nccFree free#else void *nccMalloc(size_t size); void *nccCalloc(size_t num, size_t size); void *nccRealloc(void *memblock, size_t size); #define nccFree free#endif/* * Wrapper for exit * * This wrapper is intended to be used instead of standard C function like * exit and abort. In a normal command-line executable nccExit is an alias * to exit, but in a Win32 DLL nccExit just disables the usage of the codec * instance by causing an exception which is then handled by an upper-level * exception handler. */#ifdef WIN32DLL void nccExitWin32DLL(int status); #define nccExit(status) \ { \ deb2f(stderr, "nccExit in file %s, line %d.\n", __FILE__, __LINE__); \ nccExitWin32DLL(status); \ }#else #define nccExit(status) \ { \ deb2f(stderr, "nccExit in file %s, line %d.\n", __FILE__, __LINE__); \ exit(status); \ }#endif/* * nccAssert * * An assertion is a macro or function that complains loudly if an assumption * is not true. In MVC, there is a macro called nccAssert. The macro * is defined to 0 for the release version of the software. For the debug * version (_DEBUG defined), the macro causes an exit (using nccExit). */#ifdef _DEBUG #define nccAssert(booleanExpr) \ if (booleanExpr) \ 0; \ else \ nccExit(2)#else #define nccAssert(booleanExpr) 0#endif#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -