| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 MSG_DATARECEIVED, | 53 MSG_DATARECEIVED, |
| 54 MSG_FIRSTPACKETRECEIVED, | 54 MSG_FIRSTPACKETRECEIVED, |
| 55 MSG_STREAMCLOSEDREMOTELY, | 55 MSG_STREAMCLOSEDREMOTELY, |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // Value specified in RFC 5764. | 58 // Value specified in RFC 5764. |
| 59 static const char kDtlsSrtpExporterLabel[] = "EXTRACTOR-dtls_srtp"; | 59 static const char kDtlsSrtpExporterLabel[] = "EXTRACTOR-dtls_srtp"; |
| 60 | 60 |
| 61 static const int kAgcMinus10db = -10; | 61 static const int kAgcMinus10db = -10; |
| 62 | 62 |
| 63 static void SetSessionError(BaseSession* session, BaseSession::Error error, | |
| 64 const std::string& error_desc) { | |
| 65 session->SetError(error, error_desc); | |
| 66 } | |
| 67 | |
| 68 static void SafeSetError(const std::string& message, std::string* error_desc) { | 63 static void SafeSetError(const std::string& message, std::string* error_desc) { |
| 69 if (error_desc) { | 64 if (error_desc) { |
| 70 *error_desc = message; | 65 *error_desc = message; |
| 71 } | 66 } |
| 72 } | 67 } |
| 73 | 68 |
| 74 struct PacketMessageData : public rtc::MessageData { | 69 struct PacketMessageData : public rtc::MessageData { |
| 75 rtc::Buffer packet; | 70 rtc::Buffer packet; |
| 76 rtc::DiffServCodePoint dscp; | 71 rtc::DiffServCodePoint dscp; |
| 77 }; | 72 }; |
| (...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2429 return (data_channel_type_ == DCT_RTP); | 2424 return (data_channel_type_ == DCT_RTP); |
| 2430 } | 2425 } |
| 2431 | 2426 |
| 2432 void DataChannel::OnStreamClosedRemotely(uint32 sid) { | 2427 void DataChannel::OnStreamClosedRemotely(uint32 sid) { |
| 2433 rtc::TypedMessageData<uint32>* message = | 2428 rtc::TypedMessageData<uint32>* message = |
| 2434 new rtc::TypedMessageData<uint32>(sid); | 2429 new rtc::TypedMessageData<uint32>(sid); |
| 2435 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2430 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
| 2436 } | 2431 } |
| 2437 | 2432 |
| 2438 } // namespace cricket | 2433 } // namespace cricket |
| OLD | NEW |