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

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

Issue 159263004: Remove threading from GpuVideoAcceleratorFactories (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 0f7ba9fd NULL pointer fix. Created 6 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: 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 1af61260e79a8b48b89f6ee8d58c329839d16573..007f9b0490a3bf38d992ee583eccf91c9f2d7c6f 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;
};
@@ -47,8 +47,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();
@@ -91,10 +90,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.
@@ -120,8 +115,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();
@@ -163,6 +156,9 @@ class CONTENT_EXPORT RTCVideoDecoder
void ReusePictureBuffer(int64 picture_buffer_id,
scoped_ptr<gpu::MailboxHolder> mailbox_holder);
+ // Create |vda_| on |vda_loop_proxy_|.
+ void CreateVDA(media::VideoCodecProfile profile, base::WaitableEvent* waiter);
+
void DestroyTextures();
void DestroyVDA();
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698