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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1535 } | 1535 } |
1536 | 1536 |
1537 WebRtcVideoChannel2::WebRtcVideoSendStream::~WebRtcVideoSendStream() { | 1537 WebRtcVideoChannel2::WebRtcVideoSendStream::~WebRtcVideoSendStream() { |
1538 DisconnectSource(); | 1538 DisconnectSource(); |
1539 if (stream_ != NULL) { | 1539 if (stream_ != NULL) { |
1540 call_->DestroyVideoSendStream(stream_); | 1540 call_->DestroyVideoSendStream(stream_); |
1541 } | 1541 } |
1542 DestroyVideoEncoder(&allocated_encoder_); | 1542 DestroyVideoEncoder(&allocated_encoder_); |
1543 } | 1543 } |
1544 | 1544 |
1545 static void CreateBlackFrame(webrtc::VideoFrame* video_frame, | 1545 static void CreateBlackFrame(webrtc::VideoFrame* video_frame, |
perkj_webrtc
2016/04/19 12:28:13
change this to return a webrtc::VideoFrame instead
nisse-webrtc
2016/04/19 13:55:39
Done.
| |
1546 int width, | 1546 int width, |
1547 int height, | 1547 int height, |
1548 webrtc::VideoRotation rotation) { | 1548 webrtc::VideoRotation rotation) { |
1549 video_frame->CreateEmptyFrame(width, height, width, (width + 1) / 2, | 1549 video_frame->CreateEmptyFrame(width, height, width, (width + 1) / 2, |
1550 (width + 1) / 2); | 1550 (width + 1) / 2); |
1551 memset(video_frame->buffer(webrtc::kYPlane), 16, | 1551 memset(video_frame->video_frame_buffer()->MutableDataY(), 16, |
1552 video_frame->allocated_size(webrtc::kYPlane)); | 1552 video_frame->allocated_size(webrtc::kYPlane)); |
1553 memset(video_frame->buffer(webrtc::kUPlane), 128, | 1553 memset(video_frame->video_frame_buffer()->MutableDataU(), 128, |
1554 video_frame->allocated_size(webrtc::kUPlane)); | 1554 video_frame->allocated_size(webrtc::kUPlane)); |
1555 memset(video_frame->buffer(webrtc::kVPlane), 128, | 1555 memset(video_frame->video_frame_buffer()->MutableDataV(), 128, |
1556 video_frame->allocated_size(webrtc::kVPlane)); | 1556 video_frame->allocated_size(webrtc::kVPlane)); |
1557 video_frame->set_rotation(rotation); | 1557 video_frame->set_rotation(rotation); |
1558 } | 1558 } |
1559 | 1559 |
1560 void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame( | 1560 void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame( |
1561 const VideoFrame& frame) { | 1561 const VideoFrame& frame) { |
1562 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::OnFrame"); | 1562 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::OnFrame"); |
1563 webrtc::VideoFrame video_frame(frame.video_frame_buffer(), 0, 0, | 1563 webrtc::VideoFrame video_frame(frame.video_frame_buffer(), 0, 0, |
1564 frame.rotation()); | 1564 frame.rotation()); |
1565 rtc::CritScope cs(&lock_); | 1565 rtc::CritScope cs(&lock_); |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2566 rtx_mapping[video_codecs[i].codec.id] != | 2566 rtx_mapping[video_codecs[i].codec.id] != |
2567 fec_settings.red_payload_type) { | 2567 fec_settings.red_payload_type) { |
2568 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2568 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2569 } | 2569 } |
2570 } | 2570 } |
2571 | 2571 |
2572 return video_codecs; | 2572 return video_codecs; |
2573 } | 2573 } |
2574 | 2574 |
2575 } // namespace cricket | 2575 } // namespace cricket |
OLD | NEW |