Changeset 245033 in webkit


Ignore:
Timestamp:
May 7, 2019 2:07:00 PM (5 years ago)
Author:
youenn@apple.com
Message:

Video stream freeze on front camera orientation changing
https://bugs.webkit.org/show_bug.cgi?id=197227
<rdar://problem/50175498>

Reviewed by Eric Carlson.

Source/WebCore:

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):

LayoutTests:

  • webrtc/video-rotation-expected.txt:
  • webrtc/video-rotation.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245028 r245033  
     12019-05-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Video stream freeze on front camera orientation changing
     4        https://bugs.webkit.org/show_bug.cgi?id=197227
     5        <rdar://problem/50175498>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * webrtc/video-rotation-expected.txt:
     10        * webrtc/video-rotation.html:
     11
    1122019-05-07  Brent Fulgham  <bfulgham@apple.com>
    213
  • trunk/LayoutTests/webrtc/video-rotation-expected.txt

    r222208 r245033  
    44PASS Track is enabled, video should not be black
    55PASS Track is enabled and rotated, video should not be black and should change size
     6PASS Track is enabled and rotated again, video should not be black and should change size
    67
  • trunk/LayoutTests/webrtc/video-rotation.html

    r222208 r245033  
    8787    });
    8888}, "Track is enabled and rotated, video should not be black and should change size");
     89
     90promise_test((test) => {
     91    if (window.internals)
     92        window.internals.setCameraMediaStreamTrackOrientation(track, 180);
     93
     94    return checkVideoBlack(false, "canvas1").then(() => {
     95        return waitForVideoSize(video, 320, 240);
     96    });
     97}, "Track is enabled and rotated again, video should not be black and should change size");
    8998        </script>
    9099    </body>
  • trunk/Source/WebCore/ChangeLog

    r245032 r245033  
     12019-05-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Video stream freeze on front camera orientation changing
     4        https://bugs.webkit.org/show_bug.cgi?id=197227
     5        <rdar://problem/50175498>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Use m_currentRotationSessionAngle instead of m_currentRotation to create or not a new rotation session.
     10        Covered by updated test.
     11
     12        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
     13        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
     14        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
     15
    1162019-05-07  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h

    r236070 r245033  
    5555    RetainPtr<VTImageRotationSessionRef> m_rotationSession;
    5656    RetainPtr<CVPixelBufferPoolRef> m_rotationPool;
    57     webrtc::VideoRotation m_currentRotationAngle { webrtc::kVideoRotation_0 };
     57    webrtc::VideoRotation m_currentRotationSessionAngle { webrtc::kVideoRotation_0 };
    5858    size_t m_rotatedWidth { 0 };
    5959    size_t m_rotatedHeight { 0 };
  • trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm

    r244949 r245033  
    7272        return pixelBuffer;
    7373
    74     if (!m_rotationSession || rotation != m_currentRotation) {
     74    if (!m_rotationSession || rotation != m_currentRotationSessionAngle) {
    7575        VTImageRotationSessionRef rawRotationSession = nullptr;
    7676        auto status = VTImageRotationSessionCreate(kCFAllocatorDefault, rotation, &rawRotationSession);
     
    8181
    8282        m_rotationSession = adoptCF(rawRotationSession);
    83         m_currentRotation = rotation;
     83        m_currentRotationSessionAngle = rotation;
    8484
    8585        VTImageRotationSessionSetProperty(rawRotationSession, kVTImageRotationPropertyKey_EnableHighSpeedTransfer, kCFBooleanTrue);
Note: See TracChangeset for help on using the changeset viewer.