YUVStreamIO Class Reference

writes YUV frames and sets the correct UncompressedVideoFrame attribs <short description=""> More...

#include <YUVStreamIO.hpp>

Inheritance diagram for YUVStreamIO:

RawStreamIO IO VThread List of all members.

Public Member Functions

 YUVStreamIO (VideoESInfo *es, const char *file, bool writeOnly)
FramegetFrame ()
 returns a frame if one complete frame is available, otherwise null is returned.
IOclone () const

Detailed Description

writes YUV frames and sets the correct UncompressedVideoFrame attribs <short description="">

Author:
Michael Kropfberger
Version:
Id
YUVStreamIO.hpp,v 1.13 2005/09/22 11:58:44 mkropfbe Exp

Definition at line 63 of file YUVStreamIO.hpp.


Member Function Documentation

Frame * YUVStreamIO::getFrame  )  [virtual]
 

returns a frame if one complete frame is available, otherwise null is returned.

This function is typically blocking. Don't use a NULL return value to conclude STREAMEOF, always check with getState()!

Reimplemented from RawStreamIO.

Definition at line 63 of file YUVStreamIO.cpp.

References Frame::getAU(), RawStreamIO::getFrame(), Frame::getMediaTimeScale(), Frame::setAU(), UncompressedVideoFrame::setColorSpace(), Frame::setMediaTimeScale(), and Frame::unsetAU().

Referenced by YUVinYUVoverlay::adapt(), and PSNR::adapt().

00063 { 00064 UncompressedVideoFrame *frm; 00065 00066 Frame *inFrm = RawStreamIO::getFrame(); 00067 00068 if (!inFrm) 00069 return NULL; 00070 else { 00071 frm = new UncompressedVideoFrame(Frame::YUV_VOP, ((VideoESInfo*)(es))->getWidth(), ((VideoESInfo*)(es))->getHeight()); 00072 frm->setColorSpace(UncompressedVideoFrame::ColorSpaceYV12); 00073 frm->setMediaTimeScale(inFrm->getMediaTimeScale()); 00074 frm->setAU(inFrm->getAU(),false); 00075 inFrm->unsetAU(); //so it will not be freed... 00076 delete inFrm; 00077 return frm; 00078 } 00079 }


The documentation for this class was generated from the following files: