зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1273397. Part 1 - rename some functions to be consistent with other MediaDataDecoder sub-classes. r=jya.
MozReview-Commit-ID: 27yUz02gs4n --HG-- extra : rebase_source : 33e9aedf9f8587a8f4b73cb0cf8df9270b714dd5
This commit is contained in:
Родитель
0e85273c99
Коммит
157e73bce1
|
@ -90,7 +90,7 @@ VPXDecoder::Flush()
|
|||
}
|
||||
|
||||
int
|
||||
VPXDecoder::DoDecodeFrame(MediaRawData* aSample)
|
||||
VPXDecoder::DoDecode(MediaRawData* aSample)
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
vpx_codec_stream_info_t si;
|
||||
|
@ -174,9 +174,9 @@ VPXDecoder::DoDecodeFrame(MediaRawData* aSample)
|
|||
}
|
||||
|
||||
void
|
||||
VPXDecoder::DecodeFrame(MediaRawData* aSample)
|
||||
VPXDecoder::ProcessDecode(MediaRawData* aSample)
|
||||
{
|
||||
if (DoDecodeFrame(aSample) == -1) {
|
||||
if (DoDecode(aSample) == -1) {
|
||||
mCallback->Error();
|
||||
} else if (mTaskQueue->IsEmpty()) {
|
||||
mCallback->InputExhausted();
|
||||
|
@ -187,14 +187,13 @@ nsresult
|
|||
VPXDecoder::Input(MediaRawData* aSample)
|
||||
{
|
||||
mTaskQueue->Dispatch(NewRunnableMethod<RefPtr<MediaRawData>>(
|
||||
this, &VPXDecoder::DecodeFrame,
|
||||
RefPtr<MediaRawData>(aSample)));
|
||||
this, &VPXDecoder::ProcessDecode, aSample));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
VPXDecoder::DoDrain()
|
||||
VPXDecoder::ProcessDrain()
|
||||
{
|
||||
mCallback->DrainComplete();
|
||||
}
|
||||
|
@ -202,7 +201,7 @@ VPXDecoder::DoDrain()
|
|||
nsresult
|
||||
VPXDecoder::Drain()
|
||||
{
|
||||
mTaskQueue->Dispatch(NewRunnableMethod(this, &VPXDecoder::DoDrain));
|
||||
mTaskQueue->Dispatch(NewRunnableMethod(this, &VPXDecoder::ProcessDrain));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
using namespace layers;
|
||||
using namespace layers;
|
||||
|
||||
class VPXDecoder : public MediaDataDecoder
|
||||
{
|
||||
|
@ -47,10 +47,9 @@ public:
|
|||
static bool IsVPX(const nsACString& aMimeType, uint8_t aCodecMask=VP8|VP9);
|
||||
|
||||
private:
|
||||
void DecodeFrame (MediaRawData* aSample);
|
||||
int DoDecodeFrame (MediaRawData* aSample);
|
||||
void DoDrain ();
|
||||
void OutputDelayedFrames ();
|
||||
void ProcessDecode(MediaRawData* aSample);
|
||||
int DoDecode(MediaRawData* aSample);
|
||||
void ProcessDrain();
|
||||
|
||||
RefPtr<ImageContainer> mImageContainer;
|
||||
RefPtr<FlushableTaskQueue> mTaskQueue;
|
||||
|
|
Загрузка…
Ссылка в новой задаче