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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Fix gn dependencies. Created 4 years 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 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/media/engine/webrtcvideoengine2.h" 11 #include "webrtc/media/engine/webrtcvideoengine2.h"
12 12
13 #include <stdio.h> 13 #include <stdio.h>
14 #include <algorithm> 14 #include <algorithm>
15 #include <set> 15 #include <set>
16 #include <string> 16 #include <string>
17 #include <utility> 17 #include <utility>
18 18
19 #include "webrtc/api/video/i420_buffer.h"
19 #include "webrtc/base/copyonwritebuffer.h" 20 #include "webrtc/base/copyonwritebuffer.h"
20 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
21 #include "webrtc/base/stringutils.h" 22 #include "webrtc/base/stringutils.h"
22 #include "webrtc/base/timeutils.h" 23 #include "webrtc/base/timeutils.h"
23 #include "webrtc/base/trace_event.h" 24 #include "webrtc/base/trace_event.h"
24 #include "webrtc/call/call.h" 25 #include "webrtc/call/call.h"
25 #include "webrtc/common_video/h264/profile_level_id.h" 26 #include "webrtc/common_video/h264/profile_level_id.h"
26 #include "webrtc/media/engine/constants.h" 27 #include "webrtc/media/engine/constants.h"
27 #include "webrtc/media/engine/internalencoderfactory.h" 28 #include "webrtc/media/engine/internalencoderfactory.h"
28 #include "webrtc/media/engine/internaldecoderfactory.h" 29 #include "webrtc/media/engine/internaldecoderfactory.h"
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 LOG(LS_VERBOSE) << "Disabling capturer, sending black frame."; 1670 LOG(LS_VERBOSE) << "Disabling capturer, sending black frame.";
1670 // Force this black frame not to be dropped due to timestamp order 1671 // Force this black frame not to be dropped due to timestamp order
1671 // check. As IncomingCapturedFrame will drop the frame if this frame's 1672 // check. As IncomingCapturedFrame will drop the frame if this frame's
1672 // timestamp is less than or equal to last frame's timestamp, it is 1673 // timestamp is less than or equal to last frame's timestamp, it is
1673 // necessary to give this black frame a larger timestamp than the 1674 // necessary to give this black frame a larger timestamp than the
1674 // previous one. 1675 // previous one.
1675 last_frame_timestamp_us_ += rtc::kNumMicrosecsPerMillisec; 1676 last_frame_timestamp_us_ += rtc::kNumMicrosecsPerMillisec;
1676 rtc::scoped_refptr<webrtc::I420Buffer> black_buffer( 1677 rtc::scoped_refptr<webrtc::I420Buffer> black_buffer(
1677 webrtc::I420Buffer::Create(last_frame_info_.width, 1678 webrtc::I420Buffer::Create(last_frame_info_.width,
1678 last_frame_info_.height)); 1679 last_frame_info_.height));
1679 black_buffer->SetToBlack(); 1680 webrtc::I420Buffer::SetBlack(black_buffer);
1680 1681
1681 encoder_sink_->OnFrame(webrtc::VideoFrame( 1682 encoder_sink_->OnFrame(webrtc::VideoFrame(
1682 black_buffer, last_frame_info_.rotation, last_frame_timestamp_us_)); 1683 black_buffer, last_frame_info_.rotation, last_frame_timestamp_us_));
1683 } 1684 }
1684 } 1685 }
1685 1686
1686 // TODO(perkj, nisse): Remove |source_| and directly call 1687 // TODO(perkj, nisse): Remove |source_| and directly call
1687 // |stream_|->SetSource(source) once the video frame types have been 1688 // |stream_|->SetSource(source) once the video frame types have been
1688 // merged. 1689 // merged.
1689 if (source_ && stream_) { 1690 if (source_ && stream_) {
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 rtx_mapping[video_codecs[i].codec.id] != 2574 rtx_mapping[video_codecs[i].codec.id] !=
2574 ulpfec_config.red_payload_type) { 2575 ulpfec_config.red_payload_type) {
2575 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2576 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2576 } 2577 }
2577 } 2578 }
2578 2579
2579 return video_codecs; 2580 return video_codecs;
2580 } 2581 }
2581 2582
2582 } // namespace cricket 2583 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698