| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_CAST_CAST_CONFIG_H_ | 5 #ifndef MEDIA_CAST_CAST_CONFIG_H_ |
| 6 #define MEDIA_CAST_CAST_CONFIG_H_ | 6 #define MEDIA_CAST_CAST_CONFIG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 kDefaultMaxFrameRate = 30, | 37 kDefaultMaxFrameRate = 30, |
| 38 | 38 |
| 39 // End-to-end latency in milliseconds. | 39 // End-to-end latency in milliseconds. |
| 40 // | 40 // |
| 41 // DO NOT USE THIS (400 ms is proven as ideal for general-purpose use). | 41 // DO NOT USE THIS (400 ms is proven as ideal for general-purpose use). |
| 42 // | 42 // |
| 43 // TODO(miu): Change to 400, and confirm nothing has broken in later change. | 43 // TODO(miu): Change to 400, and confirm nothing has broken in later change. |
| 44 // http://crbug.com/530839 | 44 // http://crbug.com/530839 |
| 45 kDefaultRtpMaxDelayMs = 100, | 45 kDefaultRtpMaxDelayMs = 100, |
| 46 | 46 |
| 47 // RTP payload types that identify an RTP stream as audio or video. | |
| 48 kDefaultRtpAudioPayloadType = 127, | |
| 49 kDefaultRtpVideoPayloadType = 96, | |
| 50 | |
| 51 // Suggested minimum and maximum video bitrates for general-purpose use (up to | 47 // Suggested minimum and maximum video bitrates for general-purpose use (up to |
| 52 // 1080p, 30 FPS). | 48 // 1080p, 30 FPS). |
| 53 kDefaultMinVideoKbps = 300, | 49 kDefaultMinVideoKbps = 300, |
| 54 kDefaultMaxVideoKbps = 5000, | 50 kDefaultMaxVideoKbps = 5000, |
| 55 }; | 51 }; |
| 56 | 52 |
| 57 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their | 53 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their |
| 58 // naming/documentation consistent with FrameReceiverConfig. | 54 // naming/documentation consistent with FrameReceiverConfig. |
| 59 // http://crbug.com/530839 | 55 // http://crbug.com/530839 |
| 60 struct AudioSenderConfig { | 56 struct AudioSenderConfig { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 74 // transmit/retransmit, receive, decode, and render; given its run-time | 70 // transmit/retransmit, receive, decode, and render; given its run-time |
| 75 // environment (sender/receiver hardware performance, network conditions, | 71 // environment (sender/receiver hardware performance, network conditions, |
| 76 // etc.). | 72 // etc.). |
| 77 base::TimeDelta min_playout_delay; | 73 base::TimeDelta min_playout_delay; |
| 78 base::TimeDelta max_playout_delay; | 74 base::TimeDelta max_playout_delay; |
| 79 | 75 |
| 80 // Starting playout delay when streaming animated content. | 76 // Starting playout delay when streaming animated content. |
| 81 base::TimeDelta animated_playout_delay; | 77 base::TimeDelta animated_playout_delay; |
| 82 | 78 |
| 83 // RTP payload type enum: Specifies the type/encoding of frame data. | 79 // RTP payload type enum: Specifies the type/encoding of frame data. |
| 84 int rtp_payload_type; | 80 RtpPayloadType rtp_payload_type; |
| 85 | 81 |
| 86 bool use_external_encoder; | 82 bool use_external_encoder; |
| 87 int frequency; | 83 int frequency; |
| 88 int channels; | 84 int channels; |
| 89 int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best). | 85 int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best). |
| 90 Codec codec; | 86 Codec codec; |
| 91 | 87 |
| 92 // The AES crypto key and initialization vector. Each of these strings | 88 // The AES crypto key and initialization vector. Each of these strings |
| 93 // contains the data in binary form, of size kAesKeySize. If they are empty | 89 // contains the data in binary form, of size kAesKeySize. If they are empty |
| 94 // strings, crypto is not being used. | 90 // strings, crypto is not being used. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 113 // transmit/retransmit, receive, decode, and render; given its run-time | 109 // transmit/retransmit, receive, decode, and render; given its run-time |
| 114 // environment (sender/receiver hardware performance, network conditions, | 110 // environment (sender/receiver hardware performance, network conditions, |
| 115 // etc.). | 111 // etc.). |
| 116 base::TimeDelta min_playout_delay; | 112 base::TimeDelta min_playout_delay; |
| 117 base::TimeDelta max_playout_delay; | 113 base::TimeDelta max_playout_delay; |
| 118 | 114 |
| 119 // Starting playout delay when streaming animated content. | 115 // Starting playout delay when streaming animated content. |
| 120 base::TimeDelta animated_playout_delay; | 116 base::TimeDelta animated_playout_delay; |
| 121 | 117 |
| 122 // RTP payload type enum: Specifies the type/encoding of frame data. | 118 // RTP payload type enum: Specifies the type/encoding of frame data. |
| 123 int rtp_payload_type; | 119 RtpPayloadType rtp_payload_type; |
| 124 | 120 |
| 125 bool use_external_encoder; | 121 bool use_external_encoder; |
| 126 | 122 |
| 127 float congestion_control_back_off; | 123 float congestion_control_back_off; |
| 128 int max_bitrate; | 124 int max_bitrate; |
| 129 int min_bitrate; | 125 int min_bitrate; |
| 130 int start_bitrate; | 126 int start_bitrate; |
| 131 int max_qp; | 127 int max_qp; |
| 132 int min_qp; | 128 int min_qp; |
| 133 | 129 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 172 |
| 177 // The total amount of time between a frame's capture/recording on the sender | 173 // The total amount of time between a frame's capture/recording on the sender |
| 178 // and its playback on the receiver (i.e., shown to a user). This is fixed as | 174 // and its playback on the receiver (i.e., shown to a user). This is fixed as |
| 179 // a value large enough to give the system sufficient time to encode, | 175 // a value large enough to give the system sufficient time to encode, |
| 180 // transmit/retransmit, receive, decode, and render; given its run-time | 176 // transmit/retransmit, receive, decode, and render; given its run-time |
| 181 // environment (sender/receiver hardware performance, network conditions, | 177 // environment (sender/receiver hardware performance, network conditions, |
| 182 // etc.). | 178 // etc.). |
| 183 int rtp_max_delay_ms; // TODO(miu): Change to TimeDelta target_playout_delay. | 179 int rtp_max_delay_ms; // TODO(miu): Change to TimeDelta target_playout_delay. |
| 184 | 180 |
| 185 // RTP payload type enum: Specifies the type/encoding of frame data. | 181 // RTP payload type enum: Specifies the type/encoding of frame data. |
| 186 int rtp_payload_type; | 182 RtpPayloadType rtp_payload_type; |
| 187 | 183 |
| 188 // RTP timebase: The number of RTP units advanced per one second. For audio, | 184 // RTP timebase: The number of RTP units advanced per one second. For audio, |
| 189 // this is the sampling rate. For video, by convention, this is 90 kHz. | 185 // this is the sampling rate. For video, by convention, this is 90 kHz. |
| 190 int rtp_timebase; | 186 int rtp_timebase; |
| 191 | 187 |
| 192 // Number of channels. For audio, this is normally 2. For video, this must | 188 // Number of channels. For audio, this is normally 2. For video, this must |
| 193 // be 1 as Cast does not have support for stereoscopic video. | 189 // be 1 as Cast does not have support for stereoscopic video. |
| 194 int channels; | 190 int channels; |
| 195 | 191 |
| 196 // The target frame rate. For audio, this is normally 100 (i.e., frames have | 192 // The target frame rate. For audio, this is normally 100 (i.e., frames have |
| (...skipping 22 matching lines...) Expand all Loading... |
| 219 typedef base::Callback<void(std::unique_ptr<base::SharedMemory>)> | 215 typedef base::Callback<void(std::unique_ptr<base::SharedMemory>)> |
| 220 ReceiveVideoEncodeMemoryCallback; | 216 ReceiveVideoEncodeMemoryCallback; |
| 221 typedef base::Callback<void(size_t size, | 217 typedef base::Callback<void(size_t size, |
| 222 const ReceiveVideoEncodeMemoryCallback&)> | 218 const ReceiveVideoEncodeMemoryCallback&)> |
| 223 CreateVideoEncodeMemoryCallback; | 219 CreateVideoEncodeMemoryCallback; |
| 224 | 220 |
| 225 } // namespace cast | 221 } // namespace cast |
| 226 } // namespace media | 222 } // namespace media |
| 227 | 223 |
| 228 #endif // MEDIA_CAST_CAST_CONFIG_H_ | 224 #endif // MEDIA_CAST_CAST_CONFIG_H_ |
| OLD | NEW |