#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/mediastream/media_stream.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_track_event.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_track_impl.h"
#include "third_party/blink/renderer/modules/mediastream/transferred_media_stream_track.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_source.h"
namespace blink {
static bool ContainsTrack(MediaStreamTrackVector& track_vector,
MediaStreamTrack* media_stream_track) { … }
static void ProcessTrack(MediaStreamTrack* track,
MediaStreamTrackVector& track_vector) { … }
MediaStream* MediaStream::Create(ExecutionContext* context) { … }
MediaStream* MediaStream::Create(ExecutionContext* context,
MediaStream* stream) { … }
MediaStream* MediaStream::Create(ExecutionContext* context,
const MediaStreamTrackVector& tracks) { … }
MediaStream* MediaStream::Create(ExecutionContext* context,
MediaStreamDescriptor* stream_descriptor) { … }
void MediaStream::Create(ExecutionContext* context,
MediaStreamDescriptor* stream_descriptor,
TransferredMediaStreamTrack* track,
base::OnceCallback<void(MediaStream*)> callback) { … }
MediaStream* MediaStream::Create(ExecutionContext* context,
MediaStreamDescriptor* stream_descriptor,
const MediaStreamTrackVector& audio_tracks,
const MediaStreamTrackVector& video_tracks) { … }
MediaStream::MediaStream(ExecutionContext* context,
MediaStreamDescriptor* stream_descriptor,
TransferredMediaStreamTrack* transferred_track,
base::OnceCallback<void(MediaStream*)> callback)
: … { … }
void MediaStream::OnMediaStreamTrackInitialized() { … }
MediaStream::MediaStream(ExecutionContext* context,
MediaStreamDescriptor* stream_descriptor,
const MediaStreamTrackVector& audio_tracks,
const MediaStreamTrackVector& video_tracks)
: … { … }
MediaStream::MediaStream(ExecutionContext* context,
const MediaStreamTrackVector& audio_tracks,
const MediaStreamTrackVector& video_tracks)
: … { … }
MediaStream::~MediaStream() = default;
bool MediaStream::HasPendingActivity() const { … }
bool MediaStream::EmptyOrOnlyEndedTracks() { … }
bool MediaStream::TracksMatchDescriptor() { … }
MediaStreamTrackVector MediaStream::getTracks() { … }
void MediaStream::addTrack(MediaStreamTrack* track,
ExceptionState& exception_state) { … }
void MediaStream::removeTrack(MediaStreamTrack* track,
ExceptionState& exception_state) { … }
MediaStreamTrack* MediaStream::getTrackById(String id) { … }
MediaStream* MediaStream::clone(ScriptState* script_state) { … }
void MediaStream::TrackEnded() { … }
void MediaStream::RegisterObserver(MediaStreamObserver* observer) { … }
void MediaStream::UnregisterObserver(MediaStreamObserver* observer) { … }
void MediaStream::StreamEnded() { … }
bool MediaStream::AddEventListenerInternal(
const AtomicString& event_type,
EventListener* listener,
const AddEventListenerOptionsResolved* options) { … }
const AtomicString& MediaStream::InterfaceName() const { … }
void MediaStream::AddTrackByComponentAndFireEvents(
MediaStreamComponent* component,
DispatchEventTiming event_timing) { … }
void MediaStream::RemoveTrackByComponentAndFireEvents(
MediaStreamComponent* component,
DispatchEventTiming event_timing) { … }
void MediaStream::AddTrackAndFireEvents(MediaStreamTrack* track,
DispatchEventTiming event_timing) { … }
void MediaStream::RemoveTrackAndFireEvents(MediaStreamTrack* track,
DispatchEventTiming event_timing) { … }
void MediaStream::ScheduleDispatchEvent(Event* event) { … }
void MediaStream::ScheduledEventTimerFired(TimerBase*) { … }
void MediaStream::Trace(Visitor* visitor) const { … }
MediaStream* ToMediaStream(MediaStreamDescriptor* descriptor) { … }
}