Bug 167450 - This bug is here just to trace the extra changes for information and discussion on the webkit side.
Summary: This bug is here just to trace the extra changes for information and discussi...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified macOS 10.12
: P3 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-26 00:15 PST by Alex. Gouaillard
Modified: 2017-01-26 00:49 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex. Gouaillard 2017-01-26 00:15:45 PST
Porting Changeset 211046 to upstream's webrtc

[WebRTC] Make VP8 optional in libwebrtc
​https://bugs.webkit.org/show_bug.cgi?id=167257

The above patch cannot be ported as it, as it requires modifying some BUILD.gn files.
Comment 1 Alex. Gouaillard 2017-01-26 00:49:34 PST
The default libwebrtc compiles with VP* always ON.
While this patch uses the same implementation that was used for VP9 upstream, it does not modify the build files accordingly.

The proposed solution is to add a GN configuration to reflect that this is a build in webkit, just like the two existing flags that differentiates the standalone build (default), chromium build (build_with_chromium), and the firefox build (build_with firefox). It's more consistent, and it also allows for less post processing of GN Generated files in webkit. Just like firefox flag, it is more prone to breakage, and would be more or less th responsibility of the webkit maintainers to make sure it is kept updated.

changes:
in /webrtc/webrtc.gni:

  rtc_libvpx_build_vp8 = true
  if (build_with_webkit) {
    etc_libvpx_build_vp8 = false
  }

in /webrtc/BUILD.gn:

  if (!rtc_libvpx_build_vp8) {
    defines += [ "RTC_DISABLE_VP8" ]
  }

  if (build_with_webkit) {
    defines += [ "WEBRTC_WEBKIT_BUILD" ]
  }

in /webrtc/modules/video_coding/BUILD.gn:

rtc_static_library("webrtc_vp8") {
  if (rtc_libvpx_build_vp8) {
    sources = [
      "codecs/vp8/include/vp8.h",
      "codecs/vp8/vp8_impl.cc",
      "codecs/vp8/vp8_impl.h",
    ]
  } else {
    sources = [
      "codecs/vp8/vp8_noop.cc",
    ]
  }