Remove the redundant method GetPayloadSpecifics
It's in the way of a refactoring. Also change PayloadTypeToPayload---the method all callers can use instead---to return Optional<Payload> instead of const Payload* (for thread safety reasons: an object that protects itself with a mutex shouldn't be handing out pointers to parts of itself). BUG=webrtc:8159 Change-Id: I7ef0d545077ffdea016b309f2165e3c4955a2928 Reviewed-on: https://webrtc-review.googlesource.com/2360 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19917}
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "api/audio_codecs/audio_format.h"
|
||||
#include "api/optional.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_utility.h"
|
||||
#include "rtc_base/criticalsection.h"
|
||||
|
||||
@ -55,11 +56,10 @@ class RTPPayloadRegistry {
|
||||
|
||||
bool IsRed(const RTPHeader& header) const;
|
||||
|
||||
bool GetPayloadSpecifics(uint8_t payload_type, PayloadUnion* payload) const;
|
||||
|
||||
int GetPayloadTypeFrequency(uint8_t payload_type) const;
|
||||
|
||||
const RtpUtility::Payload* PayloadTypeToPayload(uint8_t payload_type) const;
|
||||
rtc::Optional<RtpUtility::Payload> PayloadTypeToPayload(
|
||||
uint8_t payload_type) const;
|
||||
|
||||
void ResetLastReceivedPayloadTypes() {
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
|
||||
Reference in New Issue
Block a user