-
Notifications
You must be signed in to change notification settings - Fork 0
Cinder
Vinjn Zhang edited this page May 12, 2013
·
1 revision
unsigned char* image_data;
// fill up array here
Buffer buffer( image_data, length );
mLivePixels = Surface( loadImage( DataSourceBuffer::create(buffer), ImageSource::Options(), "jpg" ) );
//! A free function designed to interact with makeComShared
void ComDelete( void *p )
{
if( p ) {
IUnknown *unknown = reinterpret_cast<IUnknown*>( p );
unknown->Release();
}
}
//! Creates a shared_ptr whose deleter will properly decrement the reference count of a COM object
template<typename T>
inline std::shared_ptr<T> makeComShared( T *p )
{ return std::shared_ptr<T>( p, &ComDelete ); }
#define CATCH_EXCEPTION( ExceptionType ) \
catch ( ExceptionType& e ){\
console() << #ExceptionType << e.what() << std::endl;}
// Usage
try
{
audio::SourceRef src = audio::load( loadAsset( filename ) );
}
CATCH_EXCEPTION( AssetLoadExc )
CATCH_EXCEPTION( audio::IoException )
http://www.filibeto.org/unix/macos/lib/dev/documentation/QuickTime/Conceptual/QT7-1_Update_Guide/QT7-1_Update_Guide.pdf
QTDirect3DTextureContextCreate
QuickTime sucks in Windows, don't use it!!