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

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_video_source.cc

Issue 526173003: Change VideoTrackAdapter to not drop frames if the source frame rate is known. Also change remote v… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/video_track_adapter.cc ('k') | content/renderer/media/webrtc/video_destination_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698