(Auto)update libjingle 64247466-> 64326665
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5845 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
258
talk/base/genericslot.h
Executable file
258
talk/base/genericslot.h
Executable file
@@ -0,0 +1,258 @@
|
||||
// This file was GENERATED by command:
|
||||
// pump.py genericslot.h.pump
|
||||
// DO NOT EDIT BY HAND!!!
|
||||
|
||||
/*
|
||||
* libjingle
|
||||
* Copyright 2014 Google Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef TALK_BASE_GENERICSLOT_H_
|
||||
#define TALK_BASE_GENERICSLOT_H_
|
||||
|
||||
// To generate genericslot.h from genericslot.h.pump, execute:
|
||||
// /home/build/google3/third_party/gtest/scripts/pump.py genericslot.h.pump
|
||||
|
||||
// Generic-slots are pure slots that can be hooked up to signals. They're
|
||||
// mainly intended to be used in tests where we want to check if a signal
|
||||
// was invoked and what arguments were passed. NOTE: They do not do any
|
||||
// lifetime management of the arguments received via callbacks.
|
||||
//
|
||||
// Example:
|
||||
// /* Some signal */
|
||||
// sigslot::signal1<int> foo;
|
||||
//
|
||||
// /* We want to monitor foo in some test */
|
||||
// talk_base::GenericSlot1<int> slot(&foo, 0);
|
||||
// foo.emit(5);
|
||||
// EXPECT_TRUE(slot.callback_received());
|
||||
// EXPECT_EQ(5, *(slot.arg1()));
|
||||
//
|
||||
|
||||
#include "talk/base/constructormagic.h"
|
||||
#include "talk/base/sigslot.h"
|
||||
|
||||
namespace talk_base {
|
||||
|
||||
template <class A1>
|
||||
class GenericSlot1 : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot1(sigslot::signal1<A1>* signal,
|
||||
const A1& arg1_initial)
|
||||
: arg1_initial_(arg1_initial) {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot1::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;
|
||||
arg1_ = arg1_initial_;
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }
|
||||
const A1& arg1() const { return arg1_; }
|
||||
|
||||
private:
|
||||
void OnSignalCallback(A1 arg1) {
|
||||
callback_received_ = true;
|
||||
arg1_ = arg1;
|
||||
}
|
||||
|
||||
bool callback_received_;
|
||||
A1 arg1_initial_, arg1_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot1);
|
||||
};
|
||||
|
||||
template <class A1, class A2>
|
||||
class GenericSlot2 : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot2(sigslot::signal2<A1, A2>* signal,
|
||||
const A1& arg1_initial, const A2& arg2_initial)
|
||||
: arg1_initial_(arg1_initial), arg2_initial_(arg2_initial) {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot2::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;
|
||||
arg1_ = arg1_initial_;
|
||||
arg2_ = arg2_initial_;
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }
|
||||
const A1& arg1() const { return arg1_; }
|
||||
const A2& arg2() const { return arg2_; }
|
||||
|
||||
private:
|
||||
void OnSignalCallback(A1 arg1, A2 arg2) {
|
||||
callback_received_ = true;
|
||||
arg1_ = arg1;
|
||||
arg2_ = arg2;
|
||||
}
|
||||
|
||||
bool callback_received_;
|
||||
A1 arg1_initial_, arg1_;
|
||||
A2 arg2_initial_, arg2_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot2);
|
||||
};
|
||||
|
||||
template <class A1, class A2, class A3>
|
||||
class GenericSlot3 : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot3(sigslot::signal3<A1, A2, A3>* signal,
|
||||
const A1& arg1_initial, const A2& arg2_initial,
|
||||
const A3& arg3_initial)
|
||||
: arg1_initial_(arg1_initial), arg2_initial_(arg2_initial),
|
||||
arg3_initial_(arg3_initial) {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot3::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;
|
||||
arg1_ = arg1_initial_;
|
||||
arg2_ = arg2_initial_;
|
||||
arg3_ = arg3_initial_;
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }
|
||||
const A1& arg1() const { return arg1_; }
|
||||
const A2& arg2() const { return arg2_; }
|
||||
const A3& arg3() const { return arg3_; }
|
||||
|
||||
private:
|
||||
void OnSignalCallback(A1 arg1, A2 arg2, A3 arg3) {
|
||||
callback_received_ = true;
|
||||
arg1_ = arg1;
|
||||
arg2_ = arg2;
|
||||
arg3_ = arg3;
|
||||
}
|
||||
|
||||
bool callback_received_;
|
||||
A1 arg1_initial_, arg1_;
|
||||
A2 arg2_initial_, arg2_;
|
||||
A3 arg3_initial_, arg3_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot3);
|
||||
};
|
||||
|
||||
template <class A1, class A2, class A3, class A4>
|
||||
class GenericSlot4 : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot4(sigslot::signal4<A1, A2, A3, A4>* signal,
|
||||
const A1& arg1_initial, const A2& arg2_initial,
|
||||
const A3& arg3_initial, const A4& arg4_initial)
|
||||
: arg1_initial_(arg1_initial), arg2_initial_(arg2_initial),
|
||||
arg3_initial_(arg3_initial), arg4_initial_(arg4_initial) {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot4::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;
|
||||
arg1_ = arg1_initial_;
|
||||
arg2_ = arg2_initial_;
|
||||
arg3_ = arg3_initial_;
|
||||
arg4_ = arg4_initial_;
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }
|
||||
const A1& arg1() const { return arg1_; }
|
||||
const A2& arg2() const { return arg2_; }
|
||||
const A3& arg3() const { return arg3_; }
|
||||
const A4& arg4() const { return arg4_; }
|
||||
|
||||
private:
|
||||
void OnSignalCallback(A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
|
||||
callback_received_ = true;
|
||||
arg1_ = arg1;
|
||||
arg2_ = arg2;
|
||||
arg3_ = arg3;
|
||||
arg4_ = arg4;
|
||||
}
|
||||
|
||||
bool callback_received_;
|
||||
A1 arg1_initial_, arg1_;
|
||||
A2 arg2_initial_, arg2_;
|
||||
A3 arg3_initial_, arg3_;
|
||||
A4 arg4_initial_, arg4_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot4);
|
||||
};
|
||||
|
||||
template <class A1, class A2, class A3, class A4, class A5>
|
||||
class GenericSlot5 : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot5(sigslot::signal5<A1, A2, A3, A4, A5>* signal,
|
||||
const A1& arg1_initial, const A2& arg2_initial,
|
||||
const A3& arg3_initial, const A4& arg4_initial,
|
||||
const A5& arg5_initial)
|
||||
: arg1_initial_(arg1_initial), arg2_initial_(arg2_initial),
|
||||
arg3_initial_(arg3_initial), arg4_initial_(arg4_initial),
|
||||
arg5_initial_(arg5_initial) {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot5::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;
|
||||
arg1_ = arg1_initial_;
|
||||
arg2_ = arg2_initial_;
|
||||
arg3_ = arg3_initial_;
|
||||
arg4_ = arg4_initial_;
|
||||
arg5_ = arg5_initial_;
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }
|
||||
const A1& arg1() const { return arg1_; }
|
||||
const A2& arg2() const { return arg2_; }
|
||||
const A3& arg3() const { return arg3_; }
|
||||
const A4& arg4() const { return arg4_; }
|
||||
const A5& arg5() const { return arg5_; }
|
||||
|
||||
private:
|
||||
void OnSignalCallback(A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) {
|
||||
callback_received_ = true;
|
||||
arg1_ = arg1;
|
||||
arg2_ = arg2;
|
||||
arg3_ = arg3;
|
||||
arg4_ = arg4;
|
||||
arg5_ = arg5;
|
||||
}
|
||||
|
||||
bool callback_received_;
|
||||
A1 arg1_initial_, arg1_;
|
||||
A2 arg2_initial_, arg2_;
|
||||
A3 arg3_initial_, arg3_;
|
||||
A4 arg4_initial_, arg4_;
|
||||
A5 arg5_initial_, arg5_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot5);
|
||||
};
|
||||
} // namespace talk_base
|
||||
|
||||
#endif // TALK_BASE_GENERICSLOT_H_
|
101
talk/base/genericslot.h.pump
Executable file
101
talk/base/genericslot.h.pump
Executable file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* libjingle
|
||||
* Copyright 2014 Google Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef TALK_BASE_GENERICSLOT_H_
|
||||
#define TALK_BASE_GENERICSLOT_H_
|
||||
|
||||
// To generate genericslot.h from genericslot.h.pump, execute:
|
||||
// /home/build/google3/third_party/gtest/scripts/pump.py genericslot.h.pump
|
||||
|
||||
// Generic-slots are pure slots that can be hooked up to signals. They're
|
||||
// mainly intended to be used in tests where we want to check if a signal
|
||||
// was invoked and what arguments were passed. NOTE: They do not do any
|
||||
// lifetime management of the arguments received via callbacks.
|
||||
//
|
||||
// Example:
|
||||
// /* Some signal */
|
||||
// sigslot::signal1<int> foo;
|
||||
//
|
||||
// /* We want to monitor foo in some test */
|
||||
// talk_base::GenericSlot1<int> slot(&foo, 0);
|
||||
// foo.emit(5);
|
||||
// EXPECT_TRUE(slot.callback_received());
|
||||
// EXPECT_EQ(5, *(slot.arg1()));
|
||||
//
|
||||
|
||||
#include "talk/base/constructormagic.h"
|
||||
#include "talk/base/sigslot.h"
|
||||
|
||||
namespace talk_base {
|
||||
|
||||
$var n = 5
|
||||
$range i 1..n
|
||||
$for i [[
|
||||
$range j 1..i
|
||||
|
||||
template <$for j , [[class A$j]]>
|
||||
class GenericSlot$i : public sigslot::has_slots<> {
|
||||
public:
|
||||
GenericSlot$i(sigslot::signal$i<$for j , [[A$j]]>* signal,
|
||||
$for j , [[const A$j& arg$j[[]]_initial]])
|
||||
: $for j , [[arg$j[[]]_initial_(arg$j[[]]_initial)]] {
|
||||
Reset();
|
||||
signal->connect(this, &GenericSlot$i::OnSignalCallback);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
callback_received_ = false;$for j [[
|
||||
|
||||
arg$j[[]]_ = arg$j[[]]_initial_; ]]
|
||||
|
||||
}
|
||||
|
||||
bool callback_received() const { return callback_received_; }$for j [[
|
||||
|
||||
const A$j& arg$j() const { return arg$j[[]]_; }]]
|
||||
|
||||
|
||||
private:
|
||||
void OnSignalCallback($for j , [[A$j arg$j]]) {
|
||||
callback_received_ = true;$for j [[
|
||||
|
||||
arg$j[[]]_ = arg$j;]]
|
||||
|
||||
}
|
||||
|
||||
bool callback_received_;$for j [[
|
||||
|
||||
A$j arg$j[[]]_initial_, arg$j[[]]_;]]
|
||||
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GenericSlot$i);
|
||||
};
|
||||
|
||||
]]
|
||||
} // namespace talk_base
|
||||
|
||||
#endif // TALK_BASE_GENERICSLOT_H_
|
28
talk/base/genericslot_unittest.cc
Executable file
28
talk/base/genericslot_unittest.cc
Executable file
@@ -0,0 +1,28 @@
|
||||
#include "talk/base/genericslot.h"
|
||||
#include "talk/base/gunit.h"
|
||||
#include "talk/base/sigslot.h"
|
||||
|
||||
namespace talk_base {
|
||||
|
||||
TEST(GenericSlotTest, TestSlot1) {
|
||||
sigslot::signal1<int> source1;
|
||||
GenericSlot1<int> slot1(&source1, 1);
|
||||
EXPECT_FALSE(slot1.callback_received());
|
||||
source1.emit(10);
|
||||
EXPECT_TRUE(slot1.callback_received());
|
||||
EXPECT_EQ(10, slot1.arg1());
|
||||
}
|
||||
|
||||
TEST(GenericSlotTest, TestSlot2) {
|
||||
sigslot::signal2<int, char> source2;
|
||||
GenericSlot2<int, char> slot2(&source2, 1, '0');
|
||||
EXPECT_FALSE(slot2.callback_received());
|
||||
source2.emit(10, 'x');
|
||||
EXPECT_TRUE(slot2.callback_received());
|
||||
EXPECT_EQ(10, slot2.arg1());
|
||||
EXPECT_EQ('x', slot2.arg2());
|
||||
}
|
||||
|
||||
// By induction we assume the rest work too...
|
||||
|
||||
} // namespace talk_base
|
@@ -16,12 +16,6 @@ namespace {
|
||||
"Host: localhost\r\n"
|
||||
"\r\n";
|
||||
|
||||
const char* const kResponse =
|
||||
"HTTP/1.1 200\r\n"
|
||||
"Connection: Close\r\n"
|
||||
"Content-Length: 0\r\n"
|
||||
"\r\n";
|
||||
|
||||
struct HttpServerMonitor : public sigslot::has_slots<> {
|
||||
HttpServerTransaction* transaction;
|
||||
bool server_closed, connection_closed;
|
||||
|
@@ -42,18 +42,10 @@ static const in6_addr kIPv6PublicAddr = {{{0x24, 0x01, 0xfa, 0x00,
|
||||
0x00, 0x04, 0x10, 0x00,
|
||||
0xbe, 0x30, 0x5b, 0xff,
|
||||
0xfe, 0xe5, 0x00, 0xc3}}};
|
||||
static const in6_addr kIPv6CompatAddr = {{{0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xfe, 0xe5, 0x00, 0xc3}}};
|
||||
static const in6_addr kIPv4MappedAnyAddr = {{{0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00}}};
|
||||
static const in6_addr kIPv4MappedLoopbackAddr = {{{0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff,
|
||||
0x7f, 0x00, 0x00, 0x01}}};
|
||||
static const in6_addr kIPv4MappedRFC1918Addr = {{{0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff,
|
||||
@@ -62,10 +54,6 @@ static const in6_addr kIPv4MappedPublicAddr = {{{0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff,
|
||||
0x01, 0x02, 0x03, 0x04}}};
|
||||
static const in6_addr kIPv6AllNodes = {{{0xff, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01}}};
|
||||
|
||||
static const std::string kIPv4AnyAddrString = "0.0.0.0";
|
||||
static const std::string kIPv4LoopbackAddrString = "127.0.0.1";
|
||||
|
@@ -51,7 +51,6 @@ static const std::string kFirefoxCorruptHeader =
|
||||
"iuahueqe32164";
|
||||
|
||||
static const std::string kProxyAddress = "proxy.net.com";
|
||||
static const int kProxyPort = 9999;
|
||||
|
||||
// Mocking out platform specific path to firefox prefs file.
|
||||
class FirefoxPrefsFileSystem : public FakeFileSystem {
|
||||
|
@@ -39,8 +39,6 @@
|
||||
|
||||
using namespace talk_base;
|
||||
|
||||
const int MAX = 65536;
|
||||
|
||||
// Generates a sequence of numbers (collaboratively).
|
||||
class TestGenerator {
|
||||
public:
|
||||
@@ -88,7 +86,6 @@ class SocketClient : public TestGenerator, public sigslot::has_slots<> {
|
||||
uint32 prev = reinterpret_cast<const uint32*>(buf)[0];
|
||||
uint32 result = Next(prev);
|
||||
|
||||
//socket_->set_readable(last < MAX);
|
||||
post_thread_->PostDelayed(200, post_handler_, 0, new TestMessage(result));
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,9 @@ enum {
|
||||
};
|
||||
|
||||
static const int64 kMaxDistance = ~(static_cast<int64>(1) << 63);
|
||||
#ifdef LINUX
|
||||
static const int kYU12Penalty = 16; // Needs to be higher than MJPG index.
|
||||
#endif
|
||||
static const int kDefaultScreencastFps = 5;
|
||||
typedef talk_base::TypedMessageData<CaptureState> StateChangeParams;
|
||||
|
||||
|
@@ -19,7 +19,6 @@ const int kUnitBarSize = 2;
|
||||
const int kBarcodeNormalBarHeight = 80;
|
||||
const int kBarcodeGuardBarHeight = 96;
|
||||
const int kBarcodeMaxEncodableDigits = 7;
|
||||
const int kBarcodeMaxEncodableValue = 9999999;
|
||||
|
||||
YuvFrameGenerator::YuvFrameGenerator(int width, int height,
|
||||
bool enable_barcode) {
|
||||
|
@@ -65,7 +65,6 @@ static const char* const kFilteredVideoDevicesName[] = {
|
||||
"Sonix SN9C201p", // Crashes in OpenAComponent and CloseComponent
|
||||
NULL,
|
||||
};
|
||||
static const int kVideoDeviceOpenAttempts = 3;
|
||||
static const UInt32 kAudioDeviceNameLength = 64;
|
||||
// Obj-C functions defined in macdevicemanagermm.mm
|
||||
// TODO(ronghuawu): have a shared header for these function defines.
|
||||
|
@@ -108,8 +108,6 @@ static const char kFecPayloadName[] = "ulpfec";
|
||||
|
||||
static const int kDefaultNumberOfTemporalLayers = 1; // 1:1
|
||||
|
||||
static const int kTimestampDeltaInSecondsForWarning = 2;
|
||||
|
||||
static const int kMaxExternalVideoCodecs = 8;
|
||||
static const int kExternalVideoPayloadTypeBase = 120;
|
||||
|
||||
@@ -3252,6 +3250,8 @@ bool WebRtcVideoMediaChannel::SendFrame(
|
||||
// TODO(justinlin): Reenable after Windows issues with clock drift are fixed.
|
||||
// Currently reverted to old behavior of discarding capture timestamp.
|
||||
#if 0
|
||||
static const int kTimestampDeltaInSecondsForWarning = 2;
|
||||
|
||||
// If the frame timestamp is 0, we will use the deliver time.
|
||||
const int64 frame_timestamp = frame->GetTimeStamp();
|
||||
if (frame_timestamp != 0) {
|
||||
|
@@ -77,19 +77,6 @@ static const int kNumPorts = 2;
|
||||
static const int kPort0 = 28653;
|
||||
static const int kPortStep = 5;
|
||||
|
||||
static const std::string kNotifyNick1 = "derekcheng_google.com^59422C27";
|
||||
static const std::string kNotifyNick2 = "someoneelses_google.com^7abd6a7a20";
|
||||
static const uint32 kNotifyAudioSsrc1 = 2625839801U;
|
||||
static const uint32 kNotifyAudioSsrc2 = 2529430427U;
|
||||
static const uint32 kNotifyVideoSsrc1 = 3;
|
||||
static const uint32 kNotifyVideoSsrc2 = 2;
|
||||
|
||||
static const std::string kViewRequestNick = "param_google.com^16A3CDBE";
|
||||
static const uint32 kViewRequestSsrc = 4;
|
||||
static const int kViewRequestWidth = 320;
|
||||
static const int kViewRequestHeight = 200;
|
||||
static const int kViewRequestFrameRate = 15;
|
||||
|
||||
int GetPort(int port_index) {
|
||||
return kPort0 + (port_index * kPortStep);
|
||||
}
|
||||
|
@@ -208,37 +208,6 @@ static const unsigned char kStunMessageWithErrorAttribute[] = {
|
||||
0x69, 0x7a, 0x65, 0x64
|
||||
};
|
||||
|
||||
// Message with an address attribute with an unknown address family,
|
||||
// and a byte string attribute. Check that we quit reading after the
|
||||
// bogus address family and don't read the username attribute.
|
||||
static const unsigned char kStunMessageWithInvalidAddressFamily[] = {
|
||||
0x01, 0x01, 0x00, 0x18, // binding response, length 24
|
||||
0x21, 0x12, 0xa4, 0x42, // magic cookie
|
||||
0x29, 0x1f, 0xcd, 0x7c, // transaction ID
|
||||
0xba, 0x58, 0xab, 0xd7,
|
||||
0xf2, 0x41, 0x01, 0x00,
|
||||
0x00, 0x01, 0x00, 0x08, // Mapped address, 4 byte length
|
||||
0x00, 0x09, 0xfe, 0xed, // Bogus address family (port unimportant).
|
||||
0xac, 0x17, 0x44, 0xe6, // Should be skipped.
|
||||
0x00, 0x06, 0x00, 0x08, // Username attribute (length 8)
|
||||
0x61, 0x62, 0x63, 0x64, // abcdefgh
|
||||
0x65, 0x66, 0x67, 0x68
|
||||
};
|
||||
|
||||
// Message with an address attribute with an invalid address length.
|
||||
// Should fail to be read.
|
||||
static const unsigned char kStunMessageWithInvalidAddressLength[] = {
|
||||
0x01, 0x01, 0x00, 0x18, // binding response, length 24
|
||||
0x21, 0x12, 0xa4, 0x42, // magic cookie
|
||||
0x29, 0x1f, 0xcd, 0x7c, // transaction ID
|
||||
0xba, 0x58, 0xab, 0xd7,
|
||||
0xf2, 0x41, 0x01, 0x00,
|
||||
0x00, 0x01, 0x00, 0x0c, // Mapped address, 12 byte length
|
||||
0x00, 0x01, 0xfe, 0xed, // Claims to be AF_INET.
|
||||
0xac, 0x17, 0x44, 0xe6,
|
||||
0x00, 0x06, 0x00, 0x08
|
||||
};
|
||||
|
||||
// Sample messages with an invalid length Field
|
||||
|
||||
// The actual length in bytes of the invalid messages (including STUN header)
|
||||
@@ -511,19 +480,10 @@ const in6_addr kIPv6TestAddress2 = { { { 0x24, 0x01, 0xfa, 0x00,
|
||||
0x06, 0x0c, 0xce, 0xff,
|
||||
0xfe, 0x1f, 0x61, 0xa4 } } };
|
||||
|
||||
// This is kIPv6TestAddress1 xor-ed with kTestTransactionID2.
|
||||
const in6_addr kIPv6XoredTestAddress = { { { 0x05, 0x13, 0x5e, 0x42,
|
||||
0xe3, 0xad, 0x56, 0xe1,
|
||||
0xc2, 0x30, 0x99, 0x9d,
|
||||
0xaa, 0xed, 0x01, 0xc3 } } };
|
||||
|
||||
#ifdef POSIX
|
||||
const in_addr kIPv4TestAddress1 = { 0xe64417ac };
|
||||
// This is kIPv4TestAddress xored with the STUN magic cookie.
|
||||
const in_addr kIPv4XoredTestAddress = { 0x8d05e0a4 };
|
||||
#elif defined WIN32
|
||||
// Windows in_addr has a union with a uchar[] array first.
|
||||
const in_addr kIPv4XoredTestAddress = { { 0x8d, 0x05, 0xe0, 0xa4 } };
|
||||
const in_addr kIPv4TestAddress1 = { { 0x0ac, 0x017, 0x044, 0x0e6 } };
|
||||
#endif
|
||||
const char kTestUserName1[] = "abcdefgh";
|
||||
|
@@ -57,8 +57,6 @@ static const size_t kNonceSize = 40;
|
||||
static const size_t TURN_CHANNEL_HEADER_SIZE = 4U;
|
||||
|
||||
// TODO(mallinath) - Move these to a common place.
|
||||
static const size_t kMaxPacketSize = 64 * 1024;
|
||||
|
||||
inline bool IsTurnChannelData(uint16 msg_type) {
|
||||
// The first two bits of a channel data message are 0b01.
|
||||
return ((msg_type & 0xC000) == 0x4000);
|
||||
|
@@ -22,10 +22,6 @@
|
||||
|
||||
namespace cricket {
|
||||
|
||||
static const char kSessionTypeVideo[] =
|
||||
"http://www.google.com/session/video";
|
||||
static const char kSessionNameRtp[] = "rtp";
|
||||
|
||||
static const char kDefaultStunHostname[] = "stun.l.google.com";
|
||||
static const int kDefaultStunPort = 19302;
|
||||
|
||||
|
@@ -23,8 +23,6 @@ static const talk_base::SocketAddress kStunAddr("44.44.44.44", 4444);
|
||||
static const talk_base::SocketAddress kRelayAddr("55.55.55.55", 5555);
|
||||
static const talk_base::SocketAddress kProxyAddr("66.66.66.66", 6666);
|
||||
static const talk_base::ProxyType kProxyType = talk_base::PROXY_HTTPS;
|
||||
static const char kChannelName[] = "rtp_test";
|
||||
static const int kComponent = 1;
|
||||
static const char kRelayHost[] = "relay.google.com";
|
||||
static const char kRelayToken[] =
|
||||
"CAESFwoOb2phQGdvb2dsZS5jb20Q043h47MmGhBTB1rbfIXkhuarDCZe+xF6";
|
||||
|
@@ -71,7 +71,6 @@ static const cricket::DataCodec kGoogleDataCodec(101, "google-data", 0);
|
||||
static const uint32 kSsrc1 = 0x1111;
|
||||
static const uint32 kSsrc2 = 0x2222;
|
||||
static const uint32 kSsrc3 = 0x3333;
|
||||
static const char kCName[] = "a@b.com";
|
||||
|
||||
template<class ChannelT,
|
||||
class MediaChannelT,
|
||||
|
@@ -891,7 +891,6 @@ const std::string kJingleInitiateDynamicWithoutNames(
|
||||
const uint32 kAudioSsrc = 4294967295U;
|
||||
const uint32 kVideoSsrc = 87654321;
|
||||
const uint32 kDataSsrc = 1010101;
|
||||
const uint32 kDataSid = 0;
|
||||
// Note that this message does not specify a session ID. It must be populated
|
||||
// before use.
|
||||
const std::string kGingleAcceptWithSsrcs(
|
||||
@@ -2514,6 +2513,7 @@ class MediaSessionClientTest : public sigslot::has_slots<> {
|
||||
CheckDataSsrcForIncomingAccept(call_->sessions()[0]);
|
||||
}
|
||||
// TODO(pthatcher): Check kDataSid if DCT_SCTP.
|
||||
// const uint32 kDataSid = 0;
|
||||
}
|
||||
|
||||
size_t ClearStanzas() {
|
||||
|
@@ -42,7 +42,6 @@ namespace buzz {
|
||||
namespace {
|
||||
const char kPresenting[] = "s";
|
||||
const char kNotPresenting[] = "o";
|
||||
const char kEmpty[] = "";
|
||||
|
||||
} // namespace
|
||||
|
||||
|
Reference in New Issue
Block a user