chromium/third_party/blink/renderer/modules/mediastream/media_stream.cc

/*
 * Copyright (C) 2011 Google Inc. All rights reserved.
 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#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) {}

}  // namespace blink