gecko-dev/dom/media/MediaTrackGraph.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1160 строки
42 KiB
C
Исходник Обычный вид История

Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
#ifndef MOZILLA_MEDIATRACKGRAPH_H_
#define MOZILLA_MEDIATRACKGRAPH_H_
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
#include "AudioSampleFormat.h"
#include "CubebUtils.h"
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
#include "MainThreadUtils.h"
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
#include "MediaSegment.h"
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
#include "mozilla/LinkedList.h"
#include "mozilla/Maybe.h"
#include "mozilla/Mutex.h"
#include "mozilla/StateWatching.h"
#include "mozilla/TaskQueue.h"
#include "nsAutoRef.h"
#include "nsIRunnable.h"
#include "nsTArray.h"
#include <speex/speex_resampler.h>
class nsIRunnable;
class nsIGlobalObject;
class nsPIDOMWindowInner;
namespace mozilla {
class AsyncLogger;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class AudioCaptureTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}; // namespace mozilla
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
extern mozilla::AsyncLogger gMTGTraceLogger;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
template <>
class nsAutoRefTraits<SpeexResamplerState>
: public nsPointerRefTraits<SpeexResamplerState> {
public:
static void Release(SpeexResamplerState* aState) {
speex_resampler_destroy(aState);
}
};
namespace mozilla {
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
extern LazyLogModule gMediaTrackGraphLog;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
namespace dom {
enum class AudioContextOperation;
enum class AudioContextOperationFlags;
enum class AudioContextState : uint8_t;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
} // namespace dom
/*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* MediaTrackGraph is a framework for synchronized audio/video processing
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* and playback. It is designed to be used by other browser components such as
* HTML media elements, media capture APIs, real-time media streaming APIs,
* multitrack media APIs, and advanced audio APIs.
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* The MediaTrackGraph uses a dedicated thread to process media --- the media
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* graph thread. This ensures that we can process media through the graph
* without blocking on main-thread activity. The media graph is only modified
* on the media graph thread, to ensure graph changes can be processed without
* interfering with media processing. All interaction with the media graph
* thread is done with message passing.
*
* APIs that modify the graph or its properties are described as "control APIs".
* These APIs are asynchronous; they queue graph changes internally and
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* those changes are processed all-at-once by the MediaTrackGraph. The
* MediaTrackGraph monitors the main thread event loop via
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* nsIAppShell::RunInStableState to ensure that graph changes from a single
* event loop task are always processed all together. Control APIs should only
* be used on the main thread, currently; we may be able to relax that later.
*
* To allow precise synchronization of times in the control API, the
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* MediaTrackGraph maintains a "media timeline". Control APIs that take or
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* return times use that timeline. Those times never advance during
* an event loop task. This time is returned by
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* MediaTrackGraph::GetCurrentTime().
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* Media decoding, audio processing and media playback use thread-safe APIs to
* the media graph to ensure they can continue while the main thread is blocked.
*
* When the graph is changed, we may need to throw out buffered data and
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* reprocess it. This is triggered automatically by the MediaTrackGraph.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
class AudioNodeEngine;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class AudioNodeExternalInputTrack;
class AudioNodeTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
class MediaInputPort;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class MediaTrack;
class MediaTrackGraph;
class MediaTrackGraphImpl;
class ProcessedMediaTrack;
class SourceMediaTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
class AudioDataListenerInterface {
protected:
// Protected destructor, to discourage deletion outside of Release():
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual ~AudioDataListenerInterface() = default;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
/* These are for cubeb audio input & output streams: */
/**
* Output data to speakers, for use as the "far-end" data for echo
* cancellation. This is not guaranteed to be in any particular size
* chunks.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void NotifyOutputData(MediaTrackGraphImpl* aGraph,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
AudioDataValue* aBuffer, size_t aFrames,
TrackRate aRate, uint32_t aChannels) = 0;
/**
* An AudioCallbackDriver signaling that it has started and may notify of data
* soon.
*/
virtual void NotifyStarted(MediaTrackGraphImpl* aGraph) = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
* Input data from a microphone (or other audio source. This is not
* guaranteed to be in any particular size chunks.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void NotifyInputData(MediaTrackGraphImpl* aGraph,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
const AudioDataValue* aBuffer, size_t aFrames,
TrackRate aRate, uint32_t aChannels) = 0;
/**
* Number of audio input channels.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual uint32_t RequestedInputChannelCount(MediaTrackGraphImpl* aGraph) = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
* Whether the underlying audio device is used for voice input.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual bool IsVoiceInput(MediaTrackGraphImpl* aGraph) const = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
* Called when the underlying audio device has changed.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void DeviceChanged(MediaTrackGraphImpl* aGraph) = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
* Called when the underlying audio device is being closed.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void Disconnect(MediaTrackGraphImpl* aGraph) = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
class AudioDataListener : public AudioDataListenerInterface {
protected:
// Protected destructor, to discourage deletion outside of Release():
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual ~AudioDataListener() = default;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AudioDataListener)
};
/**
* This is a base class for main-thread listener callbacks.
* This callback is invoked on the main thread when the main-thread-visible
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* state of a track has changed.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* These methods are called with the media graph monitor held, so
* reentry into general media graph methods is not possible.
* You should do something non-blocking and non-reentrant (e.g. dispatch an
* event) and return. NS_DispatchToCurrentThread would be a good choice.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* The listener is allowed to synchronously remove itself from the track, but
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* not add or remove any other listeners.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class MainThreadMediaTrackListener {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual void NotifyMainThreadTrackEnded() = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
/**
* Helper struct used to keep track of memory usage by AudioNodes.
*/
struct AudioNodeSizes {
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
AudioNodeSizes() : mTrack(0), mEngine(0), mNodeType() {}
size_t mTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
size_t mEngine;
const char* mNodeType;
};
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
/**
* Describes how a track should be disabled.
*
* ENABLED Not disabled.
* SILENCE_BLACK Audio data is turned into silence, video frames are made
* black.
* SILENCE_FREEZE Audio data is turned into silence, video freezes at
* last frame.
*/
enum class DisabledTrackMode { ENABLED, SILENCE_BLACK, SILENCE_FREEZE };
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
class AudioNodeEngine;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class AudioNodeExternalInputTrack;
class AudioNodeTrack;
class DirectMediaTrackListener;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
class MediaInputPort;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class MediaTrackGraphImpl;
class MediaTrackListener;
class ProcessedMediaTrack;
class SourceMediaTrack;
class ForwardedInputTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* A track of audio or video data. The media type must be known at construction
* and cannot change. All tracks progress at the same rate --- "real time".
* Tracks cannot seek. The only operation readers can perform on a track is to
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* read the next data.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Consumers of a track can be reading from it at different offsets, but that
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* should only happen due to the order in which consumers are being run.
* Those offsets must not diverge in the long term, otherwise we would require
* unbounded buffering.
*
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* (DEPRECATED to be removed in bug 1581074)
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Tracks can be in a "blocked" state. While blocked, a track does not
* produce data. A track can be explicitly blocked via the control API,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* or implicitly blocked by whatever's generating it (e.g. an underrun in the
* source resource), or implicitly blocked because something consuming it
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* blocks, or implicitly because it has ended.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* A track can be in an "ended" state. "Ended" tracks are permanently blocked.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* The "ended" state is terminal.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* Transitions into and out of the "blocked" and "ended" states are managed
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* by the MediaTrackGraph on the media graph thread.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* We buffer media data ahead of the consumers' reading offsets. It is possible
* to have buffered data but still be blocked.
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Any track can have its audio or video playing when requested. The media
* track graph plays audio by constructing audio output tracks as necessary.
* Video is played through a DirectMediaTrackListener managed by
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* VideoStreamTrack.
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* The data in a track is managed by mSegment. The segment starts at GraphTime
* mStartTime and encodes its own TrackTime duration.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Tracks are explicitly managed. The client creates them via
* MediaTrackGraph::Create{Source|ForwardedInput}Track, and releases them by
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* calling Destroy() when no longer needed (actual destruction will be
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* deferred). The actual object is owned by the MediaTrackGraph. The basic idea
* is that main thread objects will keep Tracks alive as long as necessary
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* (using the cycle collector to clean up whenever needed).
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* We make them refcounted only so that track-related messages with
* MediaTrack* pointers can be sent to the main thread safely.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* The lifetimes of MediaTracks are controlled from the main thread.
* For MediaTracks exposed to the DOM, the lifetime is controlled by the DOM
* wrapper; the DOM wrappers own their associated MediaTracks. When a DOM
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* wrapper is destroyed, it sends a Destroy message for the associated
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* MediaTrack and clears its reference (the last main-thread reference to
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* the object). When the Destroy message is processed on the graph thread we
* immediately release the affected objects (disentangling them from other
* objects as necessary).
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* This could cause problems for media processing if a MediaTrack is destroyed
* while a downstream MediaTrack is still using it. Therefore the DOM wrappers
* must keep upstream MediaTracks alive as long as they could be used in the
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* media graph.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* At any time, however, a set of MediaTrack wrappers could be collected via
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* cycle collection. Destroy messages will be sent for those objects in
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* arbitrary order and the MediaTrackGraph has to be able to handle this.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class MediaTrack : public mozilla::LinkedListElement<MediaTrack> {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaTrack)
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrack(TrackRate aSampleRate, MediaSegment::Type aType,
MediaSegment* aSegment);
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// The sample rate of the graph.
const TrackRate mSampleRate;
const MediaSegment::Type mType;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
protected:
// Protected destructor, to discourage deletion outside of Release():
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual ~MediaTrack();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Returns the graph that owns this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrackGraphImpl* GraphImpl();
const MediaTrackGraphImpl* GraphImpl() const;
MediaTrackGraph* Graph();
const MediaTrackGraph* Graph() const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Sets the graph that owns this track. Should only be called once.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void SetGraphImpl(MediaTrackGraphImpl* aGraph);
void SetGraphImpl(MediaTrackGraph* aGraph);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Control API.
virtual void AddAudioOutput(void* aKey);
virtual void SetAudioOutputVolume(void* aKey, float aVolume);
virtual void RemoveAudioOutput(void* aKey);
// Explicitly suspend. Useful for example if a media element is pausing
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// and we need to stop its track emitting its buffered data. As soon as the
// Suspend message reaches the graph, the track stops processing. It
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// ignores its inputs and produces silence/no video until Resumed. Its
// current time does not advance.
virtual void Suspend();
virtual void Resume();
// Events will be dispatched by calling methods of aListener.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void AddListener(MediaTrackListener* aListener);
virtual RefPtr<GenericPromise> RemoveListener(MediaTrackListener* aListener);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Adds aListener to the source track of this track.
* When the MediaTrackGraph processes the added listener, it will traverse
* the graph and add it to the track's source track.
* Note that the listener will be notified on the MediaTrackGraph thread
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* with whether the installation of it at the source was successful or not.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void AddDirectListener(DirectMediaTrackListener* aListener);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Removes aListener from the source track of this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* Note that the listener has already been removed if the link between the
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* source and this track has been broken. The caller doesn't have to care
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* about this, removing when the source cannot be found, or when the listener
* had already been removed does nothing.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void RemoveDirectListener(DirectMediaTrackListener* aListener);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// A disabled track has video replaced by black, and audio replaced by
// silence.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void SetEnabled(DisabledTrackMode aMode);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// End event will be notified by calling methods of aListener. It is the
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// responsibility of the caller to remove aListener before it is destroyed.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void AddMainThreadListener(MainThreadMediaTrackListener* aListener);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// It's safe to call this even if aListener is not currently a listener;
// the call will be ignored.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void RemoveMainThreadListener(MainThreadMediaTrackListener* aListener) {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aListener);
mMainThreadListeners.RemoveElement(aListener);
}
/**
* Ensure a runnable will run on the main thread after running all pending
* updates that were sent from the graph thread or will be sent before the
* graph thread receives the next graph update.
*
* If the graph has been shut down or destroyed, then the runnable will be
* dispatched to the event queue immediately. (There are no pending updates
* in this situation.)
*
* Main thread only.
*/
void RunAfterPendingUpdates(already_AddRefed<nsIRunnable> aRunnable);
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Signal that the client is done with this MediaTrack. It will be deleted
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// later.
virtual void Destroy();
// Returns the main-thread's view of how much data has been processed by
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// this track.
TrackTime GetCurrentTime() const {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
NS_ASSERTION(NS_IsMainThread(), "Call only on main thread");
return mMainThreadCurrentTime;
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Return the main thread's view of whether this track has ended.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
bool IsEnded() const {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
NS_ASSERTION(NS_IsMainThread(), "Call only on main thread");
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return mMainThreadEnded;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
bool IsDestroyed() const {
NS_ASSERTION(NS_IsMainThread(), "Call only on main thread");
return mMainThreadDestroyed;
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
friend class MediaTrackGraphImpl;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
friend class MediaInputPort;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
friend class AudioNodeExternalInputTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual SourceMediaTrack* AsSourceTrack() { return nullptr; }
virtual ProcessedMediaTrack* AsProcessedTrack() { return nullptr; }
virtual AudioNodeTrack* AsAudioNodeTrack() { return nullptr; }
virtual ForwardedInputTrack* AsForwardedInputTrack() { return nullptr; }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// These Impl methods perform the core functionality of the control methods
// above, on the media graph thread.
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Stop all track activity and disconnect it from all inputs and outputs.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* This must be idempotent.
*/
virtual void DestroyImpl();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime GetEnd() const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void SetAudioOutputVolumeImpl(void* aKey, float aVolume);
void AddAudioOutputImpl(void* aKey);
void RemoveAudioOutputImpl(void* aKey);
/**
* Removes all direct listeners and signals to them that they have been
* uninstalled.
*/
virtual void RemoveAllDirectListenersImpl() {}
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void RemoveAllResourcesAndListenersImpl();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual void AddListenerImpl(already_AddRefed<MediaTrackListener> aListener);
virtual void RemoveListenerImpl(MediaTrackListener* aListener);
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual void AddDirectListenerImpl(
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
already_AddRefed<DirectMediaTrackListener> aListener);
virtual void RemoveDirectListenerImpl(DirectMediaTrackListener* aListener);
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual void SetEnabledImpl(DisabledTrackMode aMode);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void AddConsumer(MediaInputPort* aPort) { mConsumers.AppendElement(aPort); }
void RemoveConsumer(MediaInputPort* aPort) {
mConsumers.RemoveElement(aPort);
}
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
GraphTime StartTime() const { return mStartTime; }
bool Ended() const { return mEnded; }
template <class SegmentType>
SegmentType* GetData() const {
if (!mSegment) {
return nullptr;
}
if (mSegment->GetType() != SegmentType::StaticType()) {
return nullptr;
}
return static_cast<SegmentType*>(mSegment.get());
}
MediaSegment* GetData() const { return mSegment.get(); }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
double TrackTimeToSeconds(TrackTime aTime) const {
NS_ASSERTION(0 <= aTime && aTime <= TRACK_TIME_MAX, "Bad time");
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return static_cast<double>(aTime) / mSampleRate;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
int64_t TrackTimeToMicroseconds(TrackTime aTime) const {
NS_ASSERTION(0 <= aTime && aTime <= TRACK_TIME_MAX, "Bad time");
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return (aTime * 1000000) / mSampleRate;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime SecondsToNearestTrackTime(double aSeconds) const {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
NS_ASSERTION(0 <= aSeconds && aSeconds <= TRACK_TICKS_MAX / TRACK_RATE_MAX,
"Bad seconds");
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return mSampleRate * aSeconds + 0.5;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime MicrosecondsToTrackTimeRoundDown(int64_t aMicroseconds) const {
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return (aMicroseconds * mSampleRate) / 1000000;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTicks TimeToTicksRoundUp(TrackRate aRate, TrackTime aTime) const {
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return RateConvertTicksRoundUp(aRate, mSampleRate, aTime);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime TicksToTimeRoundDown(TrackRate aRate, TrackTicks aTicks) const {
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
return RateConvertTicksRoundDown(mSampleRate, aRate, aTicks);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Convert graph time to track time. aTime must be <= mStateComputedTime
* to ensure we know exactly how much time this track will be blocked during
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* the interval.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime GraphTimeToTrackTimeWithBlocking(GraphTime aTime) const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Convert graph time to track time. This assumes there is no blocking time
* to take account of, which is always true except between a track
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* having its blocking time calculated in UpdateGraph and its blocking time
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* taken account of in UpdateCurrentTimeForTracks.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime GraphTimeToTrackTime(GraphTime aTime) const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Convert track time to graph time. This assumes there is no blocking time
* to take account of, which is always true except between a track
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* having its blocking time calculated in UpdateGraph and its blocking time
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* taken account of in UpdateCurrentTimeForTracks.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
GraphTime TrackTimeToGraphTime(TrackTime aTime) const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
virtual void ApplyTrackDisabling(MediaSegment* aSegment,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
MediaSegment* aRawSegment = nullptr);
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Return true if the main thread needs to observe updates from this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual bool MainThreadNeedsUpdates() const { return true; }
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
bool IsSuspended() const { return mSuspendedCount > 0; }
void IncrementSuspendCount();
void DecrementSuspendCount();
protected:
// Called on graph thread before handing control to the main thread to
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// release tracks.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual void NotifyForcedShutdown() {}
// |AdvanceTimeVaryingValuesToCurrentTime| will be override in
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// SourceMediaTrack.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual void AdvanceTimeVaryingValuesToCurrentTime(GraphTime aCurrentTime,
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
GraphTime aBlockedTime);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void NotifyMainThreadListeners() {
NS_ASSERTION(NS_IsMainThread(), "Call only on main thread");
for (int32_t i = mMainThreadListeners.Length() - 1; i >= 0; --i) {
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
mMainThreadListeners[i]->NotifyMainThreadTrackEnded();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
mMainThreadListeners.Clear();
}
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
bool ShouldNotifyTrackEnded() {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
NS_ASSERTION(NS_IsMainThread(), "Call only on main thread");
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
if (!mMainThreadEnded || mEndedNotificationSent) {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
return false;
}
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
mEndedNotificationSent = true;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
return true;
}
// This state is all initialized on the main thread but
// otherwise modified only on the media graph thread.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// Buffered data. The start of the buffer corresponds to mStartTime.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Conceptually the buffer contains everything this track has ever played,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// but we forget some prefix of the buffered data to bound the space usage.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// Note that this may be null for tracks that never contain data, like
// non-external AudioNodeTracks.
const UniquePtr<MediaSegment> mSegment;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// The time when the buffered data could be considered to have started
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// playing. This increases over time to account for time the track was
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// blocked before mCurrentTime.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
GraphTime mStartTime;
// The time until which we last called mSegment->ForgetUpTo().
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime mForgottenTime;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// True once we've processed mSegment until the end and no more data will be
// added. Note that mSegment might still contain data for the current
// iteration.
bool mEnded;
// True after track listeners have been notified that this track has ended.
bool mNotifiedEnded;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Client-set volume of this track
nsTArray<RefPtr<MediaTrackListener>> mTrackListeners;
nsTArray<MainThreadMediaTrackListener*> mMainThreadListeners;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// This track's associated disabled mode. It can either by disabled by frames
// being replaced by black, or by retaining the previous frame.
DisabledTrackMode mDisabledMode;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// GraphTime at which this track starts blocking.
// This is only valid up to mStateComputedTime. The track is considered to
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// have not been blocked before mCurrentTime (its mStartTime is
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// increased as necessary to account for that time instead).
GraphTime mStartBlocking;
// MediaInputPorts to which this is connected
nsTArray<MediaInputPort*> mConsumers;
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Number of outstanding suspend operations on this track. Track is
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* suspended when this is > 0.
*/
int32_t mSuspendedCount;
// Main-thread views of state
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
TrackTime mMainThreadCurrentTime;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
bool mMainThreadEnded;
bool mEndedNotificationSent;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
bool mMainThreadDestroyed;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Our media track graph. null if destroyed on the graph thread.
MediaTrackGraphImpl* mGraph;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* This is a track into which a decoder can write audio or video.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* Audio or video can be written on any thread, but you probably want to
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* always write from the same thread to avoid unexpected interleavings.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
*
* For audio the sample rate of the written data can differ from the sample rate
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* of the graph itself. Use SetAppendDataSourceRate to inform the track what
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* rate written audio data will be sampled in.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class SourceMediaTrack : public MediaTrack {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
SourceMediaTrack(MediaSegment::Type aType, TrackRate aSampleRate);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
SourceMediaTrack* AsSourceTrack() override { return this; }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Main thread only
/**
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* Enable or disable pulling.
* When pulling is enabled, NotifyPull gets called on the
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* MediaTrackListeners for this track during the MediaTrackGraph
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* control loop. Pulling is initially disabled. Due to unavoidable race
* conditions, after a call to SetPullingEnabled(false) it is still possible
* for a NotifyPull to occur.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void SetPullingEnabled(bool aEnabled);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Users of audio inputs go through the track so it can track when the
// last track referencing an input goes away, so it can close the cubeb
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// input. Main thread only.
nsresult OpenAudioInput(CubebUtils::AudioDeviceID aID,
AudioDataListener* aListener);
// Main thread only.
void CloseAudioInput(Maybe<CubebUtils::AudioDeviceID>& aID);
// Main thread only.
void Destroy() override;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// MediaTrackGraph thread only
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void DestroyImpl() override;
// Call these on any thread.
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Call all MediaTrackListeners to request new data via the NotifyPull
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* API (if enabled).
* aDesiredUpToTime (in): end time of new data requested.
*
* Returns true if new data is about to be added.
*/
bool PullNewData(GraphTime aDesiredUpToTime);
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Extract any state updates pending in the track, and apply them.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
void ExtractPendingInput(GraphTime aCurrentTime, GraphTime aDesiredUpToTime);
/**
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* All data appended with AppendData() from this point on will be resampled
* from aRate to the graph rate.
*
* Resampling for video does not make sense and is forbidden.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void SetAppendDataSourceRate(TrackRate aRate);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Append media data to this track. Ownership of aSegment remains with the
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* caller, but aSegment is emptied. Returns 0 if the data was not appended
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* because the stream has ended. Returns the duration of the appended data in
* the graph's track rate otherwise.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
TrackTime AppendData(MediaSegment* aSegment,
MediaSegment* aRawSegment = nullptr);
/**
* Clear any data appended with AppendData() that hasn't entered the graph
* yet. Returns the duration of the cleared data in the graph's track rate.
*/
TrackTime ClearFutureData();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Indicate that this track has ended. Do not do any more API calls affecting
* this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void End();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Overriding allows us to hold the mMutex lock while changing the track
// enable status
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void SetEnabledImpl(DisabledTrackMode aMode) override;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Overriding allows us to ensure mMutex is locked while changing the track
// enable status
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void ApplyTrackDisabling(MediaSegment* aSegment,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
MediaSegment* aRawSegment = nullptr) override {
mMutex.AssertCurrentThreadOwns();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrack::ApplyTrackDisabling(aSegment, aRawSegment);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
void RemoveAllDirectListenersImpl() override;
// The value set here is applied in MoveToSegment so we can avoid the
// buffering delay in applying the change. See Bug 1443511.
void SetVolume(float aVolume);
float GetVolumeLocked();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
friend class MediaTrackGraphImpl;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
protected:
enum TrackCommands : uint32_t;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
virtual ~SourceMediaTrack();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Data to cater for appending media data to this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
struct TrackData {
// Sample rate of the input data.
TrackRate mInputRate;
// Resampler if the rate of the input track does not match the
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// MediaTrackGraph's.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
nsAutoRef<SpeexResamplerState> mResampler;
uint32_t mResamplerChannelCount;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Each time the track updates are flushed to the media graph thread,
// the segment buffer is emptied.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
UniquePtr<MediaSegment> mData;
// True once the producer has signaled that no more data is coming.
bool mEnded;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// True if the producer of this track is having data pulled by the graph.
bool mPullingEnabled;
};
bool NeedsMixing();
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void ResampleAudioToGraphSampleRate(MediaSegment* aSegment);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void AddDirectListenerImpl(
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
already_AddRefed<DirectMediaTrackListener> aListener) override;
void RemoveDirectListenerImpl(DirectMediaTrackListener* aListener) override;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Notify direct consumers of new data to this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* The data doesn't have to be resampled (though it may be). This is called
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* from AppendData on the thread providing the data, and will call
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* the Listeners on this thread.
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void NotifyDirectConsumers(MediaSegment* aSegment);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual void AdvanceTimeVaryingValuesToCurrentTime(
GraphTime aCurrentTime, GraphTime aBlockedTime) override;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Only accessed on the MTG thread. Used so to ask the MTGImpl to usecount
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// users of a specific input.
// XXX Should really be a CubebUtils::AudioDeviceID, but they aren't
// copyable (opaque pointers)
RefPtr<AudioDataListener> mInputListener;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// This must be acquired *before* MediaTrackGraphImpl's lock, if they are
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// held together.
Mutex mMutex;
// protected by mMutex
float mVolume = 1.0;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
UniquePtr<TrackData> mUpdateTrack;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
nsTArray<RefPtr<DirectMediaTrackListener>> mDirectTrackListeners;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* A ref-counted wrapper of a MediaTrack that allows multiple users to share a
* reference to the same MediaTrack with the purpose of being guaranteed that
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* the graph it is in is kept alive.
*
* Automatically suspended on creation and destroyed on destruction. Main thread
* only.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
struct SharedDummyTrack {
NS_INLINE_DECL_REFCOUNTING(SharedDummyTrack)
explicit SharedDummyTrack(MediaTrack* aTrack) : mTrack(aTrack) {
mTrack->Suspend();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
const RefPtr<MediaTrack> mTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
private:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
~SharedDummyTrack() { mTrack->Destroy(); }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Represents a connection between a ProcessedMediaTrack and one of its
* input tracks.
* We make these refcounted so that track-related messages with MediaInputPort*
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* pointers can be sent to the main thread safely.
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* When a port's source or destination track dies, the track's DestroyImpl
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* calls MediaInputPort::Disconnect to disconnect the port from
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* the source and destination tracks.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* The lifetimes of MediaInputPort are controlled from the main thread.
* The media graph adds a reference to the port. When a MediaInputPort is no
* longer needed, main-thread code sends a Destroy message for the port and
* clears its reference (the last main-thread reference to the object). When
* the Destroy message is processed on the graph manager thread we disconnect
* the port and drop the graph's reference, destroying the object.
*/
class MediaInputPort final {
private:
// Do not call this constructor directly. Instead call
// aDest->AllocateInputPort.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaInputPort(MediaTrack* aSource, ProcessedMediaTrack* aDest,
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
uint16_t aInputNumber, uint16_t aOutputNumber)
: mSource(aSource),
mDest(aDest),
mInputNumber(aInputNumber),
mOutputNumber(aOutputNumber),
mGraph(nullptr) {
MOZ_COUNT_CTOR(MediaInputPort);
}
// Private destructor, to discourage deletion outside of Release():
MOZ_COUNTED_DTOR(MediaInputPort)
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaInputPort)
// Called on graph manager thread
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Do not call these from outside MediaTrackGraph.cpp!
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void Init();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Called during message processing to trigger removal of this track.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void Disconnect();
// Control API
/**
* Disconnects and destroys the port. The caller must not reference this
* object again.
*/
void Destroy();
// Any thread
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrack* GetSource() const { return mSource; }
ProcessedMediaTrack* GetDestination() const { return mDest; }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
uint16_t InputNumber() const { return mInputNumber; }
uint16_t OutputNumber() const { return mOutputNumber; }
// Call on graph manager thread
struct InputInterval {
GraphTime mStart;
GraphTime mEnd;
bool mInputIsBlocked;
};
// Find the next time interval starting at or after aTime during which
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// aPort->mDest is not blocked and aPort->mSource's blocking status does not
// change. A null aPort returns a blocked interval starting at aTime.
static InputInterval GetNextInputInterval(MediaInputPort const* aPort,
GraphTime aTime);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
* Returns the graph that owns this port.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrackGraphImpl* GraphImpl();
MediaTrackGraph* Graph();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Sets the graph that owns this track. Should only be called once.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void SetGraphImpl(MediaTrackGraphImpl* aGraph);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Notify the port that the source MediaTrack has been suspended.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
void Suspended();
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Notify the port that the source MediaTrack has been resumed.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
void Resumed();
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const {
size_t amount = 0;
// Not owned:
// - mSource
// - mDest
// - mGraph
return amount;
}
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
private:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
friend class MediaTrackGraphImpl;
friend class MediaTrack;
friend class ProcessedMediaTrack;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Never modified after Init()
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrack* mSource;
ProcessedMediaTrack* mDest;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// The input and output numbers are optional, and are currently only used by
// Web Audio.
const uint16_t mInputNumber;
const uint16_t mOutputNumber;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Our media track graph
MediaTrackGraphImpl* mGraph;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* This track processes zero or more input tracks in parallel to produce
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* its output. The details of how the output is produced are handled by
* subclasses overriding the ProcessInput method.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class ProcessedMediaTrack : public MediaTrack {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
ProcessedMediaTrack(TrackRate aSampleRate, MediaSegment::Type aType,
MediaSegment* aSegment)
: MediaTrack(aSampleRate, aType, aSegment),
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
mAutoend(true),
mCycleMarker(0) {}
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Control API.
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Allocates a new input port attached to source aTrack.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* This port can be removed by calling MediaInputPort::Destroy().
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
already_AddRefed<MediaInputPort> AllocateInputPort(
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
MediaTrack* aTrack, uint16_t aInputNumber = 0,
uint16_t aOutputNumber = 0);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Queue a message to set the autoend flag on this track (defaults to
* true). When this flag is set, and the input track has ended playout
* (including if there is no input track), this track automatically
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* enters the ended state.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
virtual void QueueSetAutoend(bool aAutoend);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
ProcessedMediaTrack* AsProcessedTrack() override { return this; }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
friend class MediaTrackGraphImpl;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Do not call these from outside MediaTrackGraph.cpp!
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual void AddInput(MediaInputPort* aPort);
virtual void RemoveInput(MediaInputPort* aPort) {
mInputs.RemoveElement(aPort) || mSuspendedInputs.RemoveElement(aPort);
}
bool HasInputPort(MediaInputPort* aPort) const {
return mInputs.Contains(aPort) || mSuspendedInputs.Contains(aPort);
}
uint32_t InputPortCount() const {
return mInputs.Length() + mSuspendedInputs.Length();
}
void InputSuspended(MediaInputPort* aPort);
void InputResumed(MediaInputPort* aPort);
void DestroyImpl() override;
/**
* This gets called after we've computed the blocking states for all
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* tracks (mBlocked is up to date up to mStateComputedTime).
* Also, we've produced output for all tracks up to this one. If this track
* is not in a cycle, then all its source tracks have produced data.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* Generate output from aFrom to aTo.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* This will be called on tracks that have ended. Most track types should
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* just return immediately if they're ended, but some may wish to update
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* internal state (see AudioNodeTrack).
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* ProcessInput is allowed to set mEnded only if ALLOW_END is in aFlags. (This
* flag will be set when aTo >= mStateComputedTime, i.e. when we've produced
* the last block of data we need to produce.) Otherwise we can get into a
* situation where we've determined the track should not block before
* mStateComputedTime, but the track ends before mStateComputedTime, violating
* the invariant that ended tracks are blocked.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
enum { ALLOW_END = 0x01 };
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual void ProcessInput(GraphTime aFrom, GraphTime aTo,
uint32_t aFlags) = 0;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
void SetAutoendImpl(bool aAutoend) { mAutoend = aAutoend; }
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// Only valid after MediaTrackGraphImpl::UpdateTrackOrder() has run.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// A DelayNode is considered to break a cycle and so this will not return
// true for echo loops, only for muted cycles.
bool InMutedCycle() const { return mCycleMarker; }
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override {
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
size_t amount = MediaTrack::SizeOfExcludingThis(aMallocSizeOf);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Not owned:
// - mInputs elements
// - mSuspendedInputs elements
amount += mInputs.ShallowSizeOfExcludingThis(aMallocSizeOf);
amount += mSuspendedInputs.ShallowSizeOfExcludingThis(aMallocSizeOf);
return amount;
}
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
protected:
// This state is all accessed only on the media graph thread.
// The list of all inputs that are not currently suspended.
nsTArray<MediaInputPort*> mInputs;
// The list of all inputs that are currently suspended.
nsTArray<MediaInputPort*> mSuspendedInputs;
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
bool mAutoend;
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// After UpdateTrackOrder(), mCycleMarker is either 0 or 1 to indicate
// whether this track is in a muted cycle. During ordering it can contain
// other marker values - see MediaTrackGraphImpl::UpdateTrackOrder().
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
uint32_t mCycleMarker;
};
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* There is a single MediaTrackGraph per window.
* Additionaly, each OfflineAudioContext object creates its own MediaTrackGraph
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
* object too.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
class MediaTrackGraph {
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
public:
// We ensure that the graph current time advances in multiples of
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// IdealAudioBlockSize()/AudioStream::PreferredSampleRate(). A track that
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// never blocks and has the ideal audio rate will produce audio in multiples
// of the block size.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
// Initializing a graph that outputs audio can take quite long on some
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// platforms. Code that want to output audio at some point can express the
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// fact that they will need an audio track at some point by passing
// AUDIO_THREAD_DRIVER when getting an instance of MediaTrackGraph, so that
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// the graph starts with the right driver.
enum GraphDriverType {
AUDIO_THREAD_DRIVER,
SYSTEM_THREAD_DRIVER,
OFFLINE_THREAD_DRIVER
};
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
// A MediaTrackGraph running an AudioWorklet must always be run from the
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// same thread, in order to run js. To acheive this, create the graph with
// a SINGLE_THREAD RunType. DIRECT_DRIVER will run the graph directly off
// the GraphDriver's thread.
enum GraphRunType {
DIRECT_DRIVER,
SINGLE_THREAD,
};
static const uint32_t AUDIO_CALLBACK_DRIVER_SHUTDOWN_TIMEOUT = 20 * 1000;
static const TrackRate REQUEST_DEFAULT_SAMPLE_RATE = 0;
constexpr static const CubebUtils::AudioDeviceID DEFAULT_OUTPUT_DEVICE =
nullptr;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Main thread only
static MediaTrackGraph* GetInstanceIfExists(
nsPIDOMWindowInner* aWindow, TrackRate aSampleRate,
CubebUtils::AudioDeviceID aOutputDeviceID);
static MediaTrackGraph* GetInstance(
GraphDriverType aGraphDriverRequested, nsPIDOMWindowInner* aWindow,
TrackRate aSampleRate, CubebUtils::AudioDeviceID aOutputDeviceID);
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
static MediaTrackGraph* CreateNonRealtimeInstance(
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
TrackRate aSampleRate, nsPIDOMWindowInner* aWindowId);
// Return the correct main thread for this graph. This always returns
// something that is valid. Thread safe.
AbstractThread* AbstractMainThread();
// Idempotent
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
static void DestroyNonRealtimeInstance(MediaTrackGraph* aGraph);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
virtual nsresult OpenAudioInput(CubebUtils::AudioDeviceID aID,
AudioDataListener* aListener) = 0;
virtual void CloseAudioInput(Maybe<CubebUtils::AudioDeviceID>& aID,
AudioDataListener* aListener) = 0;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Control API.
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Create a track that a media decoder (or some other source of
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* media data, such as a camera) can write to.
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
SourceMediaTrack* CreateSourceTrack(MediaSegment::Type aType);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Create a track that will forward data from its input track.
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
*
* A TrackUnionStream can have 0 or 1 input streams. Adding more than that is
* an error.
*
* A TrackUnionStream will end when autoending is enabled (default) and there
* is no input, or the input's source is ended. If there is no input and
* autoending is disabled, TrackUnionStream will continue to produce silence
* for audio or the last video frame for video.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
ProcessedMediaTrack* CreateForwardedInputTrack(MediaSegment::Type aType);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Create a track that will mix all its audio inputs.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
AudioCaptureTrack* CreateAudioCaptureTrack();
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/**
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Add a new track to the graph. Main thread.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void AddTrack(MediaTrack* aTrack);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/* From the main thread, ask the MTG to tell us when the graph
* thread is running, and audio is being processed, by resolving the returned
* promise. The promise is rejected with NS_ERROR_NOT_AVAILABLE if aNodeTrack
* is destroyed, or NS_ERROR_ILLEGAL_DURING_SHUTDOWN if the graph is shut
* down, before the promise could be resolved. */
using GraphStartedPromise = GenericPromise;
RefPtr<GraphStartedPromise> NotifyWhenGraphStarted(AudioNodeTrack* aTrack);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
/* From the main thread, suspend, resume or close an AudioContext.
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* aTracks are the tracks of all the AudioNodes of the AudioContext that
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
* need to be suspended or resumed. This can be empty if this is a second
* consecutive suspend call and all the nodes are already suspended.
*
* This can possibly pause the graph thread, releasing system resources, if
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* all tracks have been suspended/closed.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* When the operation is complete, the returned promise is resolved.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*/
using AudioContextOperationPromise =
MozPromise<dom::AudioContextState, bool, true>;
RefPtr<AudioContextOperationPromise> ApplyAudioContextOperation(
MediaTrack* aDestinationTrack, const nsTArray<MediaTrack*>& aTracks,
dom::AudioContextOperation aOperation);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
bool IsNonRealtime() const;
/**
* Start processing non-realtime for a specific number of ticks.
*/
void StartNonRealtimeProcessing(uint32_t aTicksToProcess);
/**
* Media graph thread only.
* Dispatches a runnable that will run on the main thread after all
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* main-thread track state has been updated, i.e., during stable state.
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
* Should only be called during MediaTrackListener callbacks or during
* ProcessedMediaTrack::ProcessInput().
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
*
* Note that if called during shutdown the runnable will be ignored and
* released on main thread.
*/
void DispatchToMainThreadStableState(already_AddRefed<nsIRunnable> aRunnable);
/**
* Returns graph sample rate in Hz.
*/
TrackRate GraphRate() const { return mSampleRate; }
double AudioOutputLatency();
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
void RegisterCaptureTrackForWindow(uint64_t aWindowId,
ProcessedMediaTrack* aCaptureTrack);
void UnregisterCaptureTrackForWindow(uint64_t aWindowId);
already_AddRefed<MediaInputPort> ConnectToCaptureTrack(
uint64_t aWindowId, MediaTrack* aMediaTrack);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
void AssertOnGraphThreadOrNotRunning() const {
MOZ_ASSERT(OnGraphThreadOrNotRunning());
}
/**
* Returns a watchable of the graph's main-thread observable graph time.
* Main thread only.
*/
virtual Watchable<GraphTime>& CurrentTime() = 0;
/**
* Graph thread function to return the time at which all processing has been
* completed. Some tracks may have performed processing beyond this time.
*/
GraphTime ProcessedTime() const;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
protected:
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
explicit MediaTrackGraph(TrackRate aSampleRate) : mSampleRate(aSampleRate) {
MOZ_COUNT_CTOR(MediaTrackGraph);
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
}
MOZ_COUNTED_DTOR_VIRTUAL(MediaTrackGraph)
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
// Intended only for assertions, either on graph thread or not running (in
// which case we must be on the main thread).
virtual bool OnGraphThreadOrNotRunning() const = 0;
virtual bool OnGraphThread() const = 0;
// Intended only for internal assertions. Main thread only.
virtual bool Destroyed() const = 0;
/**
* Sample rate at which this graph runs. For real time graphs, this is
* the rate of the audio mixer. For offline graphs, this is the rate specified
* at construction.
*/
Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt This change mainly removes the `mTracks` member from MediaStream and moves all associated members up a level, so that a MediaStream in practice represents a single track. Classes will be renamed in a future patch to reflect this. Other changes include: The new `mEnded` member of MediaStream changes meaning to only become true when all data in the stream has been processed. It stems from StreamTracks::Track::mEnded which used to become true as soon as the last bit of data had been added to a track, and there could still be data in the track that would get processed in future iterations. We are moving towards not having any future data in tracks, which is why this change is ok to make -- keeping the old behavior will soon not make sense. TrackUnionStream is changed to no longer take a list of streams as input and forward the union of their tracks to itself. Instead it's limited to having one track as input at a time. The autofinishing functionality that TrackUnionStream had before has been transformed into an autoending functionality to allow it to defer ending until its been told that it's ok to end through the control API. This lets a single TrackUnionStream span the lifetime of multiple inputs, which will be useful for making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name a few potential use cases. AudioNodeStreams used to only have a track (and thus an AudioSegment) if the EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing a track, AudioNodeStreams inherently have an AudioSegment as a member. It is however only used with data if the EXTERNAL_OUTPUT flag is enabled. Differential Revision: https://phabricator.services.mozilla.com/D45821 --HG-- extra : moz-landing-system : lando
2019-10-02 13:22:53 +03:00
const TrackRate mSampleRate;
Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE. Backed out changeset 80417bdfa721 (bug 1454998) Backed out changeset 8ff03f2f4ca2 (bug 1454998) Backed out changeset ae6056b748d1 (bug 1454998) Backed out changeset ab721cb2066b (bug 1454998) Backed out changeset d0e8d413cd1c (bug 1454998) Backed out changeset 3ce4dc7e9ae2 (bug 1454998) Backed out changeset 6105a4176729 (bug 1454998) --HG-- rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
};
} // namespace mozilla
Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug This renames the following (in alphabetical order, non-exhaustive): AudioCaptureStream -> AudioCaptureTrack AudioNodeStream -> AudioNodeTrack AudioNodeExternalInputStream -> AudioNodeExternalInputTrack DirectMediaStreamTrackListener -> DirectMediaTrackListener MediaStream -> MediaTrack - Note that there's also dom::MediaTrack. Namespaces differentiate them. MediaStreamGraph -> MediaTrackGraph MediaStreamTrackListener -> MediaTrackListener MSG -> MTG (in comments) ProcessedMediaStream -> ProcessedMediaTrack SharedDummyStream -> SharedDummyTrack SourceMediaStream -> SourceMediaTrack StreamTime -> TrackTime TrackUnionStream -> ForwardedInputTrack - Because this no longer takes a union of anything, but only a single track as input. Other minor classes, members and comments have been updated to reflect these name changes. Differential Revision: https://phabricator.services.mozilla.com/D46146 --HG-- rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h extra : moz-landing-system : lando
2019-10-02 13:23:02 +03:00
#endif /* MOZILLA_MEDIATRACKGRAPH_H_ */