| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webrtc/media_stream_remote_video_source.h" | 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame.get()); | 99 frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame.get()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 media::VideoPixelFormat pixel_format = | 102 media::VideoPixelFormat pixel_format = |
| 103 (video_frame->format() == media::VideoFrame::YV12) ? | 103 (video_frame->format() == media::VideoFrame::YV12) ? |
| 104 media::PIXEL_FORMAT_YV12 : media::PIXEL_FORMAT_TEXTURE; | 104 media::PIXEL_FORMAT_YV12 : media::PIXEL_FORMAT_TEXTURE; |
| 105 | 105 |
| 106 media::VideoCaptureFormat format( | 106 media::VideoCaptureFormat format( |
| 107 gfx::Size(video_frame->natural_size().width(), | 107 gfx::Size(video_frame->natural_size().width(), |
| 108 video_frame->natural_size().height()), | 108 video_frame->natural_size().height()), |
| 109 MediaStreamVideoSource::kDefaultFrameRate, | 109 MediaStreamVideoSource::kUnknownFrameRate, |
| 110 pixel_format); | 110 pixel_format); |
| 111 | 111 |
| 112 io_message_loop_->PostTask( | 112 io_message_loop_->PostTask( |
| 113 FROM_HERE, | 113 FROM_HERE, |
| 114 base::Bind(&RemoteVideoSourceDelegate::DoRenderFrameOnIOThread, | 114 base::Bind(&RemoteVideoSourceDelegate::DoRenderFrameOnIOThread, |
| 115 this, video_frame, format)); | 115 this, video_frame, format)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void MediaStreamRemoteVideoSource:: | 118 void MediaStreamRemoteVideoSource:: |
| 119 RemoteVideoSourceDelegate::DoRenderFrameOnIOThread( | 119 RemoteVideoSourceDelegate::DoRenderFrameOnIOThread( |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); | 185 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); |
| 186 break; | 186 break; |
| 187 default: | 187 default: |
| 188 NOTREACHED(); | 188 NOTREACHED(); |
| 189 break; | 189 break; |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace content | 194 } // namespace content |
| OLD | NEW |