Bug 1388288 - Make TrackBuffersManager compile in non-Unified mode. r=jya
TrackBuffersManager::SegmentParserLoop() fails to compile in non-Unified mode
because some uses of SourceBufferAttributes::AppendState don't have the
SourceBufferAttributes:: prefix. So just add a typedef to make that
unnecessary.
MozReview-Commit-ID: 1H3SIeUxNu7
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -36,26 +36,27 @@ mozilla::LogModule* GetMediaSourceSample
namespace mozilla {
using dom::SourceBufferAppendMode;
using media::TimeUnit;
using media::TimeInterval;
using media::TimeIntervals;
typedef SourceBufferTask::AppendBufferResult AppendBufferResult;
+typedef SourceBufferAttributes::AppendState AppendState;
static const char*
-AppendStateToStr(SourceBufferAttributes::AppendState aState)
+AppendStateToStr(AppendState aState)
{
switch (aState) {
- case SourceBufferAttributes::AppendState::WAITING_FOR_SEGMENT:
+ case AppendState::WAITING_FOR_SEGMENT:
return "WAITING_FOR_SEGMENT";
- case SourceBufferAttributes::AppendState::PARSING_INIT_SEGMENT:
+ case AppendState::PARSING_INIT_SEGMENT:
return "PARSING_INIT_SEGMENT";
- case SourceBufferAttributes::AppendState::PARSING_MEDIA_SEGMENT:
+ case AppendState::PARSING_MEDIA_SEGMENT:
return "PARSING_MEDIA_SEGMENT";
default:
return "IMPOSSIBLE";
}
}
static Atomic<uint32_t> sStreamSourceID(0u);
@@ -2019,17 +2020,17 @@ TrackBuffersManager::GetTracksList() con
}
if (HasAudio()) {
tracks.AppendElement(&mAudioTracks);
}
return tracks;
}
void
-TrackBuffersManager::SetAppendState(SourceBufferAttributes::AppendState aAppendState)
+TrackBuffersManager::SetAppendState(AppendState aAppendState)
{
MSE_DEBUG("AppendState changed from %s to %s",
AppendStateToStr(mSourceBufferAttributes->GetAppendState()), AppendStateToStr(aAppendState));
mSourceBufferAttributes->SetAppendState(aAppendState);
}
MediaInfo
TrackBuffersManager::GetMetadata() const