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

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

Issue 1892013002: ReleaseOutputBuffer to surface back and front buffers where possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool have_context) {} 84 bool have_context) {}
85 85
86 // Notify strategy that a picture buffer has been reused. 86 // Notify strategy that a picture buffer has been reused.
87 virtual void ReuseOnePictureBuffer( 87 virtual void ReuseOnePictureBuffer(
88 const media::PictureBuffer& picture_buffer) {} 88 const media::PictureBuffer& picture_buffer) {}
89 89
90 // Release MediaCodec buffers. 90 // Release MediaCodec buffers.
91 virtual void ReleaseCodecBuffers( 91 virtual void ReleaseCodecBuffers(
92 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) {} 92 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) {}
93 93
94 // Attempts to free up codec output buffers by rendering early.
95 virtual void MaybeRenderEarly() {}
96
94 // Notify strategy that we have a new android MediaCodec instance. This 97 // Notify strategy that we have a new android MediaCodec instance. This
95 // happens when we're starting up or re-configuring mid-stream. Any 98 // happens when we're starting up or re-configuring mid-stream. Any
96 // previously provided codec should no longer be referenced. 99 // previously provided codec should no longer be referenced.
97 virtual void CodecChanged(media::VideoCodecBridge* codec) = 0; 100 virtual void CodecChanged(media::VideoCodecBridge* codec) = 0;
98 101
99 // Notify the strategy that a frame is available. This callback can happen 102 // Notify the strategy that a frame is available. This callback can happen
100 // on any thread at any time. 103 // on any thread at any time.
101 virtual void OnFrameAvailable() = 0; 104 virtual void OnFrameAvailable() = 0;
102 105
103 // Whether the pictures produced by this backing strategy are overlayable. 106 // Whether the pictures produced by this backing strategy are overlayable.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 418
416 // WeakPtrFactory for posting tasks back to |this|. 419 // WeakPtrFactory for posting tasks back to |this|.
417 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 420 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
418 421
419 friend class AndroidVideoDecodeAcceleratorTest; 422 friend class AndroidVideoDecodeAcceleratorTest;
420 }; 423 };
421 424
422 } // namespace content 425 } // namespace content
423 426
424 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 427 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698