summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaDecoder.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-06 15:53:52 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-06 15:53:52 +0200
commit941e54654eabed0a3568f7fefe424a45aa02eddb (patch)
tree49aa02b174c428962d99142d8061267bfcd79e69 /dom/media/MediaDecoder.cpp
parentad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff)
parent0daa12376295d5d796256a116eb2a348a3a9273f (diff)
downloadUXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'dom/media/MediaDecoder.cpp')
-rw-r--r--dom/media/MediaDecoder.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp
index ab39886ba..9334d1bcb 100644
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -327,11 +327,13 @@ MediaDecoder::SetVolume(double aVolume)
void
MediaDecoder::AddOutputStream(ProcessedMediaStream* aStream,
+ TrackID aNextAvailableTrackID,
bool aFinishWhenEnded)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mDecoderStateMachine, "Must be called after Load().");
- mDecoderStateMachine->AddOutputStream(aStream, aFinishWhenEnded);
+ mDecoderStateMachine->AddOutputStream(
+ aStream, aNextAvailableTrackID, aFinishWhenEnded);
}
void
@@ -342,6 +344,14 @@ MediaDecoder::RemoveOutputStream(MediaStream* aStream)
mDecoderStateMachine->RemoveOutputStream(aStream);
}
+TrackID
+MediaDecoder::NextAvailableTrackIDFor(MediaStream* aOutputStream) const
+{
+ MOZ_ASSERT(NS_IsMainThread());
+ MOZ_ASSERT(mDecoderStateMachine, "Must be called after Load().");
+ return mDecoderStateMachine->NextAvailableTrackIDFor(aOutputStream);
+}
+
double
MediaDecoder::GetDuration()
{
@@ -1736,6 +1746,8 @@ MediaDecoder::RemoveMediaTracks()
videoList->RemoveTracks();
}
+ element->EndPreCreatedCapturedDecoderTracks();
+
mMediaTracksConstructed = false;
}