Paweł--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Is it ever the case that the underlying system has a newer ffmpeg than
what we ship with?
Linux distros seem to be slow to upgrade packages ("conservative", if
you prefer).
--
Sorry, the issue of how patching works on distros and who is faster and how that affects what we do wrt system libraries has been discussed to death. We still provide an option to use system libraries for Linux distros. We continue to use bundled libraries for Google Chrome, even on Linux. If you want to know more, feel free to check out http://goto.google.com/xpovo (sorry, Googlers-only).Now why don't we just state a minimum version of ffmpeg we require to work? Chrome moves fast and seems to use unreleased versions of ffmpeg (code just pulled from git). Even without that, all the ffmpeg-dependent apps do not always update as fast as we can.Please try to avoid discussing whether or not this effort is worth it. For me it is. :) The question is: provided I can make it lightweight and simple enough (which should be made easier because we only use a small subset of ffmpeg API), would you consider having such a compatibility layer? Alternatively, what would your requirements for such a layer be? Note that I'd do any necessary work there, and also design it in a way to make it easier to use more ffmpeg functions in the future.
PawełOn Mon, Jan 14, 2013 at 3:33 PM, Matt Giuca <mgi...@chromium.org> wrote:
Is it ever the case that the underlying system has a newer ffmpeg than
what we ship with?Certainly if there is a security fix for ffmpeg (or anything), the Linux distros will coordinate and push out a fix within 24 hours of the patch becoming public. I don't know a lot about the Chrome release cycle -- if a security vulnerability is fixed in Chrome, does an update get pushed immediately, or does it usually wait until the next release? Does this also extend to patches in third-party software?Linux distros seem to be slow to upgrade packages ("conservative", if
you prefer).That's true for general updates. However, for security fixes, they do special cherry-picks and push them out immediately.Even if it Chrome integrates security fixes from upstream and pushes them out quickly, I would expect Linux distro package managers (whose primary job is to push out security fixes in an immediate and coordinated fashion) would push them out faster than Chrome can integrate the patch, and release a new version. But as I said, I don't know how Chrome deals with these situations.
Have you seen media/ffmpeg/ffmpeg_common.{cc,h} ? It does a lot of this stuff already.
I talked to John and Chris about issues they raised and I think the conclusion is (feel free to correct me):1. This is not going to increase ongoing maintenance cost for Chrome codebase, and any one-time work will be done by me.
#define CHROMIUM_TO_FFMPEG_CODEC(chromium_id, ffmpeg_id) \
#ifdef ffmpeg_id \
case chromium_id: \return ffmpeg_id; \#endifWDYT?
#define CHROMIUM_TO_FFMPEG_CODEC(chromium_id, ffmpeg_id) \
#ifdef ffmpeg_id \
case chromium_id: \return ffmpeg_id; \#endifWDYT?CODEC_ID_<FOO> are enum values, not preprocessor macros, so this doesn't work.
Also, re: the gentoo patch you pointed at, it conditionally elides functionality based on the ffmpeg version constants. I'd be loathe to have such conditional sections in chromium code because it implies a backwards-compatibility promise that nobody is prepared to back up.
Oops indeed. Thank you for catching this. How can I detect the availability of CODEC_ID_OPUS at compile time then, other than checking version numbers explicitly?
Would you accept a script that would detect that by calling the compiler (only executed for -Duse_system_ffmpeg=1 case, so would not affect Chrome nor most developers)?
Also, re: the gentoo patch you pointed at, it conditionally elides functionality based on the ffmpeg version constants. I'd be loathe to have such conditional sections in chromium code because it implies a backwards-compatibility promise that nobody is prepared to back up.I know. That's one of the reasons I've not submitted it for review. :) I consider this something to be done at the distro-level.
Oops indeed. Thank you for catching this. How can I detect the availability of CODEC_ID_OPUS at compile time then, other than checking version numbers explicitly?Why would you want to not use version numbers? That's what they're for.
Would you accept a script that would detect that by calling the compiler (only executed for -Duse_system_ffmpeg=1 case, so would not affect Chrome nor most developers)?I wouldn't have a problem with the presence of a script; the real question is what the script would do (see below).Also, re: the gentoo patch you pointed at, it conditionally elides functionality based on the ffmpeg version constants. I'd be loathe to have such conditional sections in chromium code because it implies a backwards-compatibility promise that nobody is prepared to back up.I know. That's one of the reasons I've not submitted it for review. :) I consider this something to be done at the distro-level.If you're prepared to add conditional compilation at the distro level, then what are you proposing to upstream into the chromium codebase?
I think this conversation would be more productive if we had a specific proposal to review (I believe the policy question part of this thread has been answered, but of course feel free to clarify if that's not the case).
They require more manual lookup (I've mentioned that earlier), and it seems version numbers used by ffmpeg vs. libav are not always in sync.
I think this conversation would be more productive if we had a specific proposal to review (I believe the policy question part of this thread has been answered, but of course feel free to clarify if that's not the case).Agreed. I'm also asking for advice though. I think what I would like to do now is to add a script (only used for distro builds, never chrome builds, gated on use_system_ffmpeg=1) that would launch a compiler to see if enum values are defined, similar to what ./configure might do. I'd like to add some #ifdefs / macros as mentioned earlier to ffmpeg_common.cc (under Chrome they would be always enabled).