|
|
Created:
4 years, 10 months ago by hbos_chromium Modified:
4 years, 10 months ago CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionH264 is about to be supported in WebRTC behind flag, this
is preparation work for enabling it.
Background: The flag (from WebRTC) is |rtc_use_h264|.
Additionally, for H264 decoding to work an
|ffmpeg_branding| has to be used that includes H264 (for
example "Chrome").
If |rtc_use_h264| is used, this CL adds code to make sure
FFmpeg is initialized before any decoding happens
(otherwise H264DecoderImpl::InitDecode would fail). This
code is commented out however, due to the below reason.
When building with |rtc_use_h264|,
webrtc::DisableRtcUseH264() is called which disables the
effects of |rtc_use_h264| (disables that H264 enc/dec
implementation). We do this because we plan to default
|rtc_use_h264| to |proprietary_codecs| so that Chromium
trybots will use it. This also makes Chrome use it, but we
are not ready to launch this feature yet. We will remove
DisableRtcUseH264() in a follow-up CL that adds H264
browser tests. That way we have proper test coverage before
we enable it (otherwise it is only tested in webrtc repo,
not full call stack).
BUG=chromium:500605, chromium:468365
Committed: https://crrev.com/2b803417873274a16a0f6c3d5d116d3525026d13
Cr-Commit-Position: refs/heads/master@{#373821}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Updated comment #Patch Set 3 : Use of BUILDFLAG instead of macro #
Total comments: 4
Patch Set 4 : Rebase with master #Patch Set 5 : Disable the effects of |rtc_use_h264| with webrtc::DisableRtcUseH264() #Patch Set 6 : Added missing deps webrtc_h264, renderer_features. renderer_features.h to private_renderer_webrtc_sources to avoid analyze failure. #
Total comments: 2
Patch Set 7 : Created bug crbug.com/584219 and updated comment #
Messages
Total messages: 34 (13 generated)
hbos@chromium.org changed reviewers: + tommi@chromium.org
Tommi, in order for H264 decoding to work we must initialize FFmpeg. Chromium has initialization code that can't be called from WebRTC due to dependency reasons, so we have to call it some place guaranteed to have run before WebRTC does decoding. (WebRTC can't use its own FFmpeg initialization code when inside of Chromium or we may end up initializing FFmpeg twice which could break things.) In an email discussion with Dale Curtis we decided it would be best to simply call FFmpegGlue::InitializeFFmpeg() some place before WebRTC stuff runs. In this CL I call it at PeerConnectionDependencyFactory::CreatePeerConnectionFactory(). Is this an appropriate place to do it or is there some other general "Initialize WebRTC" place I should look at?
BUMP tommi
lgtm with some comment clarifications https://codereview.chromium.org/1641163002/diff/1/content/renderer/media/webr... File content/renderer/media/webrtc/peer_connection_dependency_factory.cc (right): https://codereview.chromium.org/1641163002/diff/1/content/renderer/media/webr... content/renderer/media/webrtc/peer_connection_dependency_factory.cc:267: // used. "must be initialized externally from WebRTC" is a bit confusing. Can we say that H264DecoderImpl depends on ffmpeg for h264 decoding and therefore we need to initialize ffmpeg before going further?
Description was changed from ========== H264 support in WebRTC behind flag. The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). (This is not new with this CL.) This CL makes it possible to use H264 by making sure FFmpeg is initialized before any decoding happens (otherwise InitDecode will fail). Calling FFmpegGlue::InitializeFFmpeg() at PeerConnectionDependencyFactory::CreatePeerConnectionFactory(). BUG=chromium:500605, chromium:468365 ========== to ========== H264 support in WebRTC behind flag. The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). (This is not new with this CL.) This CL makes it possible to use H264 by making sure FFmpeg is initialized before any decoding happens (otherwise InitDecode will fail). Calling FFmpegGlue::InitializeFFmpeg() at PeerConnectionDependencyFactory::CreatePeerConnectionFactory(). BUG=chromium:500605, chromium:468365 COMMIT=False ==========
hbos@chromium.org changed reviewers: + jochen@chromium.org
+jochen for content/renderer/BUILD.gn. Please take a look. https://codereview.chromium.org/1641163002/diff/1/content/renderer/media/webr... File content/renderer/media/webrtc/peer_connection_dependency_factory.cc (right): https://codereview.chromium.org/1641163002/diff/1/content/renderer/media/webr... content/renderer/media/webrtc/peer_connection_dependency_factory.cc:267: // used. On 2016/02/01 17:51:20, tommi-chromium wrote: > "must be initialized externally from WebRTC" is a bit confusing. > > Can we say that H264DecoderImpl depends on ffmpeg for h264 decoding and > therefore we need to initialize ffmpeg before going further? Done.
lgtm
jochen@chromium.org changed reviewers: + brettw@chromium.org
hum, my feeling is that this should be a buildflag, not just a random define? Brett, is there some documentation about what to do here?
On 2016/02/03 13:28:52, jochen wrote: > hum, my feeling is that this should be a buildflag, not just a random define? > > Brett, is there some documentation about what to do here? What do you mean? (There is a build flag, and if it is set the macro is defined as per the build files.)
i'm referring to this: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/5c4ySpPsV14
On 2016/02/03 13:54:33, jochen wrote: > i'm referring to this: > https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/5c4ySpPsV14 Cool. I get this though: ../../content/renderer/media/webrtc/peer_connection_dependency_factory.cc:264:5: error: token is not a valid binary operator in a preprocessor subexpression #if BUILDFLAG(rtc_use_h264)
On 2016/02/03 14:47:22, hbos_chromium wrote: > On 2016/02/03 13:54:33, jochen wrote: > > i'm referring to this: > > > https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/5c4ySpPsV14 > > Cool. I get this though: > ../../content/renderer/media/webrtc/peer_connection_dependency_factory.cc:264:5: > error: token is not a valid binary operator in a preprocessor subexpression > #if BUILDFLAG(rtc_use_h264) That usually means you forgot to include the generated header for the flag.
PTAL jochen/brettw.
lgtm https://codereview.chromium.org/1641163002/diff/40001/content/content.gyp File content/content.gyp (right): https://codereview.chromium.org/1641163002/diff/40001/content/content.gyp#new... content/content.gyp:33: # This conditional looks insane, but without it |rtc_use_h264| is not I don't really care about this too much, but I *think* the right solution is to replace the outer conditions with another variables block: 'variables': { 'variables': { 'buildflag_hea...<other stuff> } } Can you see if that fixes the problem before checking in? https://codereview.chromium.org/1641163002/diff/40001/content/renderer/BUILD.gn File content/renderer/BUILD.gn (right): https://codereview.chromium.org/1641163002/diff/40001/content/renderer/BUILD.... content/renderer/BUILD.gn:31: # TODO(GYP) bug 376846 remove this. This should be inherited from //net but Can you delete this comment? It looks like it applies to your dep but it doesn't. I think it's obsolete, or at least my intention was lost in time. ...actually it was removed last week! You will just need to merge this file.
Description was changed from ========== H264 support in WebRTC behind flag. The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). (This is not new with this CL.) This CL makes it possible to use H264 by making sure FFmpeg is initialized before any decoding happens (otherwise InitDecode will fail). Calling FFmpegGlue::InitializeFFmpeg() at PeerConnectionDependencyFactory::CreatePeerConnectionFactory(). BUG=chromium:500605, chromium:468365 COMMIT=False ========== to ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it. BUG=chromium:500605, chromium:468365 COMMIT=False ==========
Description was changed from ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it. BUG=chromium:500605, chromium:468365 COMMIT=False ========== to ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 COMMIT=False ==========
Patchset #7 (id:120001) has been deleted
Patchset #6 (id:100001) has been deleted
PTAL tommi, jochen. (Tommi I'll need a new lgtm from you after PS 5 changes.) Note that I updated the CL description, because in PS 5 I disable the effects of |rtc_use_h264| for reasons documented (in desc and comment). I was going to do this in a follow-up CL but I figured I might speed things up by doing it here. https://codereview.chromium.org/1641163002/diff/40001/content/content.gyp File content/content.gyp (right): https://codereview.chromium.org/1641163002/diff/40001/content/content.gyp#new... content/content.gyp:33: # This conditional looks insane, but without it |rtc_use_h264| is not On 2016/02/03 22:19:55, brettw wrote: > I don't really care about this too much, but I *think* the right solution is to > replace the outer conditions with another variables block: > 'variables': { > 'variables': { > 'buildflag_hea...<other stuff> > } > } > Can you see if that fixes the problem before checking in? I tried that (including 'var': '<(var)' in the outer 'variables'), but it didn't work. Undefined variable rtc_use_h264. GYP is horrendous isn't it. Keeping it this way. https://codereview.chromium.org/1641163002/diff/40001/content/renderer/BUILD.gn File content/renderer/BUILD.gn (right): https://codereview.chromium.org/1641163002/diff/40001/content/renderer/BUILD.... content/renderer/BUILD.gn:31: # TODO(GYP) bug 376846 remove this. This should be inherited from //net but On 2016/02/03 22:19:56, brettw wrote: > Can you delete this comment? It looks like it applies to your dep but it > doesn't. I think it's obsolete, or at least my intention was lost in time. > > ...actually it was removed last week! You will just need to merge this file. Merging got rid of it.
lgtm https://codereview.chromium.org/1641163002/diff/140001/content/content.gyp File content/content.gyp (right): https://codereview.chromium.org/1641163002/diff/140001/content/content.gyp#ne... content/content.gyp:36: # 'targets' is not an option, then we get compile errors. Please file a bug to fix this and add a link to it here
PTAL jochen https://codereview.chromium.org/1641163002/diff/140001/content/content.gyp File content/content.gyp (right): https://codereview.chromium.org/1641163002/diff/140001/content/content.gyp#ne... content/content.gyp:36: # 'targets' is not an option, then we get compile errors. On 2016/02/04 10:59:47, tommi-chromium wrote: > Please file a bug to fix this and add a link to it here Done.
Description was changed from ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 COMMIT=False ========== to ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 ==========
(Bump)
lgtm
On 2016/02/05 15:00:44, jochen (OOO) wrote: > lgtm Thanks. (Btw your name still says "(OOO)")
The CQ bit was checked by hbos@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from brettw@chromium.org, tommi@chromium.org Link to the patchset: https://codereview.chromium.org/1641163002/#ps160001 (title: "Created bug crbug.com/584219 and updated comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1641163002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1641163002/160001
Message was sent while issue was closed.
Description was changed from ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 ========== to ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 ==========
Message was sent while issue was closed.
Committed patchset #7 (id:160001)
Message was sent while issue was closed.
Description was changed from ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 ========== to ========== H264 is about to be supported in WebRTC behind flag, this is preparation work for enabling it. Background: The flag (from WebRTC) is |rtc_use_h264|. Additionally, for H264 decoding to work an |ffmpeg_branding| has to be used that includes H264 (for example "Chrome"). If |rtc_use_h264| is used, this CL adds code to make sure FFmpeg is initialized before any decoding happens (otherwise H264DecoderImpl::InitDecode would fail). This code is commented out however, due to the below reason. When building with |rtc_use_h264|, webrtc::DisableRtcUseH264() is called which disables the effects of |rtc_use_h264| (disables that H264 enc/dec implementation). We do this because we plan to default |rtc_use_h264| to |proprietary_codecs| so that Chromium trybots will use it. This also makes Chrome use it, but we are not ready to launch this feature yet. We will remove DisableRtcUseH264() in a follow-up CL that adds H264 browser tests. That way we have proper test coverage before we enable it (otherwise it is only tested in webrtc repo, not full call stack). BUG=chromium:500605, chromium:468365 Committed: https://crrev.com/2b803417873274a16a0f6c3d5d116d3525026d13 Cr-Commit-Position: refs/heads/master@{#373821} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/2b803417873274a16a0f6c3d5d116d3525026d13 Cr-Commit-Position: refs/heads/master@{#373821} |