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

Unified Diff: media/gpu/avda_codec_allocator.h

Issue 2662173002: media: Don't create a new MediaCodec during AVDA teardown (Closed)
Patch Set: rebase Created 3 years, 10 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
Index: media/gpu/avda_codec_allocator.h
diff --git a/media/gpu/avda_codec_allocator.h b/media/gpu/avda_codec_allocator.h
index 18cd7a1768df06bb86608a9e1dfdd1fdda800db3..c33da7699eca1547f645b17bdb0212f9fcc9b10d 100644
--- a/media/gpu/avda_codec_allocator.h
+++ b/media/gpu/avda_codec_allocator.h
@@ -140,8 +140,9 @@ class MEDIA_GPU_EXPORT AVDACodecAllocator {
// Create and configure a MediaCodec asynchronously. The result is delivered
// via OnCodecConfigured().
- void CreateMediaCodecAsync(base::WeakPtr<AVDACodecAllocatorClient> client,
- scoped_refptr<CodecConfig> codec_config);
+ virtual void CreateMediaCodecAsync(
+ base::WeakPtr<AVDACodecAllocatorClient> client,
+ scoped_refptr<CodecConfig> codec_config);
// Asynchronously release |media_codec| with the attached surface.
// TODO(watk): Bundle the MediaCodec and surface together so you can't get
@@ -169,6 +170,12 @@ class MEDIA_GPU_EXPORT AVDACodecAllocator {
// Return a reference to the thread for unit tests.
base::Thread& GetThreadForTesting(TaskType task_type);
+ protected:
+ // |tick_clock| and |stop_event| are for tests only.
+ AVDACodecAllocator(base::TickClock* tick_clock = nullptr,
+ base::WaitableEvent* stop_event = nullptr);
+ virtual ~AVDACodecAllocator();
+
private:
friend class AVDACodecAllocatorTest;
@@ -203,11 +210,6 @@ class MEDIA_GPU_EXPORT AVDACodecAllocator {
HangDetector hang_detector;
};
- // |tick_clock| and |stop_event| are for tests only.
- AVDACodecAllocator(base::TickClock* tick_clock = nullptr,
- base::WaitableEvent* stop_event = nullptr);
- ~AVDACodecAllocator();
-
void OnMediaCodecAndSurfaceReleased(int surface_id);
// Stop the thread indicated by |index|. This signals stop_event_for_testing_
« no previous file with comments | « media/gpu/android_video_decode_accelerator_unittest.cc ('k') | media/gpu/gpu_video_decode_accelerator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698