mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1056537 - Bustage fix: move DecodeToFirstVideoData back to MediaDecoderReader for now. r=UNDISCLOSED TREETOPS
This commit is contained in:
parent
3d56b3a65a
commit
96ee646326
@ -105,6 +105,26 @@ nsresult MediaDecoderReader::ResetDecode()
|
||||
return res;
|
||||
}
|
||||
|
||||
VideoData* MediaDecoderReader::DecodeToFirstVideoData()
|
||||
{
|
||||
bool eof = false;
|
||||
while (!eof && VideoQueue().GetSize() == 0) {
|
||||
{
|
||||
ReentrantMonitorAutoEnter decoderMon(mDecoder->GetReentrantMonitor());
|
||||
if (mDecoder->IsShutdown()) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
bool keyframeSkip = false;
|
||||
eof = !DecodeVideoFrame(keyframeSkip, 0);
|
||||
}
|
||||
if (eof) {
|
||||
VideoQueue().Finish();
|
||||
}
|
||||
VideoData* d = nullptr;
|
||||
return (d = VideoQueue().PeekFront()) ? d : nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
MediaDecoderReader::GetBuffered(mozilla::dom::TimeRanges* aBuffered,
|
||||
int64_t aStartTime)
|
||||
|
@ -163,6 +163,9 @@ public:
|
||||
return mDecoder;
|
||||
}
|
||||
|
||||
// TODO: DEPRECATED. This uses synchronous decoding.
|
||||
VideoData* DecodeToFirstVideoData();
|
||||
|
||||
MediaInfo GetMediaInfo() { return mInfo; }
|
||||
|
||||
// Indicates if the media is seekable.
|
||||
|
@ -1894,26 +1894,6 @@ VideoData* OggReader::FindStartTime(int64_t& aOutStartTime)
|
||||
return videoData;
|
||||
}
|
||||
|
||||
VideoData* OggReader::DecodeToFirstVideoData()
|
||||
{
|
||||
bool eof = false;
|
||||
while (!eof && VideoQueue().GetSize() == 0) {
|
||||
{
|
||||
ReentrantMonitorAutoEnter decoderMon(mDecoder->GetReentrantMonitor());
|
||||
if (mDecoder->IsShutdown()) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
bool keyframeSkip = false;
|
||||
eof = !DecodeVideoFrame(keyframeSkip, 0);
|
||||
}
|
||||
if (eof) {
|
||||
VideoQueue().Finish();
|
||||
}
|
||||
VideoData* d = nullptr;
|
||||
return (d = VideoQueue().PeekFront()) ? d : nullptr;
|
||||
}
|
||||
|
||||
AudioData* OggReader::DecodeToFirstAudioData()
|
||||
{
|
||||
bool eof = false;
|
||||
|
@ -90,7 +90,6 @@ private:
|
||||
// frame, if we have video.
|
||||
VideoData* FindStartTime(int64_t& aOutStartTime);
|
||||
AudioData* DecodeToFirstAudioData();
|
||||
VideoData* DecodeToFirstVideoData();
|
||||
|
||||
// This monitor should be taken when reading or writing to mIsChained.
|
||||
ReentrantMonitor mMonitor;
|
||||
|
Loading…
Reference in New Issue
Block a user