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

Side by Side Diff: content/renderer/media/media_stream_impl.cc

Issue 10915091: Combine audio decoding and video decoding onto a single thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_impl.h" 5 #include "content/renderer/media/media_stream_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 capability.frame_rate = kVideoCaptureFramePerSecond; 480 capability.frame_rate = kVideoCaptureFramePerSecond;
481 capability.color = media::VideoCaptureCapability::kI420; 481 capability.color = media::VideoCaptureCapability::kI420;
482 capability.expected_capture_delay = 0; 482 capability.expected_capture_delay = 0;
483 capability.interlaced = false; 483 capability.interlaced = false;
484 484
485 DVLOG(1) << "MediaStreamImpl::CreateLocalVideoDecoder video_session_id:" 485 DVLOG(1) << "MediaStreamImpl::CreateLocalVideoDecoder video_session_id:"
486 << video_session_id; 486 << video_session_id;
487 487
488 return new CaptureVideoDecoder( 488 return new CaptureVideoDecoder(
489 message_loop_factory->GetMessageLoop( 489 message_loop_factory->GetMessageLoop(
490 media::MessageLoopFactory::kVideoDecoder), 490 media::MessageLoopFactory::kDecoder),
491 video_session_id, 491 video_session_id,
492 vc_manager_.get(), 492 vc_manager_.get(),
493 capability); 493 capability);
494 } 494 }
495 495
496 scoped_refptr<media::VideoDecoder> MediaStreamImpl::CreateRemoteVideoDecoder( 496 scoped_refptr<media::VideoDecoder> MediaStreamImpl::CreateRemoteVideoDecoder(
497 webrtc::MediaStreamInterface* stream, 497 webrtc::MediaStreamInterface* stream,
498 media::MessageLoopFactory* message_loop_factory) { 498 media::MessageLoopFactory* message_loop_factory) {
499 if (!stream->video_tracks() || stream->video_tracks()->count() == 0) 499 if (!stream->video_tracks() || stream->video_tracks()->count() == 0)
500 return NULL; 500 return NULL;
501 501
502 DVLOG(1) << "MediaStreamImpl::CreateRemoteVideoDecoder label:" 502 DVLOG(1) << "MediaStreamImpl::CreateRemoteVideoDecoder label:"
503 << stream->label(); 503 << stream->label();
504 504
505 return new RTCVideoDecoder( 505 return new RTCVideoDecoder(
506 message_loop_factory->GetMessageLoop( 506 message_loop_factory->GetMessageLoop(media::MessageLoopFactory::kDecoder),
507 media::MessageLoopFactory::kVideoDecoder),
508 base::MessageLoopProxy::current(), 507 base::MessageLoopProxy::current(),
509 stream->video_tracks()->at(0)); 508 stream->video_tracks()->at(0));
510 } 509 }
511 510
512 talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> 511 talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface>
513 MediaStreamImpl::CreateNativeLocalMediaStream( 512 MediaStreamImpl::CreateNativeLocalMediaStream(
514 const std::string& label, 513 const std::string& label,
515 WebKit::WebFrame* frame, 514 WebKit::WebFrame* frame,
516 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources, 515 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources,
517 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources) { 516 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 MediaStreamExtraData::MediaStreamExtraData( 554 MediaStreamExtraData::MediaStreamExtraData(
556 webrtc::MediaStreamInterface* remote_stream) 555 webrtc::MediaStreamInterface* remote_stream)
557 : remote_stream_(remote_stream) { 556 : remote_stream_(remote_stream) {
558 } 557 }
559 MediaStreamExtraData::MediaStreamExtraData( 558 MediaStreamExtraData::MediaStreamExtraData(
560 webrtc::LocalMediaStreamInterface* local_stream) 559 webrtc::LocalMediaStreamInterface* local_stream)
561 : local_stream_(local_stream) { 560 : local_stream_(local_stream) {
562 } 561 }
563 MediaStreamExtraData::~MediaStreamExtraData() { 562 MediaStreamExtraData::~MediaStreamExtraData() {
564 } 563 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698