| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/callback.h" | 10 #include "base/callback.h" |
| 12 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 14 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 16 #include "media/cast/net/cast_transport_config.h" | 15 #include "media/cast/net/cast_transport_config.h" |
| 17 | 16 |
| 18 namespace media { | 17 namespace media { |
| 19 class VideoEncodeAccelerator; | 18 class VideoEncodeAccelerator; |
| 20 | 19 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their | 54 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their |
| 56 // naming/documentation consistent with FrameReceiverConfig. | 55 // naming/documentation consistent with FrameReceiverConfig. |
| 57 // http://crbug.com/530839 | 56 // http://crbug.com/530839 |
| 58 struct AudioSenderConfig { | 57 struct AudioSenderConfig { |
| 59 AudioSenderConfig(); | 58 AudioSenderConfig(); |
| 60 ~AudioSenderConfig(); | 59 ~AudioSenderConfig(); |
| 61 | 60 |
| 62 // Identifier referring to the sender, used by the receiver. | 61 // Identifier referring to the sender, used by the receiver. |
| 63 uint32 ssrc; | 62 uint32_t ssrc; |
| 64 | 63 |
| 65 // The receiver's SSRC identifier. | 64 // The receiver's SSRC identifier. |
| 66 uint32 receiver_ssrc; | 65 uint32_t receiver_ssrc; |
| 67 | 66 |
| 68 // The total amount of time between a frame's capture/recording on the sender | 67 // The total amount of time between a frame's capture/recording on the sender |
| 69 // and its playback on the receiver (i.e., shown to a user). This should be | 68 // and its playback on the receiver (i.e., shown to a user). This should be |
| 70 // set to a value large enough to give the system sufficient time to encode, | 69 // set to a value large enough to give the system sufficient time to encode, |
| 71 // transmit/retransmit, receive, decode, and render; given its run-time | 70 // transmit/retransmit, receive, decode, and render; given its run-time |
| 72 // environment (sender/receiver hardware performance, network conditions, | 71 // environment (sender/receiver hardware performance, network conditions, |
| 73 // etc.). | 72 // etc.). |
| 74 base::TimeDelta min_playout_delay; | 73 base::TimeDelta min_playout_delay; |
| 75 base::TimeDelta max_playout_delay; | 74 base::TimeDelta max_playout_delay; |
| 76 | 75 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 91 // strings, crypto is not being used. | 90 // strings, crypto is not being used. |
| 92 std::string aes_key; | 91 std::string aes_key; |
| 93 std::string aes_iv_mask; | 92 std::string aes_iv_mask; |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 struct VideoSenderConfig { | 95 struct VideoSenderConfig { |
| 97 VideoSenderConfig(); | 96 VideoSenderConfig(); |
| 98 ~VideoSenderConfig(); | 97 ~VideoSenderConfig(); |
| 99 | 98 |
| 100 // Identifier referring to the sender, used by the receiver. | 99 // Identifier referring to the sender, used by the receiver. |
| 101 uint32 ssrc; | 100 uint32_t ssrc; |
| 102 | 101 |
| 103 // The receiver's SSRC identifier. | 102 // The receiver's SSRC identifier. |
| 104 uint32 receiver_ssrc; | 103 uint32_t receiver_ssrc; |
| 105 | 104 |
| 106 // The total amount of time between a frame's capture/recording on the sender | 105 // The total amount of time between a frame's capture/recording on the sender |
| 107 // and its playback on the receiver (i.e., shown to a user). This should be | 106 // and its playback on the receiver (i.e., shown to a user). This should be |
| 108 // set to a value large enough to give the system sufficient time to encode, | 107 // set to a value large enough to give the system sufficient time to encode, |
| 109 // transmit/retransmit, receive, decode, and render; given its run-time | 108 // transmit/retransmit, receive, decode, and render; given its run-time |
| 110 // environment (sender/receiver hardware performance, network conditions, | 109 // environment (sender/receiver hardware performance, network conditions, |
| 111 // etc.). | 110 // etc.). |
| 112 base::TimeDelta min_playout_delay; | 111 base::TimeDelta min_playout_delay; |
| 113 base::TimeDelta max_playout_delay; | 112 base::TimeDelta max_playout_delay; |
| 114 | 113 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 std::string aes_key; | 146 std::string aes_key; |
| 148 std::string aes_iv_mask; | 147 std::string aes_iv_mask; |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 // TODO(miu): Naming and minor type changes are badly needed in a later CL. | 150 // TODO(miu): Naming and minor type changes are badly needed in a later CL. |
| 152 struct FrameReceiverConfig { | 151 struct FrameReceiverConfig { |
| 153 FrameReceiverConfig(); | 152 FrameReceiverConfig(); |
| 154 ~FrameReceiverConfig(); | 153 ~FrameReceiverConfig(); |
| 155 | 154 |
| 156 // The receiver's SSRC identifier. | 155 // The receiver's SSRC identifier. |
| 157 uint32 receiver_ssrc; | 156 uint32_t receiver_ssrc; |
| 158 | 157 |
| 159 // The sender's SSRC identifier. | 158 // The sender's SSRC identifier. |
| 160 uint32 sender_ssrc; | 159 uint32_t sender_ssrc; |
| 161 | 160 |
| 162 // The total amount of time between a frame's capture/recording on the sender | 161 // The total amount of time between a frame's capture/recording on the sender |
| 163 // and its playback on the receiver (i.e., shown to a user). This is fixed as | 162 // and its playback on the receiver (i.e., shown to a user). This is fixed as |
| 164 // a value large enough to give the system sufficient time to encode, | 163 // a value large enough to give the system sufficient time to encode, |
| 165 // transmit/retransmit, receive, decode, and render; given its run-time | 164 // transmit/retransmit, receive, decode, and render; given its run-time |
| 166 // environment (sender/receiver hardware performance, network conditions, | 165 // environment (sender/receiver hardware performance, network conditions, |
| 167 // etc.). | 166 // etc.). |
| 168 int rtp_max_delay_ms; // TODO(miu): Change to TimeDelta target_playout_delay. | 167 int rtp_max_delay_ms; // TODO(miu): Change to TimeDelta target_playout_delay. |
| 169 | 168 |
| 170 // RTP payload type enum: Specifies the type/encoding of frame data. | 169 // RTP payload type enum: Specifies the type/encoding of frame data. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 typedef base::Callback<void(scoped_ptr<base::SharedMemory>)> | 203 typedef base::Callback<void(scoped_ptr<base::SharedMemory>)> |
| 205 ReceiveVideoEncodeMemoryCallback; | 204 ReceiveVideoEncodeMemoryCallback; |
| 206 typedef base::Callback<void(size_t size, | 205 typedef base::Callback<void(size_t size, |
| 207 const ReceiveVideoEncodeMemoryCallback&)> | 206 const ReceiveVideoEncodeMemoryCallback&)> |
| 208 CreateVideoEncodeMemoryCallback; | 207 CreateVideoEncodeMemoryCallback; |
| 209 | 208 |
| 210 } // namespace cast | 209 } // namespace cast |
| 211 } // namespace media | 210 } // namespace media |
| 212 | 211 |
| 213 #endif // MEDIA_CAST_CAST_CONFIG_H_ | 212 #endif // MEDIA_CAST_CAST_CONFIG_H_ |
| OLD | NEW |