| 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 9bc9849fa0d3bc5cc98a9036df5ede42b506f895..0d99a4c8c802665d7d6c8f6d306e5f54bab96609 100644
|
| --- a/content/renderer/media/rtc_video_decoder.h
|
| +++ b/content/renderer/media/rtc_video_decoder.h
|
| @@ -6,7 +6,6 @@
|
| #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
|
|
|
| #include <deque>
|
| -#include <list>
|
| #include <map>
|
| #include <set>
|
| #include <utility>
|
| @@ -14,7 +13,9 @@
|
| #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"
|
| @@ -24,7 +25,6 @@
|
| #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
|
|
| namespace base {
|
| -class WaitableEvent;
|
| class MessageLoopProxy;
|
| };
|
|
|
| @@ -43,7 +43,8 @@
|
| // frames are delivered to WebRTC on |vda_message_loop_|.
|
| class CONTENT_EXPORT RTCVideoDecoder
|
| : NON_EXPORTED_BASE(public webrtc::VideoDecoder),
|
| - public media::VideoDecodeAccelerator::Client {
|
| + public media::VideoDecodeAccelerator::Client,
|
| + public base::MessageLoop::DestructionObserver {
|
| public:
|
| virtual ~RTCVideoDecoder();
|
|
|
| @@ -86,6 +87,10 @@
|
| 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.
|
| @@ -111,6 +116,8 @@
|
| RTCVideoDecoder(
|
| const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories);
|
|
|
| + void Initialize(base::WaitableEvent* waiter);
|
| +
|
| // Requests a buffer to be decoded by VDA.
|
| void RequestBufferDecode();
|
|
|
| @@ -150,9 +157,6 @@
|
|
|
| // 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();
|
|
|