2015-03-18 14:16:23 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef GFX_IMFYCBCRIMAGE_H
|
|
|
|
#define GFX_IMFYCBCRIMAGE_H
|
|
|
|
|
|
|
|
#include "mozilla/RefPtr.h"
|
|
|
|
#include "ImageContainer.h"
|
2015-03-20 12:18:26 -07:00
|
|
|
#include "mfidl.h"
|
2015-03-18 14:16:23 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
class IMFYCbCrImage : public PlanarYCbCrImage
|
|
|
|
{
|
|
|
|
public:
|
2015-03-18 14:17:13 -07:00
|
|
|
IMFYCbCrImage(IMFMediaBuffer* aBuffer, IMF2DBuffer* a2DBuffer);
|
2015-03-18 14:16:23 -07:00
|
|
|
|
|
|
|
virtual bool IsValid() { return true; }
|
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual TextureClient* GetTextureClient(CompositableClient* aClient) override;
|
2015-03-18 14:17:13 -07:00
|
|
|
|
2015-03-18 14:16:23 -07:00
|
|
|
protected:
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual uint8_t* AllocateBuffer(uint32_t aSize) override {
|
2015-03-18 14:16:23 -07:00
|
|
|
MOZ_CRASH("Can't do manual allocations with IMFYCbCrImage");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2015-03-22 19:13:56 -07:00
|
|
|
TextureClient* GetD3D9TextureClient(CompositableClient* aClient);
|
|
|
|
|
2015-03-18 14:17:13 -07:00
|
|
|
~IMFYCbCrImage();
|
2015-03-18 14:16:23 -07:00
|
|
|
|
|
|
|
RefPtr<IMFMediaBuffer> mBuffer;
|
|
|
|
RefPtr<IMF2DBuffer> m2DBuffer;
|
2015-03-18 14:17:13 -07:00
|
|
|
RefPtr<TextureClient> mTextureClient;
|
2015-03-18 14:16:23 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namepace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // GFX_D3DSURFACEIMAGE_H
|