#include "third_party/blink/renderer/modules/webcodecs/video_frame_handle.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "media/base/video_frame.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame_monitor.h"
#include "third_party/blink/renderer/modules/webcodecs/webcodecs_logger.h"
#include "third_party/skia/include/core/SkImage.h"
namespace blink {
namespace {
base::TimeDelta GetPreferredTimestamp(bool prefer_capture_timestamp,
const media::VideoFrame& video_frame) { … }
}
VideoFrameHandle::VideoFrameHandle(scoped_refptr<media::VideoFrame> frame,
ExecutionContext* context,
std::string monitoring_source_id,
bool prefer_capture_timestamp)
: … { … }
VideoFrameHandle::VideoFrameHandle(scoped_refptr<media::VideoFrame> frame,
sk_sp<SkImage> sk_image,
ExecutionContext* context,
std::string monitoring_source_id,
bool use_capture_timestamp)
: … { … }
VideoFrameHandle::VideoFrameHandle(
scoped_refptr<media::VideoFrame> frame,
sk_sp<SkImage> sk_image,
base::TimeDelta timestamp,
scoped_refptr<WebCodecsLogger::VideoFrameCloseAuditor> close_auditor,
std::string monitoring_source_id)
: … { … }
VideoFrameHandle::VideoFrameHandle(scoped_refptr<media::VideoFrame> frame,
sk_sp<SkImage> sk_image,
base::TimeDelta timestamp,
std::string monitoring_source_id)
: … { … }
VideoFrameHandle::VideoFrameHandle(scoped_refptr<media::VideoFrame> frame,
sk_sp<SkImage> sk_image,
std::string monitoring_source_id)
: … { … }
VideoFrameHandle::VideoFrameHandle(
scoped_refptr<media::VideoFrame> frame,
sk_sp<SkImage> sk_image,
scoped_refptr<WebCodecsLogger::VideoFrameCloseAuditor> close_auditor,
std::string monitoring_source_id)
: … { … }
VideoFrameHandle::~VideoFrameHandle() { … }
scoped_refptr<media::VideoFrame> VideoFrameHandle::frame() { … }
sk_sp<SkImage> VideoFrameHandle::sk_image() { … }
void VideoFrameHandle::Invalidate() { … }
void VideoFrameHandle::SetCloseOnClone() { … }
scoped_refptr<VideoFrameHandle> VideoFrameHandle::Clone() { … }
scoped_refptr<VideoFrameHandle> VideoFrameHandle::CloneForInternalUse() { … }
void VideoFrameHandle::InvalidateLocked() { … }
void VideoFrameHandle::MaybeMonitorOpenFrame() { … }
void VideoFrameHandle::MaybeMonitorCloseFrame() { … }
bool VideoFrameHandle::WebGPURegisterExternalTextureExpireCallback(
WebGPUExternalTextureExpireCallback
webgpu_external_texture_expire_callback) { … }
void VideoFrameHandle::NotifyExpiredLocked() { … }
}