mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1221991 - [4.2] Add AndroidDecoderModule logging. r=snorp
This commit is contained in:
parent
803336e4c9
commit
50957b1e3a
@ -18,8 +18,24 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsPromiseFlatString.h"
|
||||
|
||||
#include "prlog.h"
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
static PRLogModuleInfo* AndroidDecoderModuleLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule = nullptr;
|
||||
if (!sLogModule) {
|
||||
sLogModule = PR_NewLogModule("AndroidDecoderModule");
|
||||
}
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
#undef LOG
|
||||
#define LOG(arg, ...) MOZ_LOG(AndroidDecoderModuleLog(), \
|
||||
mozilla::LogLevel::Debug, ("AndroidDecoderModule(%p)::%s: " arg, \
|
||||
this, __func__, ##__VA_ARGS__))
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gl;
|
||||
using namespace mozilla::widget::sdk;
|
||||
@ -680,6 +696,17 @@ MediaCodecDataDecoder::DecoderLoop()
|
||||
mMonitor.Notify();
|
||||
}
|
||||
|
||||
const char*
|
||||
MediaCodecDataDecoder::ModuleStateStr(ModuleState aState) {
|
||||
static const char* kStr[] = {
|
||||
"Decoding", "Flushing", "DrainQueue", "DrainDecoder", "DrainWaitEOS",
|
||||
"Stopping", "Shutdown"
|
||||
};
|
||||
|
||||
MOZ_ASSERT(aState < sizeof(kStr) / sizeof(kStr[0]));
|
||||
return kStr[aState];
|
||||
}
|
||||
|
||||
MediaCodecDataDecoder::ModuleState
|
||||
MediaCodecDataDecoder::State() const
|
||||
{
|
||||
@ -689,6 +716,8 @@ MediaCodecDataDecoder::State() const
|
||||
void
|
||||
MediaCodecDataDecoder::State(ModuleState aState)
|
||||
{
|
||||
LOG("%s -> %s", ModuleStateStr(mState), ModuleStateStr(aState));
|
||||
|
||||
if (aState == kDrainDecoder) {
|
||||
MOZ_ASSERT(mState == kDrainQueue);
|
||||
} else if (aState == kDrainWaitEOS) {
|
||||
|
@ -71,6 +71,8 @@ protected:
|
||||
|
||||
friend class AndroidDecoderModule;
|
||||
|
||||
static const char* ModuleStateStr(ModuleState aState);
|
||||
|
||||
virtual nsresult InitDecoder(widget::sdk::Surface::Param aSurface);
|
||||
|
||||
virtual nsresult Output(widget::sdk::BufferInfo::Param aInfo, void* aBuffer,
|
||||
|
Loading…
Reference in New Issue
Block a user