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

Unified Diff: media/cast/cast_config.h

Issue 306783002: [Cast] Clean-up: Merge AudioReceiverConfig+VideoReceiverConfig-->FrameReceiverConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed kFakeSoftwareAudio in AudioCodec enum, per hclam@. Created 6 years, 7 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
« no previous file with comments | « media/cast/audio_receiver/audio_receiver_unittest.cc ('k') | media/cast/cast_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_config.h
diff --git a/media/cast/cast_config.h b/media/cast/cast_config.h
index 7172f6835cdbd514ce61d5e34682eed3eb903519..ea25d6b6cf74669c4ad24cf7b684db4bd0a6567d 100644
--- a/media/cast/cast_config.h
+++ b/media/cast/cast_config.h
@@ -27,6 +27,8 @@ enum RtcpMode {
kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506.
};
+// TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their
+// naming/documentation consistent with FrameReceiverConfig.
struct AudioSenderConfig {
AudioSenderConfig();
@@ -74,53 +76,68 @@ struct VideoSenderConfig {
int number_of_encode_threads;
};
-struct AudioReceiverConfig {
- AudioReceiverConfig();
+// TODO(miu): Naming and minor type changes are badly needed in a later CL.
+struct FrameReceiverConfig {
+ FrameReceiverConfig();
+ ~FrameReceiverConfig();
- uint32 feedback_ssrc;
- uint32 incoming_ssrc;
+ // The receiver's SSRC identifier.
+ uint32 feedback_ssrc; // TODO(miu): Rename to receiver_ssrc for clarity.
- int rtcp_interval;
- std::string rtcp_c_name;
- RtcpMode rtcp_mode;
-
- // The time the receiver is prepared to wait for retransmissions.
- int rtp_max_delay_ms;
- int rtp_payload_type;
-
- bool use_external_decoder;
- int frequency;
- int channels;
- transport::AudioCodec codec;
-
- std::string aes_key; // Binary string of size kAesKeySize.
- std::string aes_iv_mask; // Binary string of size kAesKeySize.
-};
-
-struct VideoReceiverConfig {
- VideoReceiverConfig();
-
- uint32 feedback_ssrc;
- uint32 incoming_ssrc;
+ // The sender's SSRC identifier.
+ uint32 incoming_ssrc; // TODO(miu): Rename to sender_ssrc for clarity.
+ // Mean interval (in milliseconds) between RTCP reports.
+ // TODO(miu): Remove this since it's never not kDefaultRtcpIntervalMs.
int rtcp_interval;
+
+ // CNAME representing this receiver.
+ // TODO(miu): Remove this since it should be derived elsewhere (probably in
+ // the transport layer).
std::string rtcp_c_name;
+
+ // Determines amount of detail in RTCP reports.
+ // TODO(miu): Remove this since it's never anything but kRtcpReducedSize.
RtcpMode rtcp_mode;
- // The time the receiver is prepared to wait for retransmissions.
- int rtp_max_delay_ms;
+ // The total amount of time between a frame's capture/recording on the sender
+ // and its playback on the receiver (i.e., shown to a user). This is fixed as
+ // a value large enough to give the system sufficient time to encode,
+ // transmit/retransmit, receive, decode, and render; given its run-time
+ // environment (sender/receiver hardware performance, network conditions,
+ // etc.).
+ int rtp_max_delay_ms; // TODO(miu): Change to TimeDelta target_playout_delay.
+
+ // RTP payload type enum: Specifies the type/encoding of frame data.
int rtp_payload_type;
- bool use_external_decoder;
- int max_frame_rate;
+ // RTP timebase: The number of RTP units advanced per one second. For audio,
+ // this is the sampling rate. For video, by convention, this is 90 kHz.
+ int frequency; // TODO(miu): Rename to rtp_timebase for clarity.
- // Some HW decoders can not run faster than the frame rate, preventing it
- // from catching up after a glitch.
- bool decoder_faster_than_max_frame_rate;
- transport::VideoCodec codec;
+ // Number of channels. For audio, this is normally 2. For video, this must
+ // be 1 as Cast does not have support for stereoscopic video.
+ int channels;
- std::string aes_key; // Binary string of size kAesKeySize.
- std::string aes_iv_mask; // Binary string of size kAesKeySize.
+ // The target frame rate. For audio, this is normally 100 (i.e., frames have
+ // a duration of 10ms each). For video, this is normally 30, but any frame
+ // rate is supported.
+ int max_frame_rate; // TODO(miu): Rename to target_frame_rate.
+
+ // Codec used for the compression of signal data.
+ // TODO(miu): Merge the AudioCodec and VideoCodec enums into one so this union
+ // is not necessary.
+ union MergedCodecPlaceholder {
+ transport::AudioCodec audio;
+ transport::VideoCodec video;
+ MergedCodecPlaceholder() : audio(transport::kUnknownAudioCodec) {}
+ } codec;
+
+ // The AES crypto key and initialization vector. Each of these strings
+ // contains the data in binary form, of size kAesKeySize. If they are empty
+ // strings, crypto is not being used.
+ std::string aes_key;
+ std::string aes_iv_mask;
};
// import from media::cast::transport
« no previous file with comments | « media/cast/audio_receiver/audio_receiver_unittest.cc ('k') | media/cast/cast_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698