Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: webrtc/modules/audio_coding/main/acm2/rent_a_codec.h

Issue 1450883002: Move CNG/RED payload type extraction to Rent-A-Codec (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac5
Patch Set: include <map> Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
index 45715607aae67cd44fdf429196cb112d54973ca7..db728ae2942cbb78e9ce938af322760f6a62da03 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
+++ b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
@@ -12,6 +12,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_RENT_A_CODEC_H_
#include <stddef.h>
+#include <map>
#include "webrtc/base/array_view.h"
#include "webrtc/base/constructormagic.h"
@@ -181,6 +182,16 @@ class RentACodec {
static rtc::Optional<NetEqDecoder> NetEqDecoderFromCodecId(CodecId codec_id,
int num_channels);
+ // Parse codec_inst and extract payload types. If the given CodecInst was for
+ // the wrong sort of codec, return kSkip; otherwise, if the rate was illegal,
+ // return kBadFreq; otherwise, update the given RTP timestamp rate (Hz) ->
+ // payload type map and return kOk.
+ enum class RegistrationResult { kOk, kSkip, kBadFreq };
+ static RegistrationResult RegisterCngPayloadType(std::map<int, int>* pt_map,
+ const CodecInst& codec_inst);
+ static RegistrationResult RegisterRedPayloadType(std::map<int, int>* pt_map,
+ const CodecInst& codec_inst);
+
RentACodec();
~RentACodec();
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/codec_manager.cc ('k') | webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698