Line data Source code
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 <stdlib.h>
14 :
15 : namespace webrtc {
16 :
17 0 : RTPReceiverStrategy::RTPReceiverStrategy(RtpData* data_callback)
18 0 : : data_callback_(data_callback) {
19 0 : memset(&last_payload_, 0, sizeof(last_payload_));
20 0 : }
21 :
22 0 : void RTPReceiverStrategy::GetLastMediaSpecificPayload(
23 : PayloadUnion* payload) const {
24 0 : rtc::CritScope cs(&crit_sect_);
25 0 : memcpy(payload, &last_payload_, sizeof(*payload));
26 0 : }
27 :
28 0 : void RTPReceiverStrategy::SetLastMediaSpecificPayload(
29 : const PayloadUnion& payload) {
30 0 : rtc::CritScope cs(&crit_sect_);
31 0 : memcpy(&last_payload_, &payload, sizeof(last_payload_));
32 0 : }
33 :
34 0 : void RTPReceiverStrategy::CheckPayloadChanged(int8_t payload_type,
35 : PayloadUnion* specific_payload,
36 : bool* should_discard_changes) {
37 : // Default: Keep changes.
38 0 : *should_discard_changes = false;
39 0 : }
40 :
41 0 : int RTPReceiverStrategy::Energy(uint8_t array_of_energy[kRtpCsrcSize]) const {
42 0 : return -1;
43 : }
44 :
45 : } // namespace webrtc
|