summaryrefslogtreecommitdiffstats
path: root/media/renderers
diff options
context:
space:
mode:
authormcasas <mcasas@chromium.org>2015-11-19 13:23:35 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-19 21:24:30 +0000
commit3d35a73c1d6e540ca01da4e38777b3222301b603 (patch)
tree3d5d913276d665d539cb9090bc54f69ceaf6c6cb /media/renderers
parent1316a5855552abb20b2e26472f572fc07cfcef34 (diff)
downloadchromium_src-3d35a73c1d6e540ca01da4e38777b3222301b603.zip
chromium_src-3d35a73c1d6e540ca01da4e38777b3222301b603.tar.gz
chromium_src-3d35a73c1d6e540ca01da4e38777b3222301b603.tar.bz2
Reland of: media::VpxVideoDecoder cleanup
Relanding http://crrev.com/1438233003, which got reverted due to screwing with the MemoryPool lifetime, causing a use-after-free. This CL lands the original CL, keeping MemoryPool as ref-counted and adding some comments on it. Original CL description ----------------------------------------------- Couple of deep-cut cleanups: - Inner class MemoryPool is ref-counted thread safe when it doesn't need to, removed it, using WeakPtr for the only Bind use case, which anyway already had a BindToCurrentLoop(). - moved MemoryPool's registration & dereg with MemoryDumpManager to its ctor/dtor. - reshuffled a few method to follow declaration order (sorry that it makes review harder!). - removed VpxVideoDecoder's |task_runner_|, which is used mostly for thread checking (with a note in Reset()). - merged Decode() and DecodeBuffer() following a TODO suggestion. This makes |decode_cb_| superfluous, removed. - added vpx error stringification (useful!). - clarified in DCHECK()s the supported pixel formats vs codec and other assumptions that were not so evident to me. - using libyuv::I420 copy ISO Copy{Y,U,V}Plane(). Also, MakeOpaqueAPlane() > libyuv::SetPlane() and CopyAPlane() -> libyuv::CopyPlane(). - changed some if-if to early returns. Note that VP9 could have supported Alpha channel if looking at the code in ConfigureDecoder(), but not if we looked at CopyVpxImageTo(). Made this evident. BUG=554196, 554737 TEST=Tried bags of tests including this functionality, in particular ./out/Debug/media_unittests --gtest_filter="PipelineIntegrationTest.*_VP*" and anything relating to playing a WebM file from Chrome (big buck bunny). Review URL: https://codereview.chromium.org/1447343004 Cr-Commit-Position: refs/heads/master@{#360665}
Diffstat (limited to 'media/renderers')
-rw-r--r--media/renderers/default_renderer_factory.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/renderers/default_renderer_factory.cc b/media/renderers/default_renderer_factory.cc
index 6ebc372..c1c2aaa 100644
--- a/media/renderers/default_renderer_factory.cc
+++ b/media/renderers/default_renderer_factory.cc
@@ -78,7 +78,7 @@ scoped_ptr<Renderer> DefaultRendererFactory::CreateRenderer(
video_decoders.push_back(new GpuVideoDecoder(gpu_factories_));
#if !defined(MEDIA_DISABLE_LIBVPX)
- video_decoders.push_back(new VpxVideoDecoder(media_task_runner));
+ video_decoders.push_back(new VpxVideoDecoder());
#endif
#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS)