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

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

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 years, 11 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 /* 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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 LOG(LS_VERBOSE) << "Disabling capturer, sending black frame."; 1675 LOG(LS_VERBOSE) << "Disabling capturer, sending black frame.";
1675 // Force this black frame not to be dropped due to timestamp order 1676 // Force this black frame not to be dropped due to timestamp order
1676 // check. As IncomingCapturedFrame will drop the frame if this frame's 1677 // check. As IncomingCapturedFrame will drop the frame if this frame's
1677 // timestamp is less than or equal to last frame's timestamp, it is 1678 // timestamp is less than or equal to last frame's timestamp, it is
1678 // necessary to give this black frame a larger timestamp than the 1679 // necessary to give this black frame a larger timestamp than the
1679 // previous one. 1680 // previous one.
1680 last_frame_timestamp_us_ += rtc::kNumMicrosecsPerMillisec; 1681 last_frame_timestamp_us_ += rtc::kNumMicrosecsPerMillisec;
1681 rtc::scoped_refptr<webrtc::I420Buffer> black_buffer( 1682 rtc::scoped_refptr<webrtc::I420Buffer> black_buffer(
1682 webrtc::I420Buffer::Create(last_frame_info_.width, 1683 webrtc::I420Buffer::Create(last_frame_info_.width,
1683 last_frame_info_.height)); 1684 last_frame_info_.height));
1684 black_buffer->SetToBlack(); 1685 webrtc::I420Buffer::SetBlack(black_buffer);
1685 1686
1686 encoder_sink_->OnFrame(webrtc::VideoFrame( 1687 encoder_sink_->OnFrame(webrtc::VideoFrame(
1687 black_buffer, last_frame_info_.rotation, last_frame_timestamp_us_)); 1688 black_buffer, last_frame_info_.rotation, last_frame_timestamp_us_));
1688 } 1689 }
1689 } 1690 }
1690 1691
1691 // TODO(perkj, nisse): Remove |source_| and directly call 1692 // TODO(perkj, nisse): Remove |source_| and directly call
1692 // |stream_|->SetSource(source) once the video frame types have been 1693 // |stream_|->SetSource(source) once the video frame types have been
1693 // merged. 1694 // merged.
1694 if (source_ && stream_) { 1695 if (source_ && stream_) {
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 rtx_mapping[video_codecs[i].codec.id] != 2586 rtx_mapping[video_codecs[i].codec.id] !=
2586 ulpfec_config.red_payload_type) { 2587 ulpfec_config.red_payload_type) {
2587 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2588 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2588 } 2589 }
2589 } 2590 }
2590 2591
2591 return video_codecs; 2592 return video_codecs;
2592 } 2593 }
2593 2594
2594 } // namespace cricket 2595 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698