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

Side by Side Diff: content/renderer/media/pepper_platform_video_decoder_impl.h

Issue 10749019: VideoDecodeAccelerator now SupportsWeakPtr instead of being RefCountedThreadSafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 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 CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation. 24 // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation.
25 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; 25 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE;
26 virtual void Decode( 26 virtual void Decode(
27 const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; 27 const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
28 virtual void AssignPictureBuffers( 28 virtual void AssignPictureBuffers(
29 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; 29 const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
30 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; 30 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
31 virtual void Flush() OVERRIDE; 31 virtual void Flush() OVERRIDE;
32 virtual void Reset() OVERRIDE; 32 virtual void Reset() OVERRIDE;
33 virtual void Destroy() OVERRIDE; 33 virtual void Destroy(scoped_ptr<VideoDecodeAccelerator> self) OVERRIDE;
34 34
35 // VideoDecodeAccelerator::Client implementation. 35 // VideoDecodeAccelerator::Client implementation.
36 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, 36 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
37 const gfx::Size& dimensions, 37 const gfx::Size& dimensions,
38 uint32 texture_target) OVERRIDE; 38 uint32 texture_target) OVERRIDE;
39 virtual void PictureReady(const media::Picture& picture) OVERRIDE; 39 virtual void PictureReady(const media::Picture& picture) OVERRIDE;
40 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; 40 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
41 virtual void NotifyInitializeDone() OVERRIDE; 41 virtual void NotifyInitializeDone() OVERRIDE;
42 virtual void NotifyError( 42 virtual void NotifyError(
43 media::VideoDecodeAccelerator::Error error) OVERRIDE; 43 media::VideoDecodeAccelerator::Error error) OVERRIDE;
44 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; 44 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
45 virtual void NotifyFlushDone() OVERRIDE; 45 virtual void NotifyFlushDone() OVERRIDE;
46 virtual void NotifyResetDone() OVERRIDE; 46 virtual void NotifyResetDone() OVERRIDE;
47 47
48 private: 48 private:
49 virtual ~PlatformVideoDecoderImpl(); 49 virtual ~PlatformVideoDecoderImpl();
50 50
51 // Client lifetime must exceed lifetime of this class. 51 // Client lifetime must exceed lifetime of this class.
52 // TODO(vrk/fischman): We should take another look at the overall 52 // TODO(vrk/fischman): We should take another look at the overall
53 // arcitecture of PPAPI Video Decode to make sure lifetime/ownership makes 53 // arcitecture of PPAPI Video Decode to make sure lifetime/ownership makes
54 // sense, including lifetime of this client. 54 // sense, including lifetime of this client.
55 media::VideoDecodeAccelerator::Client* client_; 55 media::VideoDecodeAccelerator::Client* client_;
56 56
57 // Route ID for the command buffer associated with video decoder's context. 57 // Route ID for the command buffer associated with video decoder's context.
58 int32 command_buffer_route_id_; 58 int32 command_buffer_route_id_;
59 59
60 // Holds a GpuVideoDecodeAcceleratorHost. 60 // Holds a GpuVideoDecodeAcceleratorHost.
61 scoped_refptr<media::VideoDecodeAccelerator> decoder_; 61 scoped_ptr<media::VideoDecodeAccelerator> decoder_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl); 63 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl);
64 }; 64 };
65 #endif // CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 65 #endif // CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698