Changeset 254815 in webkit


Ignore:
Timestamp:
Jan 20, 2020 1:44:34 AM (4 years ago)
Author:
youenn@apple.com
Message:

Setting kVTCompressionPropertyKey_DataRateLimits on RTCVideoEncoderH264 fails
https://bugs.webkit.org/show_bug.cgi?id=206402

Reviewed by Eric Carlson.

Add helper routine dedicated to setting VTB/VCP array value properties.
Logging shows the bitrate is then set appropriately.

  • Source/webrtc/sdk/objc/components/video_codec/helpers.cc:
  • Source/webrtc/sdk/objc/components/video_codec/helpers.h:
Location:
trunk/Source/ThirdParty/libwebrtc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/libwebrtc/ChangeLog

    r254050 r254815  
     12020-01-20  youenn fablet  <youenn@apple.com>
     2
     3        Setting kVTCompressionPropertyKey_DataRateLimits on RTCVideoEncoderH264 fails
     4        https://bugs.webkit.org/show_bug.cgi?id=206402
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add helper routine dedicated to setting VTB/VCP array value properties.
     9        Logging shows the bitrate is then set appropriately.
     10
     11        * Source/webrtc/sdk/objc/components/video_codec/helpers.cc:
     12        * Source/webrtc/sdk/objc/components/video_codec/helpers.h:
     13
    1142020-01-06  youenn fablet  <youenn@apple.com>
    215
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/helpers.cc

    r246263 r254815  
    117117  }
    118118}
     119
     120// Convenience function for setting a VT property.
     121void SetVTSessionProperty(VTCompressionSessionRef vtSession, VCPCompressionSessionRef vcpSession,
     122                          CFStringRef key,
     123                          CFArrayRef value) {
     124  RTC_DCHECK(vtSession || vcpSession);
     125  OSStatus status = noErr;
     126  if (vtSession)
     127    status = VTSessionSetProperty(vtSession, key, value);
     128#if ENABLE_VCP_ENCODER
     129  else
     130    status = webrtc::VCPCompressionSessionSetProperty(vcpSession, key, value);
     131#endif
     132
     133  if (status != noErr) {
     134    std::string key_string = CFStringToString(key);
     135    RTC_LOG(LS_ERROR) << "VTSessionSetProperty failed to set: " << key_string
     136                      << " to array value: " << status << ", vcpSession: " << vcpSession;
     137  }
     138}
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/helpers.h

    r246263 r254815  
    4747                          CFStringRef value);
    4848
     49// Convenience function for setting a VT property.
     50void SetVTSessionProperty(VTCompressionSessionRef session, VCPCompressionSessionRef vcpSession,
     51                          CFStringRef key,
     52                          CFArrayRef value);
     53
    4954#endif  // SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_HELPERS_H_
Note: See TracChangeset for help on using the changeset viewer.