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

Side by Side Diff: media/filters/gpu_video_decoder.h

Issue 10392141: Plumb texture target to VideoDecodeAccelerator::Client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 // GpuVideoDecoder. 33 // GpuVideoDecoder.
34 class MEDIA_EXPORT Factories : public base::RefCountedThreadSafe<Factories> { 34 class MEDIA_EXPORT Factories : public base::RefCountedThreadSafe<Factories> {
35 public: 35 public:
36 // Caller owns returned pointer. 36 // Caller owns returned pointer.
37 virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator( 37 virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
38 VideoCodecProfile, VideoDecodeAccelerator::Client*) = 0; 38 VideoCodecProfile, VideoDecodeAccelerator::Client*) = 0;
39 39
40 // Allocate & delete native textures. 40 // Allocate & delete native textures.
41 virtual bool CreateTextures(int32 count, const gfx::Size& size, 41 virtual bool CreateTextures(int32 count, const gfx::Size& size,
42 std::vector<uint32>* texture_ids, 42 std::vector<uint32>* texture_ids,
43 uint32* texture_target) = 0; 43 uint32 texture_target) = 0;
44 virtual void DeleteTexture(uint32 texture_id) = 0; 44 virtual void DeleteTexture(uint32 texture_id) = 0;
45 45
46 // Allocate & return a shared memory segment. Caller is responsible for 46 // Allocate & return a shared memory segment. Caller is responsible for
47 // Close()ing the returned pointer. 47 // Close()ing the returned pointer.
48 virtual base::SharedMemory* CreateSharedMemory(size_t size) = 0; 48 virtual base::SharedMemory* CreateSharedMemory(size_t size) = 0;
49 49
50 protected: 50 protected:
51 friend class base::RefCountedThreadSafe<Factories>; 51 friend class base::RefCountedThreadSafe<Factories>;
52 virtual ~Factories(); 52 virtual ~Factories();
53 }; 53 };
(...skipping 10 matching lines...) Expand all
64 virtual void Read(const ReadCB& read_cb) OVERRIDE; 64 virtual void Read(const ReadCB& read_cb) OVERRIDE;
65 virtual void Reset(const base::Closure& closure) OVERRIDE; 65 virtual void Reset(const base::Closure& closure) OVERRIDE;
66 virtual void Stop(const base::Closure& closure) OVERRIDE; 66 virtual void Stop(const base::Closure& closure) OVERRIDE;
67 virtual const gfx::Size& natural_size() OVERRIDE; 67 virtual const gfx::Size& natural_size() OVERRIDE;
68 virtual bool HasAlpha() const OVERRIDE; 68 virtual bool HasAlpha() const OVERRIDE;
69 virtual void PrepareForShutdownHack() OVERRIDE; 69 virtual void PrepareForShutdownHack() OVERRIDE;
70 70
71 // VideoDecodeAccelerator::Client implementation. 71 // VideoDecodeAccelerator::Client implementation.
72 virtual void NotifyInitializeDone() OVERRIDE; 72 virtual void NotifyInitializeDone() OVERRIDE;
73 virtual void ProvidePictureBuffers(uint32 count, 73 virtual void ProvidePictureBuffers(uint32 count,
74 const gfx::Size& size) OVERRIDE; 74 const gfx::Size& size,
75 uint32 texture_target) OVERRIDE;
75 virtual void DismissPictureBuffer(int32 id) OVERRIDE; 76 virtual void DismissPictureBuffer(int32 id) OVERRIDE;
76 virtual void PictureReady(const media::Picture& picture) OVERRIDE; 77 virtual void PictureReady(const media::Picture& picture) OVERRIDE;
77 virtual void NotifyEndOfBitstreamBuffer(int32 id) OVERRIDE; 78 virtual void NotifyEndOfBitstreamBuffer(int32 id) OVERRIDE;
78 virtual void NotifyFlushDone() OVERRIDE; 79 virtual void NotifyFlushDone() OVERRIDE;
79 virtual void NotifyResetDone() OVERRIDE; 80 virtual void NotifyResetDone() OVERRIDE;
80 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; 81 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
81 82
82 private: 83 private:
83 enum State { 84 enum State {
84 kNormal, 85 kNormal,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 206
206 // Indicates decoding error occurred. 207 // Indicates decoding error occurred.
207 bool error_occured_; 208 bool error_occured_;
208 209
209 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 210 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
210 }; 211 };
211 212
212 } // namespace media 213 } // namespace media
213 214
214 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 215 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698