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

Unified Diff: content/public/renderer/media/video_track_sink.h

Issue 83023005: Add VideoTrackSink interface to content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/public/renderer/media/video_track_sink.h
diff --git a/content/public/renderer/media/video_track_sink.h b/content/public/renderer/media/video_track_sink.h
new file mode 100644
index 0000000000000000000000000000000000000000..71e7f2e94ee200ee5d5158d653de4f387a6f68a9
--- /dev/null
+++ b/content/public/renderer/media/video_track_sink.h
@@ -0,0 +1,40 @@
+// Copyright 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_PUBLIC_RENDERER_MEDIA_VIDEO_TRACK_SINK_H_
+#define CONTENT_PUBLIC_RENDERER_MEDIA_VIDEO_TRACK_SINK_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "content/public/renderer/media/media_track_sink.h"
+
+namespace media {
+class VideoFrame;
+}
+
+namespace blink {
+class WebMediaStreamSource;
+class WebMediaStreamTrack;
+}
+
+namespace content {
+
+class CONTENT_EXPORT VideoTrackSink : public MediaTrackSink {
+ public:
+ virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame) = 0;
+
+ protected:
+ virtual ~VideoTrackSink() {}
+
+ // An implementation should call Register when it is ready to receive
+ // data from a track. Before the implementation is destroyed, Unregister must
+ // be called.
+ void Register(const blink::WebMediaStreamTrack& track);
no longer working on chromium 2013/11/25 13:55:07 Can AddSink, RemoveSink better names than Register
Jói 2013/11/25 14:06:55 Registration and unregistration should be on the V
Alpha Left Google 2013/11/26 04:59:32 I'm not sure this is possible unless VideoTrack is
perkj_chrome 2013/11/26 09:16:38 Done.
perkj_chrome 2013/11/26 09:16:38 Joi? I use static functions at the moment. It seem
Jói 2013/11/26 10:18:15 Yeah, makes sense to have static functions on Vide
+ void UnRegister(const blink::WebMediaStreamTrack& track);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_RENDERER_MEDIA_VIDEO_TRACK_SINK_H_

Powered by Google App Engine
This is Rietveld 408576698