Skip to content

Commit

Permalink
browser(webkit): manually reencode image as multiple frames (#2470)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Jun 4, 2020
1 parent 95ef71c commit 53f6caf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion browser_patches/webkit/BUILD_NUMBER
@@ -1 +1 @@
1265
1266
9 changes: 6 additions & 3 deletions browser_patches/webkit/patches/bootstrap.diff
Expand Up @@ -8976,10 +8976,10 @@ index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d2
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d75a8076d663ca75d1c42702087d2b0787215f24
index 0000000000000000000000000000000000000000..39ebb8bf0cd3bda7913e9f029eeff5256de3fcac
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
@@ -0,0 +1,392 @@
@@ -0,0 +1,395 @@
+/*
+ * Copyright (c) 2010, The WebM Project authors. All rights reserved.
+ * Copyright (c) 2013 The Chromium Authors. All rights reserved.
Expand Down Expand Up @@ -9193,7 +9193,10 @@ index 0000000000000000000000000000000000000000..d75a8076d663ca75d1c42702087d2b07
+ {
+ m_encoderQueue->dispatch([this, frame = WTFMove(frame)] {
+ frame->convertToVpxImage(m_image.get());
+ encodeFrame(m_image.get(), frame->duration());
+ // TODO: figure out why passing duration to the codec results in much
+ // worse visual quality and makes video stutter.
+ for (int i = 0; i < frame->duration(); i++)
+ encodeFrame(m_image.get(), 1);
+ });
+ }
+
Expand Down

0 comments on commit 53f6caf

Please sign in to comment.