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

Side by Side Diff: media/gpu/android_video_decode_accelerator.h

Issue 2005103004: AVDACodecImages keep their backing SurfaceTexture alive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@neverdetach
Patch Set: Minor fixes Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const base::WeakPtr<Client>& decode_client, 137 const base::WeakPtr<Client>& decode_client,
138 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) 138 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner)
139 override; 139 override;
140 140
141 // AVDAStateProvider implementation: 141 // AVDAStateProvider implementation:
142 const gfx::Size& GetSize() const override; 142 const gfx::Size& GetSize() const override;
143 const base::ThreadChecker& ThreadChecker() const override; 143 const base::ThreadChecker& ThreadChecker() const override;
144 base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const override; 144 base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const override;
145 gpu::gles2::TextureRef* GetTextureForPicture( 145 gpu::gles2::TextureRef* GetTextureForPicture(
146 const media::PictureBuffer& picture_buffer) override; 146 const media::PictureBuffer& picture_buffer) override;
147 scoped_refptr<gl::SurfaceTexture> CreateAttachedSurfaceTexture(
148 GLuint* service_id) override;
147 void PostError(const ::tracked_objects::Location& from_here, 149 void PostError(const ::tracked_objects::Location& from_here,
148 media::VideoDecodeAccelerator::Error error) override; 150 media::VideoDecodeAccelerator::Error error) override;
149 151
150 static media::VideoDecodeAccelerator::Capabilities GetCapabilities( 152 static media::VideoDecodeAccelerator::Capabilities GetCapabilities(
151 const gpu::GpuPreferences& gpu_preferences); 153 const gpu::GpuPreferences& gpu_preferences);
152 154
153 // Notifies about SurfaceTexture::OnFrameAvailable. This can happen on any 155 // Notifies about SurfaceTexture::OnFrameAvailable. This can happen on any
154 // thread at any time! 156 // thread at any time!
155 void OnFrameAvailable(); 157 void OnFrameAvailable();
156 158
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 463
462 // WeakPtrFactory for posting tasks back to |this|. 464 // WeakPtrFactory for posting tasks back to |this|.
463 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 465 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
464 466
465 friend class AndroidVideoDecodeAcceleratorTest; 467 friend class AndroidVideoDecodeAcceleratorTest;
466 }; 468 };
467 469
468 } // namespace media 470 } // namespace media
469 471
470 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 472 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698