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

Side by Side Diff: talk/session/media/channel.cc

Issue 1284693003: Fix some minor errors with the voice engine caused by the refactor CL https://codereview.webrtc.org… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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
« 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 2004 Google Inc. 3 * Copyright 2004 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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 return false; 1473 return false;
1474 } 1474 }
1475 1475
1476 if (!SetRtpTransportParameters_w(content, action, CS_LOCAL, error_desc)) { 1476 if (!SetRtpTransportParameters_w(content, action, CS_LOCAL, error_desc)) {
1477 return false; 1477 return false;
1478 } 1478 }
1479 1479
1480 AudioRecvParameters recv_params = last_recv_params_; 1480 AudioRecvParameters recv_params = last_recv_params_;
1481 RtpParametersFromMediaDescription(audio, &recv_params); 1481 RtpParametersFromMediaDescription(audio, &recv_params);
1482 if (!media_channel()->SetRecvParameters(recv_params)) { 1482 if (!media_channel()->SetRecvParameters(recv_params)) {
1483 SafeSetError("Failed to set local video description recv parameters.", 1483 SafeSetError("Failed to set local audio description recv parameters.",
1484 error_desc); 1484 error_desc);
1485 return false; 1485 return false;
1486 } 1486 }
1487 for (const AudioCodec& codec : audio->codecs()) { 1487 for (const AudioCodec& codec : audio->codecs()) {
1488 bundle_filter()->AddPayloadType(codec.id); 1488 bundle_filter()->AddPayloadType(codec.id);
1489 } 1489 }
1490 last_recv_params_ = recv_params; 1490 last_recv_params_ = recv_params;
1491 1491
1492 // TODO(pthatcher): Move local streams into AudioSendParameters, and 1492 // TODO(pthatcher): Move local streams into AudioSendParameters, and
1493 // only give it to the media channel once we have a remote 1493 // only give it to the media channel once we have a remote
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 1538
1539 // TODO(pthatcher): Move remote streams into AudioRecvParameters, 1539 // TODO(pthatcher): Move remote streams into AudioRecvParameters,
1540 // and only give it to the media channel once we have a local 1540 // and only give it to the media channel once we have a local
1541 // description too (without a local description, we won't be able to 1541 // description too (without a local description, we won't be able to
1542 // recv them anyway). 1542 // recv them anyway).
1543 if (!UpdateRemoteStreams_w(audio->streams(), action, error_desc)) { 1543 if (!UpdateRemoteStreams_w(audio->streams(), action, error_desc)) {
1544 SafeSetError("Failed to set remote audio description streams.", error_desc); 1544 SafeSetError("Failed to set remote audio description streams.", error_desc);
1545 return false; 1545 return false;
1546 } 1546 }
1547 1547
1548 if (audio->rtp_header_extensions_set()) {
1549 MaybeCacheRtpAbsSendTimeHeaderExtension(audio->rtp_header_extensions());
1550 }
1551
1548 set_remote_content_direction(content->direction()); 1552 set_remote_content_direction(content->direction());
1549 ChangeState(); 1553 ChangeState();
1550 return true; 1554 return true;
1551 } 1555 }
1552 1556
1553 bool VoiceChannel::SetRingbackTone_w(const void* buf, int len) { 1557 bool VoiceChannel::SetRingbackTone_w(const void* buf, int len) {
1554 ASSERT(worker_thread() == rtc::Thread::Current()); 1558 ASSERT(worker_thread() == rtc::Thread::Current());
1555 return media_channel()->SetRingbackTone(static_cast<const char*>(buf), len); 1559 return media_channel()->SetRingbackTone(static_cast<const char*>(buf), len);
1556 } 1560 }
1557 1561
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
2429 return (data_channel_type_ == DCT_RTP); 2433 return (data_channel_type_ == DCT_RTP);
2430 } 2434 }
2431 2435
2432 void DataChannel::OnStreamClosedRemotely(uint32 sid) { 2436 void DataChannel::OnStreamClosedRemotely(uint32 sid) {
2433 rtc::TypedMessageData<uint32>* message = 2437 rtc::TypedMessageData<uint32>* message =
2434 new rtc::TypedMessageData<uint32>(sid); 2438 new rtc::TypedMessageData<uint32>(sid);
2435 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); 2439 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message);
2436 } 2440 }
2437 2441
2438 } // namespace cricket 2442 } // namespace cricket
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