WebKit Bugzilla
Attachment 369180 Details for
Bug 197227
: Video stream freeze on front camera orientation changing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197227-20190506153224.patch (text/plain), 5.27 KB, created by
youenn fablet
on 2019-05-06 15:32:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-06 15:32:25 PDT
Size:
5.27 KB
patch
obsolete
>Subversion Revision: 244961 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c6c1f7679f545d94a40166b2a4b7d364ff85b7b1..160d5581ebb0692f17b8569cd6b48cf844874a21 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-06 Youenn Fablet <youenn@apple.com> >+ >+ Video stream freeze on front camera orientation changing >+ https://bugs.webkit.org/show_bug.cgi?id=197227 >+ <rdar://problem/50175498> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use m_currentRotationSessionAngle instead of m_currentRotation to create or not a new rotation session. >+ Covered by updated test. >+ >+ * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h: >+ * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm: >+ (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer): >+ > 2019-05-06 Zan Dobersek <zdobersek@igalia.com> > > [GLib] WebCore::MainThreadSharedTimer should use the appropriate GSource priority, name >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h >index 6cc5ace4a7ab266b3fe0eb21ec559fbab0847aa7..486c9a5d3d69bc593db5e8db7433fb571971dd11 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h >@@ -54,7 +54,7 @@ private: > std::unique_ptr<PixelBufferConformerCV> m_pixelBufferConformer; > RetainPtr<VTImageRotationSessionRef> m_rotationSession; > RetainPtr<CVPixelBufferPoolRef> m_rotationPool; >- webrtc::VideoRotation m_currentRotationAngle { webrtc::kVideoRotation_0 }; >+ webrtc::VideoRotation m_currentRotationSessionAngle { webrtc::kVideoRotation_0 }; > size_t m_rotatedWidth { 0 }; > size_t m_rotatedHeight { 0 }; > OSType m_rotatedFormat; >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm >index 6f6d471a80eb465d11e7b0829fc16f1ee3d756f7..d33806da2e7480c5b6ea5215b4a428d0ecf32ccf 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm >@@ -71,7 +71,7 @@ RetainPtr<CVPixelBufferRef> RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer( > if (!rotation) > return pixelBuffer; > >- if (!m_rotationSession || rotation != m_currentRotation) { >+ if (!m_rotationSession || rotation != m_currentRotationSessionAngle) { > VTImageRotationSessionRef rawRotationSession = nullptr; > auto status = VTImageRotationSessionCreate(kCFAllocatorDefault, rotation, &rawRotationSession); > if (status != noErr) { >@@ -80,7 +80,7 @@ RetainPtr<CVPixelBufferRef> RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer( > } > > m_rotationSession = adoptCF(rawRotationSession); >- m_currentRotation = rotation; >+ m_currentRotationSessionAngle = rotation; > > VTImageRotationSessionSetProperty(rawRotationSession, kVTImageRotationPropertyKey_EnableHighSpeedTransfer, kCFBooleanTrue); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 93169fc697fa3b9f46806ec71c0f912cc9f25670..e3427213851b7187772a25bec88775e1d255da7a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-06 Youenn Fablet <youenn@apple.com> >+ >+ Video stream freeze on front camera orientation changing >+ https://bugs.webkit.org/show_bug.cgi?id=197227 >+ <rdar://problem/50175498> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * webrtc/video-rotation-expected.txt: >+ * webrtc/video-rotation.html: >+ > 2019-05-04 Tadeu Zagallo <tzagallo@apple.com> > > TypedArrays should not store properties that are canonical numeric indices >diff --git a/LayoutTests/webrtc/video-rotation-expected.txt b/LayoutTests/webrtc/video-rotation-expected.txt >index c5ad455e525bc545fbde7107caccccb393527bd0..70dd4fcbdaa9d9af385d9b024d5d42219630a508 100644 >--- a/LayoutTests/webrtc/video-rotation-expected.txt >+++ b/LayoutTests/webrtc/video-rotation-expected.txt >@@ -3,4 +3,5 @@ > PASS Setting video exchange > PASS Track is enabled, video should not be black > PASS Track is enabled and rotated, video should not be black and should change size >+PASS Track is enabled and rotated again, video should not be black and should change size > >diff --git a/LayoutTests/webrtc/video-rotation.html b/LayoutTests/webrtc/video-rotation.html >index 15cf80513ef481a8796fd3d71b06c05c5575d562..a87698dc1d7ecf238aacad09fad97fc05a584000 100644 >--- a/LayoutTests/webrtc/video-rotation.html >+++ b/LayoutTests/webrtc/video-rotation.html >@@ -86,6 +86,15 @@ promise_test((test) => { > return waitForVideoSize(video, 240, 320); > }); > }, "Track is enabled and rotated, video should not be black and should change size"); >+ >+promise_test((test) => { >+ if (window.internals) >+ window.internals.setCameraMediaStreamTrackOrientation(track, 180); >+ >+ return checkVideoBlack(false, "canvas1").then(() => { >+ return waitForVideoSize(video, 320, 240); >+ }); >+}, "Track is enabled and rotated again, video should not be black and should change size"); > </script> > </body> > </html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197227
: 369180 |
369225