2014-06-02 19:38:04 +04:00
|
|
|
/* 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 MOCK_MEDIA_DECODER_OWNER_H_
|
|
|
|
#define MOCK_MEDIA_DECODER_OWNER_H_
|
|
|
|
|
|
|
|
#include "MediaDecoderOwner.h"
|
2016-11-29 08:03:36 +03:00
|
|
|
#include "mozilla/AbstractThread.h"
|
2016-06-07 23:10:18 +03:00
|
|
|
#include "nsAutoPtr.h"
|
2014-06-02 19:38:04 +04:00
|
|
|
|
|
|
|
namespace mozilla
|
|
|
|
{
|
|
|
|
|
|
|
|
class MockMediaDecoderOwner : public MediaDecoderOwner
|
|
|
|
{
|
|
|
|
public:
|
2016-01-18 06:50:29 +03:00
|
|
|
nsresult DispatchAsyncEvent(const nsAString& aName) override
|
2014-06-02 19:38:04 +04:00
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2016-01-18 06:50:29 +03:00
|
|
|
void FireTimeUpdate(bool aPeriodic) override {}
|
|
|
|
bool GetPaused() override { return false; }
|
|
|
|
void MetadataLoaded(const MediaInfo* aInfo,
|
|
|
|
nsAutoPtr<const MetadataTags> aTags) override
|
2014-06-02 19:38:04 +04:00
|
|
|
{
|
|
|
|
}
|
2016-01-18 06:50:29 +03:00
|
|
|
void NetworkError() override {}
|
2016-09-10 17:56:09 +03:00
|
|
|
void DecodeError(const MediaResult& aError) override {}
|
2016-02-08 07:27:14 +03:00
|
|
|
bool HasError() const override { return false; }
|
2016-01-18 06:50:29 +03:00
|
|
|
void LoadAborted() override {}
|
|
|
|
void PlaybackEnded() override {}
|
|
|
|
void SeekStarted() override {}
|
|
|
|
void SeekCompleted() override {}
|
|
|
|
void DownloadProgressed() override {}
|
|
|
|
void UpdateReadyState() override {}
|
|
|
|
void FirstFrameLoaded() override {}
|
|
|
|
void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
|
|
|
|
const nsAString& aInitDataType) override {}
|
|
|
|
bool IsActive() const override { return true; }
|
|
|
|
bool IsHidden() const override { return false; }
|
|
|
|
void DownloadSuspended() override {}
|
|
|
|
void DownloadResumed(bool aForceNetworkLoading) override {}
|
|
|
|
void NotifySuspendedByCache(bool aIsSuspended) override {}
|
|
|
|
void NotifyDecoderPrincipalChanged() override {}
|
|
|
|
VideoFrameContainer* GetVideoFrameContainer() override
|
2014-06-02 19:38:04 +04:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2016-05-03 12:59:43 +03:00
|
|
|
void SetAudibleState(bool aAudible) override {}
|
2016-07-27 05:26:21 +03:00
|
|
|
void NotifyXPCOMShutdown() override {}
|
2016-11-29 08:03:36 +03:00
|
|
|
AbstractThread* AbstractMainThread() const override
|
|
|
|
{
|
|
|
|
// Non-DocGroup version for Mock.
|
|
|
|
return AbstractThread::MainThread();
|
|
|
|
}
|
2014-06-02 19:38:04 +04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|