本文整理汇总了C++中MSE_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ MSE_DEBUG函数的具体用法?C++ MSE_DEBUG怎么用?C++ MSE_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MSE_DEBUG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mon
void
MediaSourceReader::PrepareInitialization()
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MSE_DEBUG("trackBuffers=%u", mTrackBuffers.Length());
mEssentialTrackBuffers.AppendElements(mTrackBuffers);
mHasEssentialTrackBuffers = true;
if (!IsWaitingMediaResources()) {
mDecoder->NotifyWaitingForResourcesStatusChanged();
}
}
开发者ID:hoosteeno,项目名称:gecko-dev,代码行数:11,代码来源:MediaSourceReader.cpp
示例2: MOZ_ASSERT
void
SourceBuffer::Ended()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(IsAttached());
MSE_DEBUG("Ended");
mContentManager->Ended();
// We want the MediaSourceReader to refresh its buffered range as it may
// have been modified (end lined up).
mMediaSource->GetDecoder()->NotifyDataArrived(1, mReportedOffset++, /* aThrottleUpdates = */ false);
}
开发者ID:alison-shiue,项目名称:gecko-dev,代码行数:11,代码来源:SourceBuffer.cpp
示例3: MSE_DEBUG
bool
ContainerParser::IsMediaSegmentPresent(MediaLargeByteBuffer* aData)
{
MSE_DEBUG(ContainerParser, "aLength=%u [%x%x%x%x]",
aData->Length(),
aData->Length() > 0 ? (*aData)[0] : 0,
aData->Length() > 1 ? (*aData)[1] : 0,
aData->Length() > 2 ? (*aData)[2] : 0,
aData->Length() > 3 ? (*aData)[3] : 0);
return false;
}
开发者ID:LordJZ,项目名称:gecko-dev,代码行数:11,代码来源:ContainerParser.cpp
示例4: MOZ_ASSERT
void
SourceBuffer::Detach()
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("SourceBuffer(%p)::Detach", this);
if (mTrackBuffer) {
mTrackBuffer->Detach();
}
mTrackBuffer = nullptr;
mMediaSource = nullptr;
}
开发者ID:msliu,项目名称:gecko-dev,代码行数:11,代码来源:SourceBuffer.cpp
示例5: MOZ_ASSERT
void
MediaSource::DurationChange(double aOldDuration, double aNewDuration)
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("DurationChange(aOldDuration=%f, aNewDuration=%f)", aOldDuration, aNewDuration);
if (aNewDuration < aOldDuration) {
// Remove all buffered data from aNewDuration.
mSourceBuffers->RangeRemoval(aNewDuration, PositiveInfinity<double>());
}
// TODO: If partial audio frames/text cues exist, clamp duration based on mSourceBuffers.
}
开发者ID:AtulKumar2,项目名称:gecko-dev,代码行数:12,代码来源:MediaSource.cpp
示例6: PR_NewLogModule
/* static */ bool
MediaSource::IsTypeSupported(const GlobalObject&, const nsAString& aType)
{
#ifdef PR_LOGGING
if (!gMediaSourceLog) {
gMediaSourceLog = PR_NewLogModule("MediaSource");
}
#endif
nsresult rv = mozilla::IsTypeSupported(aType);
MSE_DEBUG("MediaSource::IsTypeSupported(Type=%s) -> %x", NS_ConvertUTF16toUTF8(aType).get(), rv);
return NS_SUCCEEDED(rv);
}
开发者ID:afabbro,项目名称:gecko-dev,代码行数:12,代码来源:MediaSource.cpp
示例7: MSE_DEBUG
void
MediaSource::Detach()
{
MSE_DEBUG("%p Detaching decoder %p owner %p", this, mDecoder.get(), mDecoder->GetOwner());
MOZ_ASSERT(mDecoder);
mDecoder->DetachMediaSource();
mDecoder = nullptr;
mDuration = UnspecifiedNaN<double>();
mActiveSourceBuffers->Clear();
mSourceBuffers->Clear();
SetReadyState(MediaSourceReadyState::Closed);
}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:12,代码来源:MediaSource.cpp
示例8: MOZ_ASSERT
void
SourceBuffer::Detach()
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("Detach");
AbortBufferAppend();
if (mTrackBuffer) {
mTrackBuffer->Detach();
}
mTrackBuffer = nullptr;
mMediaSource = nullptr;
}
开发者ID:RobertJGabriel,项目名称:Waterfox,代码行数:12,代码来源:SourceBuffer.cpp
示例9: mPrincipal
SourceBufferResource::SourceBufferResource(nsIPrincipal* aPrincipal,
const nsACString& aType)
: mPrincipal(aPrincipal)
, mType(aType)
, mMonitor("mozilla::SourceBufferResource::mMonitor")
, mOffset(0)
, mClosed(false)
, mEnded(false)
{
MOZ_COUNT_CTOR(SourceBufferResource);
MSE_DEBUG("%p SBR::SBR()", this);
}
开发者ID:Balakrishnan-Vivek,项目名称:gecko-dev,代码行数:12,代码来源:SourceBufferResource.cpp
示例10: MSE_DEBUGV
void
MediaSourceReader::RequestAudioData()
{
MSE_DEBUGV("MediaSourceReader(%p)::RequestAudioData", this);
if (!mAudioReader) {
MSE_DEBUG("MediaSourceReader(%p)::RequestAudioData called with no audio reader", this);
GetCallback()->OnNotDecoded(MediaData::AUDIO_DATA, RequestSampleCallback::DECODE_ERROR);
return;
}
mAudioIsSeeking = false;
SwitchAudioReader(mLastAudioTime);
mAudioReader->RequestAudioData();
}
开发者ID:msliu,项目名称:gecko-dev,代码行数:13,代码来源:MediaSourceReader.cpp
示例11: MSE_DEBUGV
void
MediaSourceReader::RequestAudioData()
{
MSE_DEBUGV("MediaSourceReader(%p)::RequestAudioData", this);
if (!mAudioReader) {
MSE_DEBUG("MediaSourceReader(%p)::RequestAudioData called with no audio reader", this);
GetCallback()->OnDecodeError();
return;
}
mAudioIsSeeking = false;
SwitchAudioReader(mLastAudioTime);
mAudioReader->RequestAudioData();
}
开发者ID:mlasak,项目名称:gecko-dev,代码行数:13,代码来源:MediaSourceReader.cpp
示例12: mon
void
MediaSourceReader::RemoveTrackBuffer(TrackBuffer* aTrackBuffer)
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MSE_DEBUG("RemoveTrackBuffer(%p)", aTrackBuffer);
mTrackBuffers.RemoveElement(aTrackBuffer);
if (mAudioTrack == aTrackBuffer) {
mAudioTrack = nullptr;
}
if (mVideoTrack == aTrackBuffer) {
mVideoTrack = nullptr;
}
}
开发者ID:rgaiacs,项目名称:gecko-dev,代码行数:13,代码来源:MediaSourceReader.cpp
示例13: MOZ_ASSERT
void
MediaSourceDecoder::Shutdown()
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("Shutdown");
// Detach first so that TrackBuffers are unused on the main thread when
// shut down on the decode task queue.
if (mMediaSource) {
mMediaSource->Detach();
}
mDemuxer = nullptr;
MediaDecoder::Shutdown();
}
开发者ID:SJasoria,项目名称:gecko-dev,代码行数:14,代码来源:MediaSourceDecoder.cpp
示例14: MOZ_ASSERT
bool
MediaSource::Attach(MediaSourceDecoder* aDecoder)
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("MediaSource(%p)::Attach(aDecoder=%p) owner=%p", this, aDecoder, aDecoder->GetOwner());
MOZ_ASSERT(aDecoder);
if (mReadyState != MediaSourceReadyState::Closed) {
return false;
}
mDecoder = aDecoder;
mDecoder->AttachMediaSource(this);
SetReadyState(MediaSourceReadyState::Open);
return true;
}
开发者ID:jrmuizel,项目名称:mozilla-central-skia,代码行数:14,代码来源:MediaSource.cpp
示例15: OnVideoDecoded
void OnVideoDecoded(VideoData* aSample)
{
if (mDropVideoBeforeThreshold) {
if (aSample->mTime < mTimeThreshold) {
MSE_DEBUG("%p MSR::OnVideoDecoded VideoData mTime %lld below mTimeThreshold %lld",
this, aSample->mTime, mTimeThreshold);
delete aSample;
GetVideoReader()->RequestVideoData(false, mTimeThreshold);
return;
}
mDropVideoBeforeThreshold = false;
}
GetCallback()->OnVideoDecoded(aSample);
}
开发者ID:bchukuka,项目名称:gecko-dev,代码行数:14,代码来源:MediaSourceDecoder.cpp
示例16: MSE_DEBUG
void
SourceBuffer::Abort(ErrorResult& aRv)
{
MSE_DEBUG("%p Abort()", this);
if (!IsAttached()) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
if (mMediaSource->ReadyState() != MediaSourceReadyState::Open) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
if (mUpdating) {
// TODO: Abort segment parser loop, buffer append, and stream append loop algorithms.
AbortUpdating();
}
// TODO: Run reset parser algorithm.
mAppendWindowStart = 0;
mAppendWindowEnd = PositiveInfinity<double>();
MSE_DEBUG("%p Abort: Discarding decoder.", this);
DiscardDecoder();
}
开发者ID:Kunden,项目名称:gecko-dev,代码行数:23,代码来源:SourceBuffer.cpp
示例17: MSE_DEBUG
void
MediaSourceDecoder::Shutdown()
{
MSE_DEBUG("Shutdown");
// Detach first so that TrackBuffers are unused on the main thread when
// shut down on the decode task queue.
if (mMediaSource) {
mMediaSource->Detach();
}
MediaDecoder::Shutdown();
// Kick WaitForData out of its slumber.
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
mon.NotifyAll();
}
开发者ID:nafis-sadik,项目名称:gecko-dev,代码行数:15,代码来源:MediaSourceDecoder.cpp
示例18: MOZ_DIAGNOSTIC_ASSERT
void
MediaSourceReader::OnVideoNotDecoded(NotDecodedReason aReason)
{
MOZ_DIAGNOSTIC_ASSERT(!IsSeeking());
mVideoRequest.Complete();
MSE_DEBUG("aReason=%u IsEnded: %d", aReason, IsEnded());
if (aReason == CANCELED) {
mVideoPromise.Reject(CANCELED, __func__);
return;
}
// if End of stream. Force switching past this stream to another reader by
// switching to the end of the buffered range.
int64_t lastVideoTime = mLastVideoTime;
if (aReason == END_OF_STREAM && mVideoSourceDecoder) {
AdjustEndTime(&mLastVideoTime, mVideoSourceDecoder);
}
// See if we can find a different reader that can pick up where we left off.
SwitchSourceResult result = SwitchVideoSource(&mLastVideoTime);
if (result == SOURCE_NEW) {
GetVideoReader()->ResetDecode();
mVideoSeekRequest.Begin(GetVideoReader()->Seek(GetReaderVideoTime(mLastVideoTime), 0)
->RefableThen(GetTaskQueue(), __func__, this,
&MediaSourceReader::CompleteVideoSeekAndDoRequest,
&MediaSourceReader::CompleteVideoSeekAndRejectPromise));
return;
}
// If we got a DECODE_ERROR and we have buffered data in the requested range
// then it must be a genuine decoding error.
// Otherwise we can assume that the data was either evicted or explicitely
// removed from the source buffer and we should wait for new data.
if (aReason == DECODE_ERROR && result != SOURCE_NONE) {
mVideoPromise.Reject(DECODE_ERROR, __func__);
return;
}
CheckForWaitOrEndOfStream(MediaData::VIDEO_DATA, mLastVideoTime);
if (mLastVideoTime - lastVideoTime >= EOS_FUZZ_US) {
// No decoders are available to switch to. We will re-attempt from the last
// failing position.
mLastVideoTime = lastVideoTime;
}
}
开发者ID:rgaiacs,项目名称:gecko-dev,代码行数:48,代码来源:MediaSourceReader.cpp
示例19: DOMEventTargetHelper
SourceBuffer::SourceBuffer(MediaSource* aMediaSource, const nsACString& aType)
: DOMEventTargetHelper(aMediaSource->GetParentObject())
, mMediaSource(aMediaSource)
, mType(aType)
, mAppendWindowStart(0)
, mAppendWindowEnd(PositiveInfinity<double>())
, mTimestampOffset(0)
, mAppendMode(SourceBufferAppendMode::Segments)
, mUpdating(false)
, mDecoderInitialized(false)
{
MOZ_ASSERT(aMediaSource);
mParser = ContainerParser::CreateForMIMEType(aType);
MSE_DEBUG("%p SourceBuffer: Creating initial decoder.", this);
InitNewDecoder();
}
开发者ID:Kunden,项目名称:gecko-dev,代码行数:16,代码来源:SourceBuffer.cpp
示例20: MSE_DEBUG
void
SourceBuffer::AppendData(const uint8_t* aData, uint32_t aLength, ErrorResult& aRv)
{
MSE_DEBUG("AppendData(aLength=%u)", aLength);
RefPtr<MediaByteBuffer> data = PrepareAppend(aData, aLength, aRv);
if (!data) {
return;
}
mContentManager->AppendData(data, mAttributes->GetTimestampOffset());
StartUpdating();
nsCOMPtr<nsIRunnable> task = new BufferAppendRunnable(this, mUpdateID);
NS_DispatchToMainThread(task);
}
开发者ID:Danielzac,项目名称:gecko-dev,代码行数:16,代码来源:SourceBuffer.cpp
注:本文中的MSE_DEBUG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论