| OLD | NEW |
| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 capability.height = kVideoCaptureHeight; | 479 capability.height = kVideoCaptureHeight; |
| 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->GetMessageLoopProxy("CaptureVideoDecoderThread"), | 489 message_loop_factory->GetMessageLoop( |
| 490 media::MessageLoopFactory::kVideoDecoder), |
| 490 video_session_id, | 491 video_session_id, |
| 491 vc_manager_.get(), | 492 vc_manager_.get(), |
| 492 capability); | 493 capability); |
| 493 } | 494 } |
| 494 | 495 |
| 495 scoped_refptr<media::VideoDecoder> MediaStreamImpl::CreateRemoteVideoDecoder( | 496 scoped_refptr<media::VideoDecoder> MediaStreamImpl::CreateRemoteVideoDecoder( |
| 496 webrtc::MediaStreamInterface* stream, | 497 webrtc::MediaStreamInterface* stream, |
| 497 media::MessageLoopFactory* message_loop_factory) { | 498 media::MessageLoopFactory* message_loop_factory) { |
| 498 if (!stream->video_tracks() || stream->video_tracks()->count() == 0) | 499 if (!stream->video_tracks() || stream->video_tracks()->count() == 0) |
| 499 return NULL; | 500 return NULL; |
| 500 | 501 |
| 501 DVLOG(1) << "MediaStreamImpl::CreateRemoteVideoDecoder label:" | 502 DVLOG(1) << "MediaStreamImpl::CreateRemoteVideoDecoder label:" |
| 502 << stream->label(); | 503 << stream->label(); |
| 503 | 504 |
| 504 return new RTCVideoDecoder( | 505 return new RTCVideoDecoder( |
| 505 message_loop_factory->GetMessageLoopProxy("RtcVideoDecoderThread"), | 506 message_loop_factory->GetMessageLoop( |
| 507 media::MessageLoopFactory::kVideoDecoder), |
| 506 base::MessageLoopProxy::current(), | 508 base::MessageLoopProxy::current(), |
| 507 stream->video_tracks()->at(0)); | 509 stream->video_tracks()->at(0)); |
| 508 } | 510 } |
| 509 | 511 |
| 510 talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> | 512 talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> |
| 511 MediaStreamImpl::CreateNativeLocalMediaStream( | 513 MediaStreamImpl::CreateNativeLocalMediaStream( |
| 512 const std::string& label, | 514 const std::string& label, |
| 513 WebKit::WebFrame* frame, | 515 WebKit::WebFrame* frame, |
| 514 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources, | 516 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources, |
| 515 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources) { | 517 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 MediaStreamExtraData::MediaStreamExtraData( | 555 MediaStreamExtraData::MediaStreamExtraData( |
| 554 webrtc::MediaStreamInterface* remote_stream) | 556 webrtc::MediaStreamInterface* remote_stream) |
| 555 : remote_stream_(remote_stream) { | 557 : remote_stream_(remote_stream) { |
| 556 } | 558 } |
| 557 MediaStreamExtraData::MediaStreamExtraData( | 559 MediaStreamExtraData::MediaStreamExtraData( |
| 558 webrtc::LocalMediaStreamInterface* local_stream) | 560 webrtc::LocalMediaStreamInterface* local_stream) |
| 559 : local_stream_(local_stream) { | 561 : local_stream_(local_stream) { |
| 560 } | 562 } |
| 561 MediaStreamExtraData::~MediaStreamExtraData() { | 563 MediaStreamExtraData::~MediaStreamExtraData() { |
| 562 } | 564 } |
| OLD | NEW |