Commit 38cf60ed authored by Dan Sanders's avatar Dan Sanders Committed by Commit Bot

Rename VideoFrame::release() to VideoFrame::close().

This matches the naming and behavior of ImageBitmap::close().

Bug: 1108023
Change-Id: I4f5eac7f97eda4b27a38690b75f3c1e3b7545b9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2311110
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790663}
parent 720a0fb8
...@@ -112,7 +112,7 @@ uint32_t VideoFrame::visibleHeight() const { ...@@ -112,7 +112,7 @@ uint32_t VideoFrame::visibleHeight() const {
return frame_->visible_rect().height(); return frame_->visible_rect().height();
} }
void VideoFrame::release() { void VideoFrame::close() {
frame_.reset(); frame_.reset();
} }
......
...@@ -46,7 +46,7 @@ class MODULES_EXPORT VideoFrame final : public ScriptWrappable, ...@@ -46,7 +46,7 @@ class MODULES_EXPORT VideoFrame final : public ScriptWrappable,
uint32_t visibleWidth() const; uint32_t visibleWidth() const;
uint32_t visibleHeight() const; uint32_t visibleHeight() const;
void release(); void close();
// Convenience functions // Convenience functions
scoped_refptr<media::VideoFrame> frame(); scoped_refptr<media::VideoFrame> frame();
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
] interface VideoFrame { ] interface VideoFrame {
[RaisesException] constructor(VideoFrameInit init, ImageBitmap source); [RaisesException] constructor(VideoFrameInit init, ImageBitmap source);
void release(); void close();
[CallWith=ScriptState, RaisesException] Promise<ImageBitmap> createImageBitmap( [CallWith=ScriptState, RaisesException] Promise<ImageBitmap> createImageBitmap(
optional ImageBitmapOptions options = {}); optional ImageBitmapOptions options = {});
......
...@@ -47,7 +47,7 @@ TEST_F(VideoFrameTest, ConstructorAndAttributes) { ...@@ -47,7 +47,7 @@ TEST_F(VideoFrameTest, ConstructorAndAttributes) {
EXPECT_EQ(200u, blink_frame->visibleHeight()); EXPECT_EQ(200u, blink_frame->visibleHeight());
EXPECT_EQ(media_frame, blink_frame->frame()); EXPECT_EQ(media_frame, blink_frame->frame());
blink_frame->release(); blink_frame->close();
EXPECT_EQ(0u, blink_frame->timestamp()); EXPECT_EQ(0u, blink_frame->timestamp());
EXPECT_EQ(0u, blink_frame->codedWidth()); EXPECT_EQ(0u, blink_frame->codedWidth());
......
...@@ -105,7 +105,7 @@ class VideoTrackWritableStreamSink final : public UnderlyingSinkBase { ...@@ -105,7 +105,7 @@ class VideoTrackWritableStreamSink final : public UnderlyingSinkBase {
source_->PushFrame(video_frame->frame(), estimated_capture_time); source_->PushFrame(video_frame->frame(), estimated_capture_time);
if (release_frames_) if (release_frames_)
video_frame->release(); video_frame->close();
return ScriptPromise::CastUndefined(script_state); return ScriptPromise::CastUndefined(script_state);
} }
......
...@@ -8790,9 +8790,9 @@ interface VideoFrame ...@@ -8790,9 +8790,9 @@ interface VideoFrame
getter timestamp getter timestamp
getter visibleHeight getter visibleHeight
getter visibleWidth getter visibleWidth
method close
method constructor method constructor
method createImageBitmap method createImageBitmap
method release
interface VideoPlaybackQuality interface VideoPlaybackQuality
attribute @@toStringTag attribute @@toStringTag
getter corruptedVideoFrames getter corruptedVideoFrames
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment