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

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

Issue 1490233010: Clear old decoders after recreating the receiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 decoder.payload_type = recv_codecs[i].codec.id; 2369 decoder.payload_type = recv_codecs[i].codec.id;
2370 decoder.payload_name = recv_codecs[i].codec.name; 2370 decoder.payload_name = recv_codecs[i].codec.name;
2371 config_.decoders.push_back(decoder); 2371 config_.decoders.push_back(decoder);
2372 } 2372 }
2373 2373
2374 // TODO(pbos): Reconfigure RTX based on incoming recv_codecs. 2374 // TODO(pbos): Reconfigure RTX based on incoming recv_codecs.
2375 config_.rtp.fec = recv_codecs.front().fec; 2375 config_.rtp.fec = recv_codecs.front().fec;
2376 config_.rtp.nack.rtp_history_ms = 2376 config_.rtp.nack.rtp_history_ms =
2377 HasNack(recv_codecs.begin()->codec) ? kNackHistoryMs : 0; 2377 HasNack(recv_codecs.begin()->codec) ? kNackHistoryMs : 0;
2378 2378
2379 ClearDecoders(&old_decoders);
2380 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvCodecs: " 2379 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvCodecs: "
2381 << CodecSettingsVectorToString(recv_codecs); 2380 << CodecSettingsVectorToString(recv_codecs);
2382 RecreateWebRtcStream(); 2381 RecreateWebRtcStream();
2382 ClearDecoders(&old_decoders);
2383 } 2383 }
2384 2384
2385 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetLocalSsrc( 2385 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetLocalSsrc(
2386 uint32_t local_ssrc) { 2386 uint32_t local_ssrc) {
2387 // TODO(pbos): Consider turning this sanity check into a RTC_DCHECK. You 2387 // TODO(pbos): Consider turning this sanity check into a RTC_DCHECK. You
2388 // should not be able to create a sender with the same SSRC as a receiver, but 2388 // should not be able to create a sender with the same SSRC as a receiver, but
2389 // right now this can't be done due to unittests depending on receiving what 2389 // right now this can't be done due to unittests depending on receiving what
2390 // they are sending from the same MediaChannel. 2390 // they are sending from the same MediaChannel.
2391 if (local_ssrc == config_.rtp.remote_ssrc) { 2391 if (local_ssrc == config_.rtp.remote_ssrc) {
2392 LOG(LS_INFO) << "Ignoring call to SetLocalSsrc because parameters are " 2392 LOG(LS_INFO) << "Ignoring call to SetLocalSsrc because parameters are "
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2683 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2684 } 2684 }
2685 } 2685 }
2686 2686
2687 return video_codecs; 2687 return video_codecs;
2688 } 2688 }
2689 2689
2690 } // namespace cricket 2690 } // namespace cricket
2691 2691
2692 #endif // HAVE_WEBRTC_VIDEO 2692 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698