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

Unified Diff: media/cast/test/receiver.cc

Issue 2068133005: Refactoring: Use enum for RtpPayloadType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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: media/cast/test/receiver.cc
diff --git a/media/cast/test/receiver.cc b/media/cast/test/receiver.cc
index b2e59bd20d8afd6ee4ccd15f69012c08a451e2a3..04739b2ed88fe391b46335ea41dc31c887c65b92 100644
--- a/media/cast/test/receiver.cc
+++ b/media/cast/test/receiver.cc
@@ -59,10 +59,8 @@ namespace cast {
#define DEFAULT_SEND_IP "0.0.0.0"
#define DEFAULT_AUDIO_FEEDBACK_SSRC "2"
#define DEFAULT_AUDIO_INCOMING_SSRC "1"
-#define DEFAULT_AUDIO_PAYLOAD_TYPE "127"
#define DEFAULT_VIDEO_FEEDBACK_SSRC "12"
#define DEFAULT_VIDEO_INCOMING_SSRC "11"
-#define DEFAULT_VIDEO_PAYLOAD_TYPE "96"
#if defined(USE_X11)
const char* kVideoWindowWidth = "1280";
@@ -125,10 +123,11 @@ void GetWindowSize(int* width, int* height) {
void GetAudioPayloadtype(FrameReceiverConfig* audio_config) {
test::InputBuilder input("Choose audio receiver payload type.",
- DEFAULT_AUDIO_PAYLOAD_TYPE,
- kDefaultRtpVideoPayloadType /* low_range */,
- kDefaultRtpAudioPayloadType /* high_range */);
- audio_config->rtp_payload_type = input.GetIntInput();
+ std::to_string(RTP_PAYLOAD_AUDIO_OPUS),
+ RTP_PAYLOAD_AUDIO_OPUS /* low_range */,
+ RTP_PAYLOAD_AUDIO_LAST /* high_range */);
+ audio_config->rtp_payload_type =
+ static_cast<RtpPayloadType>(input.GetIntInput());
}
FrameReceiverConfig GetAudioReceiverConfig() {
@@ -141,10 +140,11 @@ FrameReceiverConfig GetAudioReceiverConfig() {
void GetVideoPayloadtype(FrameReceiverConfig* video_config) {
test::InputBuilder input("Choose video receiver payload type.",
- DEFAULT_VIDEO_PAYLOAD_TYPE,
- kDefaultRtpVideoPayloadType /* low_range */,
- kDefaultRtpAudioPayloadType /* high_range */);
- video_config->rtp_payload_type = input.GetIntInput();
+ std::to_string(RTP_PAYLOAD_VIDEO_VP8),
+ RTP_PAYLOAD_VIDEO_VP8 /* low_range */,
+ RTP_PAYLOAD_VIDEO_LAST /* high_range */);
+ video_config->rtp_payload_type =
+ static_cast<RtpPayloadType>(input.GetIntInput());
}
FrameReceiverConfig GetVideoReceiverConfig() {

Powered by Google App Engine
This is Rietveld 408576698