rtp_receiver_strategy.cc revision 07bf43c67303db4ab64b44f5b849465ec7dfef75
1/* 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" 12 13#include <cstdlib> 14 15namespace webrtc { 16 17RTPReceiverStrategy::RTPReceiverStrategy() { 18 memset(&last_payload_, 0, sizeof(last_payload_)); 19} 20 21void RTPReceiverStrategy::GetLastMediaSpecificPayload( 22 ModuleRTPUtility::PayloadUnion* payload) const { 23 memcpy(payload, &last_payload_, sizeof(*payload)); 24} 25 26void RTPReceiverStrategy::SetLastMediaSpecificPayload( 27 const ModuleRTPUtility::PayloadUnion& payload) { 28 memcpy(&last_payload_, &payload, sizeof(last_payload_)); 29} 30 31} // namespace webrtc 32