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

Unified Diff: webkit/support/test_media_stream_client.cc

Issue 10918052: create a separate WebMediaPlayer for URL derived from media stream (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review Created 8 years, 3 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
« no previous file with comments | « webkit/support/test_media_stream_client.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/test_media_stream_client.cc
===================================================================
--- webkit/support/test_media_stream_client.cc (revision 158069)
+++ webkit/support/test_media_stream_client.cc (working copy)
@@ -8,11 +8,11 @@
#include "media/base/message_loop_factory.h"
#include "media/base/pipeline.h"
#include "media/filters/video_frame_generator.h"
-
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaStreamRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
+#include "webkit/media/simple_video_frame_provider.h"
using namespace WebKit;
@@ -36,6 +36,29 @@
namespace webkit_support {
+TestMediaStreamClient::TestMediaStreamClient() {}
+
+TestMediaStreamClient::~TestMediaStreamClient() {}
+
+bool TestMediaStreamClient::IsMediaStream(const GURL& url) {
+ return IsMockMediaStreamWithVideo(url);
+}
+
+scoped_refptr<webkit_media::VideoFrameProvider>
+TestMediaStreamClient::GetVideoFrameProvider(
+ const GURL& url,
+ const base::Closure& error_cb,
+ const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) {
+ if (!IsMockMediaStreamWithVideo(url))
+ return NULL;
+
+ return new webkit_media::SimpleVideoFrameProvider(
+ gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight),
+ base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs),
+ error_cb,
+ repaint_cb);
+}
+
scoped_refptr<media::VideoDecoder> TestMediaStreamClient::GetVideoDecoder(
const GURL& url, media::MessageLoopFactory* message_loop_factory) {
// This class is installed in a chain of possible VideoDecoder creators
« no previous file with comments | « webkit/support/test_media_stream_client.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698