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

Unified Diff: media/filters/gpu_video_decoder.h

Issue 19638008: Refactor GpuVideoDecoder::Factories out of GpuVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index f7e3f8f17b560b4d256e9eb7cc05c8818c0304cd..01a88422890f6c91abeb276890e933a39f6cf8fb 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -23,11 +23,10 @@ class MessageLoopProxy;
class SharedMemory;
}
-class SkBitmap;
-
namespace media {
class DecoderBuffer;
+class GpuVideoDecoderFactories;
class VDAClientProxy;
// GPU-accelerated video decoder implementation. Relies on
@@ -37,48 +36,8 @@ class MEDIA_EXPORT GpuVideoDecoder
: public VideoDecoder,
public VideoDecodeAccelerator::Client {
public:
- // Helper interface for specifying factories needed to instantiate a
- // GpuVideoDecoder.
- class MEDIA_EXPORT Factories : public base::RefCountedThreadSafe<Factories> {
- public:
- // Caller owns returned pointer.
- virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
- VideoCodecProfile, VideoDecodeAccelerator::Client*) = 0;
-
- // Allocate & delete native textures.
- virtual uint32 CreateTextures(int32 count, const gfx::Size& size,
- std::vector<uint32>* texture_ids,
- std::vector<gpu::Mailbox>* texture_mailboxes,
- uint32 texture_target) = 0;
- virtual void DeleteTexture(uint32 texture_id) = 0;
-
- virtual void WaitSyncPoint(uint32 sync_point) = 0;
-
- // Read pixels from a native texture and store into |pixels| as RGBA.
- virtual void ReadPixels(uint32 texture_id, uint32 texture_target,
- const gfx::Size& size, const SkBitmap& pixels) = 0;
-
- // Allocate & return a shared memory segment. Caller is responsible for
- // Close()ing the returned pointer.
- virtual base::SharedMemory* CreateSharedMemory(size_t size) = 0;
-
- // Returns the message loop the VideoDecodeAccelerator runs on.
- virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() = 0;
-
- // Abort any outstanding factory operations and error any future
- // attempts at factory operations
- virtual void Abort() = 0;
-
- // Returns true if Abort() has been called.
- virtual bool IsAborted() = 0;
-
- protected:
- friend class base::RefCountedThreadSafe<Factories>;
- virtual ~Factories();
- };
-
GpuVideoDecoder(const scoped_refptr<base::MessageLoopProxy>& message_loop,
- const scoped_refptr<Factories>& factories);
+ const scoped_refptr<GpuVideoDecoderFactories>& factories);
// VideoDecoder implementation.
virtual void Initialize(const VideoDecoderConfig& config,
@@ -172,7 +131,7 @@ class MEDIA_EXPORT GpuVideoDecoder
// through).
scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_;
- scoped_refptr<Factories> factories_;
+ scoped_refptr<GpuVideoDecoderFactories> factories_;
// Proxies calls from |vda_| to |gvd_loop_proxy_| and used to safely detach
// during shutdown.
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698