Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1431)

Unified Diff: content/renderer/pepper_platform_video_decoder_impl.h

Issue 7361010: Enable fire-and-forget Destroy of HW video decoder, and misc other improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR responses. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper_platform_video_decoder_impl.h
diff --git a/content/renderer/pepper_platform_video_decoder_impl.h b/content/renderer/pepper_platform_video_decoder_impl.h
index b4d0d038b98453c2e1c2e8be1d3d215a686419f1..32b0080e2f90cb77e677adb4c62de895b736108d 100644
--- a/content/renderer/pepper_platform_video_decoder_impl.h
+++ b/content/renderer/pepper_platform_video_decoder_impl.h
@@ -25,9 +25,8 @@ class PlatformVideoDecoderImpl
media::VideoDecodeAccelerator::Client* client,
int32 command_buffer_route_id,
gpu::CommandBufferHelper* cmd_buffer_helper);
- virtual ~PlatformVideoDecoderImpl();
- // PlatformVideoDecoder implementation.
+ // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation.
virtual bool Initialize(const std::vector<uint32>& configs) OVERRIDE;
virtual void Decode(
const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
@@ -52,9 +51,10 @@ class PlatformVideoDecoderImpl
virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
virtual void NotifyFlushDone() OVERRIDE;
virtual void NotifyResetDone() OVERRIDE;
- virtual void NotifyDestroyDone() OVERRIDE;
private:
+ virtual ~PlatformVideoDecoderImpl();
+
// Client lifetime must exceed lifetime of this class.
// TODO(vrk/fischman): We should take another look at the overall
// arcitecture of PPAPI Video Decode to make sure lifetime/ownership makes
@@ -67,10 +67,8 @@ class PlatformVideoDecoderImpl
// Helper for the command buffer associated with video decoder's context.
gpu::CommandBufferHelper* cmd_buffer_helper_;
- // Host for GpuVideoDecodeAccelerator.
- // This is owned by the CommandBufferProxy associated with
- // |command_buffer_route_id|.
- media::VideoDecodeAccelerator* decoder_;
+ // Holds a GpuVideoDecodeAcceleratorHost.
+ scoped_refptr<media::VideoDecodeAccelerator> decoder_;
DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl);
};

Powered by Google App Engine
This is Rietveld 408576698