mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879668 - Part 1: Make CreateMutedFrame static. r=roc
This commit is contained in:
parent
8147ef5734
commit
17bb66b11d
@ -208,13 +208,15 @@ VideoTrackEncoder::NotifyEndOfStream()
|
|||||||
mReentrantMonitor.NotifyAll();
|
mReentrantMonitor.NotifyAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */
|
||||||
void
|
void
|
||||||
VideoTrackEncoder::CreateMutedFrame(nsTArray<uint8_t>* aOutputBuffer)
|
VideoTrackEncoder::CreateMutedFrame(nsTArray<uint8_t>* aOutputBuffer,
|
||||||
|
int aFrameWidth, int aFrameHeight)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE_VOID(aOutputBuffer);
|
NS_ENSURE_TRUE_VOID(aOutputBuffer);
|
||||||
|
|
||||||
// Supports YUV420 image format only.
|
// Supports YUV420 image format only.
|
||||||
int yPlaneLen = mFrameWidth * mFrameHeight;
|
int yPlaneLen = aFrameWidth * aFrameHeight;
|
||||||
int cbcrPlaneLen = yPlaneLen / 2;
|
int cbcrPlaneLen = yPlaneLen / 2;
|
||||||
int frameLen = yPlaneLen + cbcrPlaneLen;
|
int frameLen = yPlaneLen + cbcrPlaneLen;
|
||||||
|
|
||||||
|
@ -229,6 +229,13 @@ public:
|
|||||||
uint32_t aTrackEvents,
|
uint32_t aTrackEvents,
|
||||||
const MediaSegment& aQueuedMedia) MOZ_OVERRIDE;
|
const MediaSegment& aQueuedMedia) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a buffer of black image in format of YUV:420. Called on the worker
|
||||||
|
* thread.
|
||||||
|
*/
|
||||||
|
static void CreateMutedFrame(nsTArray<uint8_t>* aOutputBuffer,
|
||||||
|
int aFrameWidth, int aFrameHeight);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Initialized the video encoder. In order to collect the value of width and
|
* Initialized the video encoder. In order to collect the value of width and
|
||||||
@ -252,12 +259,6 @@ protected:
|
|||||||
*/
|
*/
|
||||||
virtual void NotifyEndOfStream() MOZ_OVERRIDE;
|
virtual void NotifyEndOfStream() MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a buffer of black image in format of YUV:420. Called on the worker
|
|
||||||
* thread.
|
|
||||||
*/
|
|
||||||
void CreateMutedFrame(nsTArray<uint8_t>* aOutputBuffer);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of source video frame, ceiled if the source width is odd.
|
* The width of source video frame, ceiled if the source width is odd.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user