mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 973408 - Remove MediaDecoderStateMachine::GetAmpleVideoFrames(), and MediaOMXStateMachine. r=kinetik
This commit is contained in:
parent
f15c1aea78
commit
9c847a29a5
@ -206,7 +206,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
mBufferingWait = mRealTime ? 0 : BUFFERING_WAIT_S;
|
||||
mLowDataThresholdUsecs = mRealTime ? 0 : LOW_DATA_THRESHOLD_USECS;
|
||||
|
||||
mVideoPrerollFrames = mRealTime ? 0 : GetAmpleVideoFrames() / 2;
|
||||
mVideoPrerollFrames = mRealTime ? 0 : mAmpleVideoFrames / 2;
|
||||
mAudioPrerollUsecs = mRealTime ? 0 : LOW_AUDIO_USECS * 2;
|
||||
|
||||
#ifdef XP_WIN
|
||||
@ -578,7 +578,7 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedVideo()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
if (static_cast<uint32_t>(mReader->VideoQueue().GetSize()) < GetAmpleVideoFrames() * mPlaybackRate) {
|
||||
if (static_cast<uint32_t>(mReader->VideoQueue().GetSize()) < mAmpleVideoFrames * mPlaybackRate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,6 @@ public:
|
||||
bool IsPlaying();
|
||||
|
||||
protected:
|
||||
virtual uint32_t GetAmpleVideoFrames() { return mAmpleVideoFrames; }
|
||||
|
||||
void AssertCurrentThreadInMonitor() const { mDecoder->GetReentrantMonitor().AssertCurrentThreadIn(); }
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "MediaOmxDecoder.h"
|
||||
#include "MediaOmxReader.h"
|
||||
#include "MediaOmxStateMachine.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -22,7 +22,7 @@ MediaDecoder* MediaOmxDecoder::Clone()
|
||||
|
||||
MediaDecoderStateMachine* MediaOmxDecoder::CreateStateMachine()
|
||||
{
|
||||
return new MediaOmxStateMachine(this, new MediaOmxReader(this));
|
||||
return new MediaDecoderStateMachine(this, new MediaOmxReader(this));
|
||||
}
|
||||
|
||||
MediaOmxDecoder::~MediaOmxDecoder()
|
||||
|
@ -1,28 +0,0 @@
|
||||
#include "MediaDecoder.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class MediaOmxStateMachine : public MediaDecoderStateMachine
|
||||
{
|
||||
public:
|
||||
MediaOmxStateMachine(MediaDecoder *aDecoder,
|
||||
MediaDecoderReader *aReader,
|
||||
bool aRealTime = false)
|
||||
: MediaDecoderStateMachine(aDecoder, aReader, aRealTime) { }
|
||||
|
||||
protected:
|
||||
// Due to a bug in the OMX.qcom.video.decoder.mpeg4 decoder, we can't own too
|
||||
// many video buffers before shutting down the decoder. When we release these
|
||||
// buffers, they asynchronously signal to OMXCodec that we have returned
|
||||
// ownership of the buffer.
|
||||
// If this signal happens while the OMXCodec is shutting down, OMXCodec will
|
||||
// crash. If the OMXCodec shuts down before all buffers are returned,
|
||||
// OMXCodec will crash.
|
||||
// So we need few enough buffers in the queue that all buffers will be
|
||||
// returned before OMXCodec begins shutdown.
|
||||
uint32_t GetAmpleVideoFrames() { return 3; }
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
@ -7,7 +7,7 @@
|
||||
#include "RtspMediaResource.h"
|
||||
#include "RtspOmxDecoder.h"
|
||||
#include "RtspOmxReader.h"
|
||||
#include "MediaOmxStateMachine.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -18,8 +18,9 @@ MediaDecoder* RtspOmxDecoder::Clone()
|
||||
|
||||
MediaDecoderStateMachine* RtspOmxDecoder::CreateStateMachine()
|
||||
{
|
||||
return new MediaOmxStateMachine(this, new RtspOmxReader(this),
|
||||
mResource->IsRealTime());
|
||||
return new MediaDecoderStateMachine(this,
|
||||
new RtspOmxReader(this),
|
||||
mResource->IsRealTime());
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user