Files
platform-external-webrtc/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.cc
phoglund@webrtc.org a22a9bd9ca Cleaned up the data path for payload data, made callbacks to rtp_receiver nonoptional.
The audio receiver is now completely independent of rtp_receiver: video will hopefully be too in the next patch.

BUG=
TEST=vie & voe_auto_test full runs

Review URL: https://webrtc-codereview.appspot.com/1014006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3372 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-14 10:01:55 +00:00

33 lines
1.0 KiB
C++

/*
* Copyright (c) 2012 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/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
#include <cstdlib>
namespace webrtc {
RTPReceiverStrategy::RTPReceiverStrategy(RtpData* data_callback)
: data_callback_(data_callback) {
memset(&last_payload_, 0, sizeof(last_payload_));
}
void RTPReceiverStrategy::GetLastMediaSpecificPayload(
ModuleRTPUtility::PayloadUnion* payload) const {
memcpy(payload, &last_payload_, sizeof(*payload));
}
void RTPReceiverStrategy::SetLastMediaSpecificPayload(
const ModuleRTPUtility::PayloadUnion& payload) {
memcpy(&last_payload_, &payload, sizeof(last_payload_));
}
} // namespace webrtc