Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

bool Impala::Core::Stream::RgbDataSrcLavc_old::InitFrames (  )  [inline, private]

Definition at line 518 of file RgbDataSrcLavc_old.h.

Referenced by Init().

00519     {
00520         mPacket = new AVPacket;
00521 
00522         // Allocate frame for reading
00523         mFrame = avcodec_alloc_frame();
00524 
00525         // Allocate frame for RGB conversion
00526         mFrameRGB = avcodec_alloc_frame();
00527 
00528         if ((mFrameRGB == NULL) || (mFrame == NULL)) 
00529             throw LAVCException("Could not allocate frame memory for: "
00530                                  + mSrcName, 0);
00531 
00532         // allocate buffer to hold frame data converted to RGB
00533         const int numBytes = avpicture_get_size(
00534             PIX_FMT_RGB24, mFrameWidth, mFrameHeight);
00535         mData = new UInt8[numBytes];
00536 
00537         // Assign appropriate parts of buffer to image planes in mFrameRGB
00538         int result = avpicture_fill( (AVPicture*) mFrameRGB, 
00539             mData, PIX_FMT_RGB24, mFrameWidth, mFrameHeight);
00540 
00541         return true;
00542     }


Generated on Fri Mar 19 11:17:53 2010 for ImpalaSrc by  doxygen 1.5.1