#include "third_party/blink/renderer/modules/breakout_box/media_stream_video_track_underlying_source.h"
#include "base/feature_list.h"
#include "base/task/sequenced_task_runner.h"
#include "media/capture/video/video_capture_buffer_pool_util.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/breakout_box/frame_queue_transferring_optimizer.h"
#include "third_party/blink/renderer/modules/breakout_box/metrics.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
namespace {
constexpr char kScreenPrefix[] = …;
constexpr char kWindowPrefix[] = …;
bool IsScreenOrWindowCapture(const std::string& device_id) { … }
}
BASE_FEATURE(…);
const int MediaStreamVideoTrackUnderlyingSource::kMaxMonitoredFrameCount = …;
const int MediaStreamVideoTrackUnderlyingSource::kMinMonitoredFrameCount = …;
MediaStreamVideoTrackUnderlyingSource::MediaStreamVideoTrackUnderlyingSource(
ScriptState* script_state,
MediaStreamComponent* track,
ScriptWrappable* media_stream_track_processor,
wtf_size_t max_queue_size)
: … { … }
void MediaStreamVideoTrackUnderlyingSource::Trace(Visitor* visitor) const { … }
std::unique_ptr<ReadableStreamTransferringOptimizer>
MediaStreamVideoTrackUnderlyingSource::GetStreamTransferOptimizer() { … }
void MediaStreamVideoTrackUnderlyingSource::OnSourceTransferStarted(
scoped_refptr<base::SequencedTaskRunner> transferred_runner,
CrossThreadPersistent<TransferredVideoFrameQueueUnderlyingSource> source) { … }
void MediaStreamVideoTrackUnderlyingSource::OnFrameFromTrack(
scoped_refptr<media::VideoFrame> media_frame,
base::TimeTicks estimated_capture_time) { … }
bool MediaStreamVideoTrackUnderlyingSource::StartFrameDelivery() { … }
void MediaStreamVideoTrackUnderlyingSource::StopFrameDelivery() { … }
std::string MediaStreamVideoTrackUnderlyingSource::GetDeviceIdForMonitoring(
const MediaStreamDevice& device) { … }
wtf_size_t MediaStreamVideoTrackUnderlyingSource::GetFramePoolSize(
const MediaStreamDevice& device) { … }
}