Bug 190167 - Enable H264 simulcast
Summary: Enable H264 simulcast
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-01 14:47 PDT by youenn fablet
Modified: 2018-10-03 17:09 PDT (History)
9 users (show)

See Also:


Attachments
Patch (48.54 KB, patch)
2018-10-01 14:54 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (48.91 KB, patch)
2018-10-02 04:30 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (48.92 KB, patch)
2018-10-02 05:32 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (48.51 KB, patch)
2018-10-02 08:36 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (46.72 KB, patch)
2018-10-02 08:48 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (47.29 KB, patch)
2018-10-02 09:17 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (3.39 MB, application/zip)
2018-10-02 11:02 PDT, EWS Watchlist
no flags Details
Patch (47.77 KB, patch)
2018-10-03 02:07 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (47.83 KB, patch)
2018-10-03 04:31 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2018-10-01 14:47:09 PDT
Enable H264 simulcast
Comment 1 youenn fablet 2018-10-01 14:54:48 PDT
Created attachment 351310 [details]
Patch
Comment 2 youenn fablet 2018-10-02 04:30:17 PDT
Created attachment 351369 [details]
Patch
Comment 3 youenn fablet 2018-10-02 05:32:58 PDT
Created attachment 351374 [details]
Patch
Comment 4 youenn fablet 2018-10-02 08:36:16 PDT
Created attachment 351387 [details]
Patch
Comment 5 youenn fablet 2018-10-02 08:48:12 PDT
Created attachment 351390 [details]
Patch
Comment 6 youenn fablet 2018-10-02 09:17:15 PDT
Created attachment 351396 [details]
Patch
Comment 7 EWS Watchlist 2018-10-02 11:02:00 PDT
Comment on attachment 351396 [details]
Patch

Attachment 351396 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9428847

New failing tests:
webrtc/simulcast-h264.html
media/range-extract-contents-crash.html
Comment 8 EWS Watchlist 2018-10-02 11:02:02 PDT
Created attachment 351419 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 9 youenn fablet 2018-10-03 02:07:27 PDT
Created attachment 351495 [details]
Patch
Comment 10 Eric Carlson 2018-10-03 04:16:38 PDT
Comment on attachment 351495 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=351495&action=review

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.mm:40
> +    [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name],

#if !defined(RTC_DISABLE_VP8) ?

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.mm:43
> +  RTCVideoCodecInfo *vp8Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name];

Ditto.

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.mm:52
> +    vp8Info,

Ditto.

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:897
> +

Nit: unneeded

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:922
> +        auto codec = [[RTCSingleVideoEncoderH264 alloc] initWithCodecInfo: _codecInfo simulcastIndex:index];
> +        [_codecs addObject: codec];

Nit: space after ":" not needed.

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:934
> +        [codec startEncodeWithSettings: settings numberOfCores: numberOfCores];

Ditto.

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:949
> +        result |= [codec encode: frame codecSpecificInfo: info frameTypes: frameTypes];

Ditto

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:957
> +        result |= [codec setBitrate: bitRateAllocation->GetSpatialLayerSum(counter++) framerate: framerate];

Ditto

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h:165
> +- (int)setRateAllocation: (const webrtc::VideoBitrateAllocation *)allocation framerate:(uint32_t)framerate;

Ditto

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Native/src/objc_video_encoder_factory.mm:94
> +    return [encoder_ setRateAllocation: &allocation framerate:framerate];

Ditto
Comment 11 youenn fablet 2018-10-03 04:31:16 PDT
Created attachment 351508 [details]
Patch for landing
Comment 12 youenn fablet 2018-10-03 05:10:11 PDT
(In reply to Eric Carlson from comment #10)
> Comment on attachment 351495 [details]
> Patch

Thanks, I took it all!
Comment 13 WebKit Commit Bot 2018-10-03 05:11:32 PDT
Comment on attachment 351508 [details]
Patch for landing

Clearing flags on attachment: 351508

Committed r236792: <https://trac.webkit.org/changeset/236792>
Comment 14 WebKit Commit Bot 2018-10-03 05:11:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2018-10-03 05:12:24 PDT
<rdar://problem/44970744>
Comment 16 youenn fablet 2018-10-03 17:09:12 PDT
The newly added test is failing in WebKitGTK, it should probably be fixed until support is added similarly to VTB in this patch.