[Webkit-unassigned] [Bug 200417] New: iOS RTCPeerConnection releases hardware H.264 encoder only after pc.close()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 3 02:29:56 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=200417

            Bug ID: 200417
           Summary: iOS RTCPeerConnection releases hardware H.264 encoder
                    only after pc.close()
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: iOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: milen.yordanov at gmail.com
                CC: youennf at gmail.com

The case is:
1) Create WebRtc call with audio and video.
2) Stop the video and renegotiate the connection to be audio only.

The expected result is:
All video resouses to be released. There is no video to be encoded.

The actual result is:
The hardware H.264 encoder is not released. The only way to release it is to call pc.close().

There is a limit of the hardware H.264 encoders on the iOS. I tested in iPad Mini 2, iOS 12.4 and the limit is 4 encoders.
When the limit is exhausted the log on the device says:

-----------
default 15:21:25.212680 +0300   mediaserverd    H.264-legacy: Init hw video encoder: dimension = 640 x 480, usage = 1
default 15:21:25.215500 +0300   mediaserverd    AVE: Bottom extended pixels = 8
default 15:21:25.215832 +0300   mediaserverd    Assert - (false) - f: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleVXE380/AppleVXE380-445.6/Library/AppleVXE380FIGwrapper.cpp l: 3166
default 15:21:25.215923 +0300   kernel  H264SecurityCheck WARNING: m_NumberOfClients reached MAX 4
default 15:21:25.216149 +0300   kernel  VXE380 WARNING: m_ClientsSecurityCheck->AddClient failed
default 15:21:25.216333 +0300   mediaserverd    VXE FIG ERROR: kVTVideoEncoderNotAvailableNowErr.
default 15:21:25.216611 +0300   mediaserverd    Assert - (pDriverInstance) - f: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleVXE380/AppleVXE380-445.6/Library/AppleVXE380UserLandLibrary.cpp l: 648
default 15:21:25.216866 +0300   mediaserverd    AppleVXE380VA ERROR: AppleVXE380VA_DriverDelete, pDriverInstance NULL.
default 15:21:25.217091 +0300   mediaserverd    Assert - (err == noErr) - f: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleVXE380/AppleVXE380-445.6/Library/AppleVXE380FIGwrapper.cpp l: 3302
default 15:21:25.217404 +0300   mediaserverd    VXE FIG ERROR: AppleVXE380VA_DriverDelete failed.
default 15:21:25.218634 +0300   mediaserverd    H.264: failed to init video encoder, err = -108
-----------

A test app that could be used to reproduce the problem:
https://milen-yordanov.github.io/ios-webrtc-hw-h264-encoders-limit/

A single RTCPeerConnection if renegotiated 5 times will reach the limit of HW H.264 encoders and will fail.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190803/63e159c2/attachment.html>


More information about the webkit-unassigned mailing list