20 #include <com/avpkit/ferry/Logger.h>
22 #include "IVideoPicture.h"
24 #include "VideoPicture.h"
27 VS_LOG_SETUP(VS_CPP_PACKAGE);
29 namespace com {
namespace avpkit {
namespace core
32 IVideoPicture :: IVideoPicture()
36 IVideoPicture :: ~IVideoPicture()
65 throw std::runtime_error(
"no source data to copy");
69 throw std::runtime_error(
"could not allocate new frame");
71 if (!retval->
copy(srcFrame))
72 throw std::runtime_error(
"could not copy source frame");
74 catch (std::bad_alloc &e)
76 VS_REF_RELEASE(retval);
79 catch (std::exception & e)
81 VS_LOG_DEBUG(
"got error: %s", e.what());
82 VS_REF_RELEASE(retval);
static void init()
Internal Only.
Represents one raw (undecoded) picture in a video stream, plus a timestamp for when to display that v...
virtual int getWidth()=0
What is the width of the picture.
static IVideoPicture * make(IPixelFormat::Type format, int width, int height)
Get a new picture object.
virtual int getHeight()=0
What is the height of the picture.
virtual bool copy(IVideoPicture *srcPicture)=0
Copy the contents of the given picture into this picture.
virtual IPixelFormat::Type getPixelType()=0
Returns the pixel format of the picture.
static VideoPicture * make(IPixelFormat::Type format, int width, int height)
The default factory for a frame.
Allows Java code to get data from a native buffers, and optionally modify native memory directly.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...