mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 10:32:23 +00:00
c5b776d07a
This commit will effectively revert following changes (in chronological order): - Bug 1128380: Make AmpleVideoFrames calculation dynamic. r=cpearce (e1e11d289) - Bug 1161901 - Sprinkle more assertions and fix some formatting. r=jww (1a008614e) - Bug 1152218 - Have a larger tolerance to decide if video data is low or not. r=cpearce. (72dc49d9b) - indent fix (b6fe75862) - Bug 1161901 - Relax assertion. r=jww (f20d88804) - fix indentation (c4b2356bd) - Bug 1162381. Part 2 - refactor DecodedStreamData::mInitialTime to be consistent with AudioSink when computing stream position. r=roc. (8574a32a1) - Bug 1172778 - Update readyState when audio samples are popped by AudioSink. r=cpearce. (3f64e7151) - Bug 1172392 - Align update of audio end time of decoded stream with that of AudioSink. r=roc. (01e7ba014) - Bug 1173001 - Initialize reader task queue in the constructor. r=jww (efecb4a62) - Bug 1173001 - Enable tail dispatch for the decode task queue. r=jww (11e8feaad) - Bug 1173289 - Remove WakeDecoderRunnable from MDSM. r=roc. (9782c6dd6) - Bug 1173248 - Remove the workaround introduced to MDSM by bug 951278. r=cpearce. (43ecb0e42) - Bug 996238 - Add test for asymmetric media isolation across PC. r=ekr (1a41248b4) - Bug 1153314 - Test IdP login flow, r=jib (1b143d80a) - Bug 1155898 - Use fetch instead of XHR for IdP. r=jib (ac9bc2d01) - missing part of Bug 1171311: P4. Don't compute start time for MSE. (d5e48284d) - Bug 1163223 - Remove MediaDecoderStateMachine::mStartTime. r=jww CLOSED TREE (333b0e904) - Bug 1172826 - remove unnecessary checks for MediaDecoderStateMachine::mPlaybackRate. r=kinetik. (98c32f91d) - Bug 1143575. Rename AdvanceFrame to UpdateRenderedVideoFrames. r=cpearce (987617a9d) - Bug 1172264 - Track the MDSM's duration as a TimeUnit and eliminate the separate concept of 'end time'. r=jww (49f8f2442) - Bug 1172264 - Require Manual disconnection for all mirrors. r=jww (845e57496) - Bug 1172264 - Switch MediaDecoder's mDuration represenation to a double. r=jww (dfde6482d) - Bug 1172264 - Mirror duration from the MDSM to the MediaDecoder. r=jww (a744fd08f) - Bug 1164463 - Clean up MediaManager shutdown to be reliable and avoid holding locks while Joining a thread. r=jib (636e2e5dc) - missing part of Bug 1154389 - Stop leaking DeviceSuccessCallbackRunnable objects (2f8906119) - Bug 1169665 - Have enumerateDevices return empty array on zero devices instead of fail. r=jesup (f83fcb269) - Bug 1162720 - enumerateDevices visits main thread for profileDir. r=jesup (20687dcb7) - Bug 1173255 - Cleanup MediaManager e10s code in prep for deviceId constraint. r=jesup (43496fe28) - Bug 1172264 - Mirror duration from the MDSM to the MediaDecoderReader and remove MDSM::GetDuration. r=jww (369a3d1b4) - Bug 1172264 - Route mExplicitDuration directly from the mediasource code to MediaDecoder, and stop passing an argument to DurationChanged. r=pending=jww (b429dfe41) - Bug 1172264 - Watch mStateMachineDuration, and stop manually firing DurationChanged. r=jww (54091368c) - Bug 1037389 - add support for deviceId in gUM constraints (merged 11 patches). r=smaug, r=jesup (bc6f9640d) - Bug 1180748 - Unbreak building with --disable-webrtc. r=jesup (b5d53b666) - CLOSED TREE. Bug 1174077 - send silence instead of nothing to the decoded stream in CORS case. r=roc. (cf576aac9) - Bug 1177466 - Clean up places calling MaybeStartPlayback() in MediaDecoderStateMachine. r=cpearce (a2ef0f47b) - Remaining of Bug 1168008 - Replace 'Consumer' with 'Request' in MediaPromise (4e77e4f42) - bug 1137076 remove declaration of undefined OmxDecoder::ProcessCachedData() r=edwin (90ef83ee9) - bug 1137076 mark some methods as private r=edwin (e9f4dd0a1) - Bug 1173001 - Fix up some task queue naming to make MediaDecoderReader consistent with MDSM. r=jww (879b186ea) - Bug 1173641 - Hoist shutdown promise resolution into a helper. r=jww (1a02bd90a) - Bug 1173641 - Null out the thread pool when resolving shutdown. r=jww (ab3f723d5) - Bug 1173641 - Remove now-unnecessary null-out in MediaDecoderReader::BreakCycles. r=jww (3330778c6) - Bug 1173656 - Disallow TrackID reuse in TrackUnionStream. r=roc (7f4da1ea2) - Bug 1175768 - Implement SilentReadAt. r=jya (ece3c2ffa) - Bug 1178437 - Assert OnTaskQueue for most of the remaining MDSM methods. r=jww (da13ec549) - Bug 1178437 - Remove ReadOnWrongThread. r=jww (f9cf8946d) - Bug 1178437 - Dispatch SetFragmentEndTime. r=jww (740ce9882) - Bug 1178437 - Make mRealTime const and allow it to be accessed on any thread. r=jww (a65c22f1f)
183 lines
3.2 KiB
C++
183 lines
3.2 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
#include "BufferDecoder.h"
|
|
|
|
#include "nsISupports.h"
|
|
#include "MediaResource.h"
|
|
|
|
namespace mozilla {
|
|
|
|
extern PRLogModuleInfo* gMediaDecoderLog;
|
|
|
|
NS_IMPL_ISUPPORTS0(BufferDecoder)
|
|
|
|
BufferDecoder::BufferDecoder(MediaResource* aResource)
|
|
: mReentrantMonitor("BufferDecoder")
|
|
, mResource(aResource)
|
|
{
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
MOZ_COUNT_CTOR(BufferDecoder);
|
|
if (!gMediaDecoderLog) {
|
|
gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
|
|
}
|
|
}
|
|
|
|
BufferDecoder::~BufferDecoder()
|
|
{
|
|
// The dtor may run on any thread, we cannot be sure.
|
|
MOZ_COUNT_DTOR(BufferDecoder);
|
|
}
|
|
|
|
void
|
|
BufferDecoder::BeginDecoding(MediaTaskQueue* aTaskQueueIdentity)
|
|
{
|
|
MOZ_ASSERT(!mTaskQueueIdentity && aTaskQueueIdentity);
|
|
mTaskQueueIdentity = aTaskQueueIdentity;
|
|
}
|
|
|
|
ReentrantMonitor&
|
|
BufferDecoder::GetReentrantMonitor()
|
|
{
|
|
return mReentrantMonitor;
|
|
}
|
|
|
|
bool
|
|
BufferDecoder::IsShutdown() const
|
|
{
|
|
// BufferDecoder cannot be shut down.
|
|
return false;
|
|
}
|
|
|
|
bool
|
|
BufferDecoder::OnStateMachineTaskQueue() const
|
|
{
|
|
// BufferDecoder doesn't have the concept of a state machine.
|
|
return true;
|
|
}
|
|
|
|
bool
|
|
BufferDecoder::OnDecodeTaskQueue() const
|
|
{
|
|
MOZ_ASSERT(mTaskQueueIdentity, "Forgot to call BeginDecoding?");
|
|
return mTaskQueueIdentity->IsCurrentThreadIn();
|
|
}
|
|
|
|
MediaResource*
|
|
BufferDecoder::GetResource() const
|
|
{
|
|
return mResource;
|
|
}
|
|
|
|
void
|
|
BufferDecoder::NotifyBytesConsumed(int64_t aBytes, int64_t aOffset)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::NotifyDecodedFrames(uint32_t aParsed, uint32_t aDecoded,
|
|
uint32_t aDropped)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
int64_t
|
|
BufferDecoder::GetMediaDuration()
|
|
{
|
|
// unknown
|
|
return -1;
|
|
}
|
|
|
|
void
|
|
BufferDecoder::UpdateEstimatedMediaDuration(int64_t aDuration)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::SetMediaSeekable(bool aMediaSeekable)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
VideoFrameContainer*
|
|
BufferDecoder::GetVideoFrameContainer()
|
|
{
|
|
// no video frame
|
|
return nullptr;
|
|
}
|
|
|
|
layers::ImageContainer*
|
|
BufferDecoder::GetImageContainer()
|
|
{
|
|
// no image container
|
|
return nullptr;
|
|
}
|
|
|
|
bool
|
|
BufferDecoder::IsTransportSeekable()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool
|
|
BufferDecoder::IsMediaSeekable()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void
|
|
BufferDecoder::MetadataLoaded(nsAutoPtr<MediaInfo> aInfo, nsAutoPtr<MetadataTags> aTags, MediaDecoderEventVisibility aEventVisibility)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::FirstFrameLoaded(nsAutoPtr<MediaInfo> aInfo, MediaDecoderEventVisibility aEventVisibility)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::QueueMetadata(int64_t aTime, nsAutoPtr<MediaInfo> aInfo, nsAutoPtr<MetadataTags> aTags)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::RemoveMediaTracks()
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::OnReadMetadataCompleted()
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::NotifyWaitingForResourcesStatusChanged()
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
void
|
|
BufferDecoder::NotifyDataArrived(const char* aBuffer, uint32_t aLength, int64_t aOffset)
|
|
{
|
|
// ignore
|
|
}
|
|
|
|
MediaDecoderOwner*
|
|
BufferDecoder::GetOwner()
|
|
{
|
|
// unknown
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace mozilla
|