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

Side by Side Diff: webkit/support/test_media_stream_client.cc

Issue 8887004: add components for integration test which will detect breakage of media pipeline with video captu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review and final Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/support/test_media_stream_client.h ('k') | webkit/support/webkit_support.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/support/test_media_stream_client.h"
6
7 #include "googleurl/src/gurl.h"
8 #include "media/base/message_loop_factory.h"
9 #include "media/base/pipeline.h"
10 #include "media/filters/video_frame_generator.h"
11
12 namespace {
13
14 static const int kVideoCaptureWidth = 352;
15 static const int kVideoCaptureHeight = 288;
16 static const int kVideoCaptureFrameDurationMs = 33;
17
18 } // namespace
19
20 namespace webkit_support {
21
22 TestMediaStreamClient::TestMediaStreamClient(MediaStreamUtil* media_stream_util)
23 : media_stream_util_(media_stream_util) {
24 }
25
26 scoped_refptr<media::VideoDecoder> TestMediaStreamClient::GetVideoDecoder(
27 const GURL& url, media::MessageLoopFactory* message_loop_factory) {
28 if (!media_stream_util_ || !media_stream_util_->IsMockStream(url))
29 return NULL;
30
31 return new media::VideoFrameGenerator(
32 message_loop_factory->GetMessageLoopProxy("CaptureVideoDecoder").get(),
33 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight),
34 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs));
35 }
36
37 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/support/test_media_stream_client.h ('k') | webkit/support/webkit_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698