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

Unified Diff: media/cast/net/cast_transport_config.h

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/net/cast_transport_config.h
diff --git a/media/cast/net/cast_transport_config.h b/media/cast/net/cast_transport_config.h
index dddc94696eecaf85a324fa9cb10baf305155d945..1ff840cbf60f2bb6e2c4b686f9f795bd2e7f1ec2 100644
--- a/media/cast/net/cast_transport_config.h
+++ b/media/cast/net/cast_transport_config.h
@@ -30,6 +30,34 @@ enum Codec {
CODEC_LAST = CODEC_VIDEO_H264
};
+// Describes the content being transported over RTP streams.
+enum RtpPayloadType {
miu 2016/06/20 21:00:27 nit style suggestion: Use an enum class: enum c
xjz 2016/06/21 17:24:31 Done.
+ RTP_PAYLOAD_UNKNOWN,
+
+ // Cast Streaming will encode raw audio frames using one of its available
+ // codec implementations, and transport encoded data in the RTP stream.
+ RTP_PAYLOAD_AUDIO_OPUS = 96,
miu 2016/06/20 21:00:27 If we add new ones in the future, the numbering mi
xjz 2016/06/21 17:24:31 Done.
+ RTP_PAYLOAD_AUDIO_AAC,
+ RTP_PAYLOAD_AUDIO_PCM16,
+
+ // Audio frame data is not modified, and should be transported reliably and
+ // in-sequence. No assumptions about the data can be made.
+ RTP_PAYLOAD_REMOTE_AUDIO,
+
+ RTP_PAYLOAD_AUDIO_LAST = RTP_PAYLOAD_REMOTE_AUDIO,
+
+ // Cast Streaming will encode raw video frames using one of its available
+ // codec implementations, and transport encoded data in the RTP stream.
+ RTP_PAYLOAD_VIDEO_VP8,
+ RTP_PAYLOAD_VIDEO_H264,
+
+ // Video frame data is not modified, and should be transported reliably and
+ // in-sequence. No assumptions about the data can be made.
+ RTP_PAYLOAD_REMOTE_VIDEO,
+
+ RTP_PAYLOAD_VIDEO_LAST = RTP_PAYLOAD_REMOTE_VIDEO
+};
+
struct CastTransportRtpConfig {
CastTransportRtpConfig();
~CastTransportRtpConfig();
@@ -41,7 +69,7 @@ struct CastTransportRtpConfig {
uint32_t feedback_ssrc;
// RTP payload type enum: Specifies the type/encoding of frame data.
- int rtp_payload_type;
+ RtpPayloadType rtp_payload_type;
// The AES crypto key and initialization vector. Each of these strings
// contains the data in binary form, of size kAesKeySize. If they are empty

Powered by Google App Engine
This is Rietveld 408576698