Bug 761018 - GStreamer video buffer handling optimization; r=cdouble

This commit is contained in:
Alessandro Decina
2013-03-13 16:11:15 -04:00
parent 52deb46b82
commit 22d1883693
6 changed files with 388 additions and 165 deletions

View File

@@ -454,7 +454,7 @@ PlanarYCbCrImage::CopyData(const Data& aData)
mData.mYStride * mData.mYSize.height;
// get new buffer
mBuffer = AllocateBuffer(mBufferSize);
mBuffer = AllocateBuffer(mBufferSize);
if (!mBuffer)
return;
@@ -486,6 +486,24 @@ PlanarYCbCrImage::GetOffscreenFormat()
mOffscreenFormat;
}
void
PlanarYCbCrImage::SetDataNoCopy(const Data &aData)
{
mData = aData;
mSize = aData.mPicSize;
}
uint8_t*
PlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
{
// update buffer size
mBufferSize = aSize;
// get new buffer
mBuffer = AllocateBuffer(mBufferSize);
return mBuffer;
}
already_AddRefed<gfxASurface>
PlanarYCbCrImage::GetAsSurface()
{