本文整理汇总了C++中MSE_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ MSE_DEBUG函数的具体用法?C++ MSE_DEBUG怎么用?C++ MSE_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MSE_DEBUG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例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);
}
示例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;
}
示例4: MOZ_ASSERT
void
SourceBuffer::Detach()
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("SourceBuffer(%p)::Detach", this);
if (mTrackBuffer) {
mTrackBuffer->Detach();
}
mTrackBuffer = nullptr;
mMediaSource = nullptr;
}
示例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.
}
示例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);
}
示例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);
}
示例8: MOZ_ASSERT
void
SourceBuffer::Detach()
{
MOZ_ASSERT(NS_IsMainThread());
MSE_DEBUG("Detach");
AbortBufferAppend();
if (mTrackBuffer) {
mTrackBuffer->Detach();
}
mTrackBuffer = nullptr;
mMediaSource = nullptr;
}
示例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);
}
示例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();
}
示例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();
}
示例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;
}
}
示例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();
}
示例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;
}
示例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);
}