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

Unified Diff: content/renderer/media/rtc_video_decoder.h

Issue 27420004: Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: d731420c Comment update, 'git cl format', rebase Created 7 years, 2 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: content/renderer/media/rtc_video_decoder.h
diff --git a/content/renderer/media/rtc_video_decoder.h b/content/renderer/media/rtc_video_decoder.h
index d73fc143d1b58b13ac03033ba94f37963bff741e..e8d38a3a7e39b4de0f86cebc297edc51cae5697f 100644
--- a/content/renderer/media/rtc_video_decoder.h
+++ b/content/renderer/media/rtc_video_decoder.h
@@ -6,6 +6,7 @@
#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
#include <deque>
+#include <list>
#include <map>
#include <set>
#include <utility>
@@ -13,9 +14,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/synchronization/lock.h"
-#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
#include "content/common/content_export.h"
#include "media/base/bitstream_buffer.h"
@@ -25,6 +24,7 @@
#include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
namespace base {
+class WaitableEvent;
class MessageLoopProxy;
};
@@ -43,8 +43,7 @@ namespace content {
// frames are delivered to WebRTC on |vda_message_loop_|.
class CONTENT_EXPORT RTCVideoDecoder
: NON_EXPORTED_BASE(public webrtc::VideoDecoder),
- public media::VideoDecodeAccelerator::Client,
- public base::MessageLoop::DestructionObserver {
+ public media::VideoDecodeAccelerator::Client {
public:
virtual ~RTCVideoDecoder();
@@ -87,10 +86,6 @@ class CONTENT_EXPORT RTCVideoDecoder
virtual void NotifyResetDone() OVERRIDE;
virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
- // base::DestructionObserver implementation. Called when |vda_message_loop_|
- // is stopped.
- virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
-
private:
class SHMBuffer;
// Metadata of a bitstream buffer.
@@ -116,8 +111,6 @@ class CONTENT_EXPORT RTCVideoDecoder
RTCVideoDecoder(
const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories);
- void Initialize(base::WaitableEvent* waiter);
-
// Requests a buffer to be decoded by VDA.
void RequestBufferDecode();
@@ -158,6 +151,9 @@ class CONTENT_EXPORT RTCVideoDecoder
// Tells VDA that a picture buffer can be recycled.
void ReusePictureBuffer(int64 picture_buffer_id, uint32 sync_point);
+ // Create |vda_| on |vda_loop_proxy_|.
+ void CreateVDA(media::VideoCodecProfile profile, base::WaitableEvent* waiter);
+
void DestroyTextures();
void DestroyVDA();

Powered by Google App Engine
This is Rietveld 408576698