mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Media: harden TrackID handling.
This commit is contained in:
parent
bfe6f25a2d
commit
0bdecfc6ea
9 changed files with 183 additions and 37 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue