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

Side by Side Diff: content/common/gpu/media/mac_video_decode_accelerator.h

Issue 10827074: Replace the explicit *VDA::Set{CGL,Egl,Glx}Context() methods with ctor params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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_COMMON_GPU_MEDIA_MAC_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_MAC_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_MAC_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_MAC_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <CoreVideo/CoreVideo.h> 8 #include <CoreVideo/CoreVideo.h>
9 #include <map> 9 #include <map>
10 #include <list> 10 #include <list>
(...skipping 14 matching lines...) Expand all
25 class VideoDecodeAccelerationSupport; 25 class VideoDecodeAccelerationSupport;
26 } 26 }
27 27
28 class GpuCommandBufferStub; 28 class GpuCommandBufferStub;
29 29
30 class CONTENT_EXPORT MacVideoDecodeAccelerator 30 class CONTENT_EXPORT MacVideoDecodeAccelerator
31 : public media::VideoDecodeAccelerator, 31 : public media::VideoDecodeAccelerator,
32 public base::NonThreadSafe { 32 public base::NonThreadSafe {
33 public: 33 public:
34 // Does not take ownership of |client| which must outlive |*this|. 34 // Does not take ownership of |client| which must outlive |*this|.
35 MacVideoDecodeAccelerator(media::VideoDecodeAccelerator::Client* client); 35 MacVideoDecodeAccelerator(CGLContextObj cgl_context,
36 media::VideoDecodeAccelerator::Client* client);
36 virtual ~MacVideoDecodeAccelerator(); 37 virtual ~MacVideoDecodeAccelerator();
37 38
38 // Set the OpenGL context to use.
39 void SetCGLContext(CGLContextObj cgl_context);
40
41 // media::VideoDecodeAccelerator implementation. 39 // media::VideoDecodeAccelerator implementation.
42 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; 40 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE;
43 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; 41 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
44 virtual void AssignPictureBuffers( 42 virtual void AssignPictureBuffers(
45 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; 43 const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
46 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; 44 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
47 virtual void Flush() OVERRIDE; 45 virtual void Flush() OVERRIDE;
48 virtual void Reset() OVERRIDE; 46 virtual void Reset() OVERRIDE;
49 virtual void Destroy() OVERRIDE; 47 virtual void Destroy() OVERRIDE;
50 48
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Utility to build the AVC configuration record. 125 // Utility to build the AVC configuration record.
128 content::AVCConfigRecordBuilder config_record_builder_; 126 content::AVCConfigRecordBuilder config_record_builder_;
129 127
130 // Maps a bitstream ID to the number of NALUs that are being decoded for 128 // Maps a bitstream ID to the number of NALUs that are being decoded for
131 // that bitstream. This is used to ensure that NotifyEndOfBitstreamBuffer() 129 // that bitstream. This is used to ensure that NotifyEndOfBitstreamBuffer()
132 // is called after all NALUs contained in a bitstream have been decoded. 130 // is called after all NALUs contained in a bitstream have been decoded.
133 std::map<int32, int> bitstream_nalu_count_; 131 std::map<int32, int> bitstream_nalu_count_;
134 }; 132 };
135 133
136 #endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_MAC_H_ 134 #endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/media/mac_video_decode_accelerator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698