OLD | NEW |
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 |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 frame.GetVideoRotation()); | 1576 frame.GetVideoRotation()); |
1577 rtc::CritScope cs(&lock_); | 1577 rtc::CritScope cs(&lock_); |
1578 if (stream_ == NULL) { | 1578 if (stream_ == NULL) { |
1579 // Frame input before send codecs are configured, dropping frame. | 1579 // Frame input before send codecs are configured, dropping frame. |
1580 return; | 1580 return; |
1581 } | 1581 } |
1582 | 1582 |
1583 if (muted_) { | 1583 if (muted_) { |
1584 // Create a black frame to transmit instead. | 1584 // Create a black frame to transmit instead. |
1585 CreateBlackFrame(&video_frame, | 1585 CreateBlackFrame(&video_frame, |
1586 static_cast<int>(frame.GetWidth()), | 1586 frame.width(), |
1587 static_cast<int>(frame.GetHeight()), | 1587 frame.height(), |
1588 video_frame.rotation()); | 1588 video_frame.rotation()); |
1589 } | 1589 } |
1590 | 1590 |
1591 int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; | 1591 int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; |
1592 // frame->GetTimeStamp() is essentially a delta, align to webrtc time | 1592 // frame->GetTimeStamp() is essentially a delta, align to webrtc time |
1593 if (first_frame_timestamp_ms_ == 0) { | 1593 if (first_frame_timestamp_ms_ == 0) { |
1594 first_frame_timestamp_ms_ = rtc::Time() - frame_delta_ms; | 1594 first_frame_timestamp_ms_ = rtc::Time() - frame_delta_ms; |
1595 } | 1595 } |
1596 | 1596 |
1597 last_frame_timestamp_ms_ = first_frame_timestamp_ms_ + frame_delta_ms; | 1597 last_frame_timestamp_ms_ = first_frame_timestamp_ms_ + frame_delta_ms; |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 rtx_mapping[video_codecs[i].codec.id] != | 2586 rtx_mapping[video_codecs[i].codec.id] != |
2587 fec_settings.red_payload_type) { | 2587 fec_settings.red_payload_type) { |
2588 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]; |
2589 } | 2589 } |
2590 } | 2590 } |
2591 | 2591 |
2592 return video_codecs; | 2592 return video_codecs; |
2593 } | 2593 } |
2594 | 2594 |
2595 } // namespace cricket | 2595 } // namespace cricket |
OLD | NEW |