chromium/third_party/blink/renderer/platform/media/video_frame_compositor.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/public/platform/media/video_frame_compositor.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "media/base/media_switches.h"
#include "media/base/video_frame.h"
#include "third_party/blink/public/platform/web_video_frame_submitter.h"

namespace blink {

RenderingMode;

// Amount of time to wait between UpdateCurrentFrame() callbacks before starting
// background rendering to keep the Render() callbacks moving.
const int kBackgroundRenderingTimeoutMs =;
const int kForceBeginFramesTimeoutMs =;

// static
constexpr const char VideoFrameCompositor::kTracingCategory[];

VideoFrameCompositor::VideoFrameCompositor(
    const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
    std::unique_ptr<WebVideoFrameSubmitter> submitter)
    :{}

cc::UpdateSubmissionStateCB
VideoFrameCompositor::GetUpdateSubmissionStateCallback() {}

void VideoFrameCompositor::SetIsSurfaceVisible(
    bool is_visible,
    base::WaitableEvent* done_event) {}

void VideoFrameCompositor::InitializeSubmitter() {}

VideoFrameCompositor::~VideoFrameCompositor() {}

void VideoFrameCompositor::EnableSubmission(
    const viz::SurfaceId& id,
    media::VideoTransformation transform,
    bool force_submit) {}

bool VideoFrameCompositor::IsClientSinkAvailable() {}

void VideoFrameCompositor::OnRendererStateUpdate(bool new_state) {}

void VideoFrameCompositor::SetVideoFrameProviderClient(
    cc::VideoFrameProvider::Client* client) {}

scoped_refptr<media::VideoFrame> VideoFrameCompositor::GetCurrentFrame() {}

scoped_refptr<media::VideoFrame>
VideoFrameCompositor::GetCurrentFrameOnAnyThread() {}

void VideoFrameCompositor::SetCurrentFrame_Locked(
    scoped_refptr<media::VideoFrame> frame,
    base::TimeTicks expected_display_time) {}

void VideoFrameCompositor::PutCurrentFrame() {}

bool VideoFrameCompositor::UpdateCurrentFrame(base::TimeTicks deadline_min,
                                              base::TimeTicks deadline_max) {}

bool VideoFrameCompositor::HasCurrentFrame() {}

base::TimeDelta VideoFrameCompositor::GetPreferredRenderInterval() {}

void VideoFrameCompositor::Start(RenderCallback* callback) {}

void VideoFrameCompositor::Stop() {}

void VideoFrameCompositor::PaintSingleFrame(
    scoped_refptr<media::VideoFrame> frame,
    bool repaint_duplicate_frame) {}

void VideoFrameCompositor::UpdateCurrentFrameIfStale(UpdateType type) {}

void VideoFrameCompositor::SetOnNewProcessedFrameCallback(
    OnNewProcessedFrameCB cb) {}

void VideoFrameCompositor::SetOnFramePresentedCallback(
    OnNewFramePresentedCB present_cb) {}

void VideoFrameCompositor::StartForceBeginFrames() {}

void VideoFrameCompositor::StopForceBeginFrames() {}

std::unique_ptr<WebMediaPlayer::VideoFramePresentationMetadata>
VideoFrameCompositor::GetLastPresentedFrameMetadata() {}

bool VideoFrameCompositor::ProcessNewFrame(
    scoped_refptr<media::VideoFrame> frame,
    base::TimeTicks presentation_time,
    bool repaint_duplicate_frame) {}

void VideoFrameCompositor::SetIsPageVisible(bool is_visible) {}

void VideoFrameCompositor::SetForceSubmit(bool force_submit) {}

base::TimeDelta VideoFrameCompositor::GetLastIntervalWithoutLock()
    NO_THREAD_SAFETY_ANALYSIS {}

void VideoFrameCompositor::BackgroundRender(RenderingMode mode) {}

bool VideoFrameCompositor::CallRender(base::TimeTicks deadline_min,
                                      base::TimeTicks deadline_max,
                                      RenderingMode mode) {}

void VideoFrameCompositor::OnContextLost() {}

}  // namespace blink