Rename RTP-extension constants.
BUG= R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/3969004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5137 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
53c8573525
commit
ce90eff345
17
webrtc/config.cc
Normal file
17
webrtc/config.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/config.h"
|
||||
|
||||
namespace webrtc {
|
||||
const char* RtpExtension::kTOffset = "urn:ietf:params:rtp-hdrext:toffset";
|
||||
const char* RtpExtension::kAbsSendTime =
|
||||
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time";
|
||||
} // namespace webrtc
|
@ -16,6 +16,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
struct RtpStatistics {
|
||||
@ -67,6 +69,8 @@ struct RtxConfig {
|
||||
|
||||
// RTP header extension to use for the video stream, see RFC 5285.
|
||||
struct RtpExtension {
|
||||
static const char* kTOffset;
|
||||
static const char* kAbsSendTime;
|
||||
RtpExtension(const char* name, int id) : name(name), id(id) {}
|
||||
// TODO(mflodman) Add API to query supported extensions.
|
||||
std::string name;
|
||||
|
@ -155,7 +155,7 @@ TEST_P(RampUpTest, RampUpWithPadding) {
|
||||
send_config.codec.plType = 125;
|
||||
send_config.pacing = GetParam();
|
||||
send_config.rtp.extensions.push_back(
|
||||
RtpExtension("toffset", kTOffsetExtensionId));
|
||||
RtpExtension(RtpExtension::kTOffset, kTOffsetExtensionId));
|
||||
|
||||
test::GenerateRandomSsrcs(&send_config, &reserved_ssrcs_);
|
||||
|
||||
|
@ -123,10 +123,10 @@ VideoSendStream::VideoSendStream(newapi::Transport* transport,
|
||||
for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
|
||||
const std::string& extension = config_.rtp.extensions[i].name;
|
||||
int id = config_.rtp.extensions[i].id;
|
||||
if (extension == "toffset") {
|
||||
if (extension == RtpExtension::kTOffset) {
|
||||
if (rtp_rtcp_->SetSendTimestampOffsetStatus(channel_, true, id) != 0)
|
||||
abort();
|
||||
} else if (extension == "abs-send-time") {
|
||||
} else if (extension == RtpExtension::kAbsSendTime) {
|
||||
if (rtp_rtcp_->SetSendAbsoluteSendTimeStatus(channel_, true, id) != 0)
|
||||
abort();
|
||||
} else {
|
||||
|
@ -170,7 +170,7 @@ TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
|
||||
|
||||
VideoSendStream::Config send_config = GetSendTestConfig(call.get());
|
||||
send_config.rtp.extensions.push_back(
|
||||
RtpExtension("abs-send-time", kAbsSendTimeExtensionId));
|
||||
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
|
||||
|
||||
RunSendTest(call.get(), send_config, &observer);
|
||||
}
|
||||
@ -216,7 +216,7 @@ TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
|
||||
VideoSendStream::Config send_config = GetSendTestConfig(call.get());
|
||||
send_config.encoder = &encoder;
|
||||
send_config.rtp.extensions.push_back(
|
||||
RtpExtension("toffset", kTOffsetExtensionId));
|
||||
RtpExtension(RtpExtension::kTOffset, kTOffsetExtensionId));
|
||||
|
||||
RunSendTest(call.get(), send_config, &observer);
|
||||
}
|
||||
|
@ -61,6 +61,7 @@
|
||||
'sources': [
|
||||
'call.cc',
|
||||
'call.h',
|
||||
'config.cc',
|
||||
'config.h',
|
||||
'frame_callback.h',
|
||||
'transport.h',
|
||||
|
Loading…
Reference in New Issue
Block a user