#include "third_party/blink/renderer/modules/mediasource/same_thread_media_source_attachment.h"
#include "base/memory/scoped_refptr.h"
#include "base/types/pass_key.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/modules/mediasource/attachment_creation_pass_key_provider.h"
#include "third_party/blink/renderer/modules/mediasource/media_source.h"
#include "third_party/blink/renderer/modules/mediasource/same_thread_media_source_tracer.h"
namespace {
blink::SameThreadMediaSourceTracer* GetTracerImpl(
blink::MediaSourceTracer* tracer) { … }
blink::MediaSource* GetMediaSource(blink::MediaSourceTracer* tracer) { … }
blink::HTMLMediaElement* GetMediaElement(blink::MediaSourceTracer* tracer) { … }
}
namespace blink {
SameThreadMediaSourceAttachment::SameThreadMediaSourceAttachment(
MediaSource* media_source,
AttachmentCreationPassKeyProvider::PassKey )
: … { … }
SameThreadMediaSourceAttachment::~SameThreadMediaSourceAttachment() { … }
void SameThreadMediaSourceAttachment::NotifyDurationChanged(
MediaSourceTracer* tracer,
double duration) { … }
base::TimeDelta SameThreadMediaSourceAttachment::GetRecentMediaTime(
MediaSourceTracer* tracer) { … }
bool SameThreadMediaSourceAttachment::GetElementError(
MediaSourceTracer* tracer) { … }
AudioTrackList* SameThreadMediaSourceAttachment::CreateAudioTrackList(
MediaSourceTracer* tracer) { … }
VideoTrackList* SameThreadMediaSourceAttachment::CreateVideoTrackList(
MediaSourceTracer* tracer) { … }
void SameThreadMediaSourceAttachment::AddAudioTrackToMediaElement(
MediaSourceTracer* tracer,
AudioTrack* track) { … }
void SameThreadMediaSourceAttachment::AddVideoTrackToMediaElement(
MediaSourceTracer* tracer,
VideoTrack* track) { … }
void SameThreadMediaSourceAttachment::RemoveAudioTracksFromMediaElement(
MediaSourceTracer* tracer,
Vector<String> audio_ids,
bool enqueue_change_event) { … }
void SameThreadMediaSourceAttachment::RemoveVideoTracksFromMediaElement(
MediaSourceTracer* tracer,
Vector<String> video_ids,
bool enqueue_change_event) { … }
void SameThreadMediaSourceAttachment::OnMediaSourceContextDestroyed() { … }
void SameThreadMediaSourceAttachment::Unregister() { … }
MediaSourceTracer*
SameThreadMediaSourceAttachment::StartAttachingToMediaElement(
HTMLMediaElement* element,
bool* success) { … }
void SameThreadMediaSourceAttachment::CompleteAttachingToMediaElement(
MediaSourceTracer* tracer,
std::unique_ptr<WebMediaSource> web_media_source) { … }
void SameThreadMediaSourceAttachment::Close(MediaSourceTracer* tracer) { … }
WebTimeRanges SameThreadMediaSourceAttachment::BufferedInternal(
MediaSourceTracer* tracer) const { … }
WebTimeRanges SameThreadMediaSourceAttachment::SeekableInternal(
MediaSourceTracer* tracer) const { … }
void SameThreadMediaSourceAttachment::OnTrackChanged(MediaSourceTracer* tracer,
TrackBase* track) { … }
void SameThreadMediaSourceAttachment::OnElementTimeUpdate(double time) { … }
void SameThreadMediaSourceAttachment::OnElementError() { … }
void SameThreadMediaSourceAttachment::OnElementContextDestroyed() { … }
void SameThreadMediaSourceAttachment::
VerifyCalledWhileContextsAliveForDebugging() const { … }
}