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

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

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed some comments Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/rtc_video_decoder_bridge_tv.h
diff --git a/content/renderer/media/rtc_video_decoder_bridge_tv.h b/content/renderer/media/rtc_video_decoder_bridge_tv.h
new file mode 100644
index 0000000000000000000000000000000000000000..e8567638ceba29f30134f0fd9a3e538d426a33de
--- /dev/null
+++ b/content/renderer/media/rtc_video_decoder_bridge_tv.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
+#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
+
+#include "base/basictypes.h"
+#include "base/message_loop_proxy.h"
+#include "content/common/content_export.h"
+#include "media/base/audio_decoder_config.h"
+#include "media/base/decoder_buffer_queue.h"
+#include "media/base/demuxer.h"
+#include "media/base/demuxer_stream.h"
+#include "media/base/pipeline_status.h"
+#include "media/base/video_decoder_config.h"
+#include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
+
+namespace content {
+
+// A singleton object shared between WebMediaPlayerAndroid and WebRTC Video
+// Engine. Note that this class provides the first remote stream.
+//
+// Example use case:
+//
+// // Before using the object:
+// if (!RTCVideoDecoderBridgeTv::Get()->AcquireOwnership())
+// return;
+//
+// media::Demuxer demuxer = RTCVideoDecoderBridgeTv::Get()->CreateDemuxer(
+// base::MessageLoopProxy::current());
+// if (demuxer) {
+// // use |demuxer|.
+// }
+//
+// // When done using the object:
+// RTCVideoDecoderBridgeTv::Get()->ReleaseOwnership();
+class CONTENT_EXPORT RTCVideoDecoderBridgeTv
+ : NON_EXPORTED_BASE(public webrtc::VideoDecoder) {
+ public:
+ // Get RTCVideoDecoderBridgeTv singleton object. If it was not set
+ // before, new default instance will be created.
+ static RTCVideoDecoderBridgeTv* Get();
+
+ // Returns a demuxer object if this object is not owned; otherwise, NULL.
Ami GONE FROM CHROMIUM 2013/05/01 22:01:37 Is the "otherwise, NULL" always an indication of p
Ami GONE FROM CHROMIUM 2013/05/01 22:01:37 Also returns NULL the second time it's called when
wonsik 2013/05/03 18:31:19 This singleton is mainly used in two different par
+ virtual media::Demuxer* CreateDemuxer(
+ const scoped_refptr<base::MessageLoopProxy>& message_loop) = 0;
+
+ // Returns true if acquired the ownership of this object successfully. One
+ // should acquire ownership before using the object, and can't use the object
+ // if this method fails.
+ virtual bool AcquireOwnership() = 0;
+
+ // Releases ownership of this object.
+ virtual void ReleaseOwnership() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_

Powered by Google App Engine
This is Rietveld 408576698