www.pudn.com > filterasfmuxer_2008_01_23.rar > defines.h


//
// defines.h
//
/**
** Copyright (C) 2005 EnjoyView Inc., all rights reserved.
** Your View, Our Passion. Just Enjoy It!
**
** http://spaces.msn.com/members/jemylu
**
**/

/*************************************************************************/

#ifndef __H_defines__
#define __H_defines__

#ifndef SAFE_RELEASE
#define SAFE_RELEASE( x ) \
if (NULL != x) \
{ \
x->Release(); \
x = NULL; \
}
#endif

#ifndef SAFE_DELETE
#define SAFE_DELETE( x ) \
if (NULL != x) \
{ \
delete x; \
x = NULL; \
}
#endif

#ifndef SAFE_ARRAY_DELETE
#define SAFE_ARRAY_DELETE( x ) \
if (NULL != x) \
{ \
delete[] x; \
x = NULL; \
}
#endif

#ifndef BREAK_IF_FAILED
#define BREAK_IF_FAILED(hr) if(FAILED(hr)) break;
#endif

typedef enum
{
PIN_Video = 1,
PIN_Audio
} PIN_ID;

#endif // __H_defines__