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

Side by Side Diff: media/cast/cast_config.h

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/shared_memory.h" 15 #include "base/memory/shared_memory.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "media/cast/cast_defines.h" 18 #include "media/cast/cast_defines.h"
19 #include "media/cast/transport/cast_transport_config.h" 19 #include "media/cast/net/cast_transport_config.h"
20 20
21 namespace media { 21 namespace media {
22 class VideoEncodeAccelerator; 22 class VideoEncodeAccelerator;
23 23
24 namespace cast { 24 namespace cast {
25 25
26 enum RtcpMode {
27 kRtcpCompound, // Compound RTCP mode is described by RFC 4585.
28 kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506.
29 };
30
31 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their 26 // TODO(miu): Merge AudioSenderConfig and VideoSenderConfig and make their
32 // naming/documentation consistent with FrameReceiverConfig. 27 // naming/documentation consistent with FrameReceiverConfig.
33 struct AudioSenderConfig { 28 struct AudioSenderConfig {
34 AudioSenderConfig(); 29 AudioSenderConfig();
35 ~AudioSenderConfig(); 30 ~AudioSenderConfig();
36 31
37 // Identifier referring to the sender, used by the receiver. 32 // Identifier referring to the sender, used by the receiver.
38 uint32 ssrc; 33 uint32 ssrc;
39 34
40 // The receiver's SSRC identifier. 35 // The receiver's SSRC identifier.
(...skipping 11 matching lines...) Expand all
52 // etc.). 47 // etc.).
53 base::TimeDelta target_playout_delay; 48 base::TimeDelta target_playout_delay;
54 49
55 // RTP payload type enum: Specifies the type/encoding of frame data. 50 // RTP payload type enum: Specifies the type/encoding of frame data.
56 int rtp_payload_type; 51 int rtp_payload_type;
57 52
58 bool use_external_encoder; 53 bool use_external_encoder;
59 int frequency; 54 int frequency;
60 int channels; 55 int channels;
61 int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best). 56 int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best).
62 transport::Codec codec; 57 Codec codec;
63 58
64 // The AES crypto key and initialization vector. Each of these strings 59 // The AES crypto key and initialization vector. Each of these strings
65 // contains the data in binary form, of size kAesKeySize. If they are empty 60 // contains the data in binary form, of size kAesKeySize. If they are empty
66 // strings, crypto is not being used. 61 // strings, crypto is not being used.
67 std::string aes_key; 62 std::string aes_key;
68 std::string aes_iv_mask; 63 std::string aes_iv_mask;
69 }; 64 };
70 65
71 struct VideoSenderConfig { 66 struct VideoSenderConfig {
72 VideoSenderConfig(); 67 VideoSenderConfig();
(...skipping 25 matching lines...) Expand all
98 int height; 93 int height;
99 94
100 float congestion_control_back_off; 95 float congestion_control_back_off;
101 int max_bitrate; 96 int max_bitrate;
102 int min_bitrate; 97 int min_bitrate;
103 int start_bitrate; 98 int start_bitrate;
104 int max_qp; 99 int max_qp;
105 int min_qp; 100 int min_qp;
106 int max_frame_rate; 101 int max_frame_rate;
107 int max_number_of_video_buffers_used; // Max value depend on codec. 102 int max_number_of_video_buffers_used; // Max value depend on codec.
108 transport::Codec codec; 103 Codec codec;
109 int number_of_encode_threads; 104 int number_of_encode_threads;
110 105
111 // The AES crypto key and initialization vector. Each of these strings 106 // The AES crypto key and initialization vector. Each of these strings
112 // contains the data in binary form, of size kAesKeySize. If they are empty 107 // contains the data in binary form, of size kAesKeySize. If they are empty
113 // strings, crypto is not being used. 108 // strings, crypto is not being used.
114 std::string aes_key; 109 std::string aes_key;
115 std::string aes_iv_mask; 110 std::string aes_iv_mask;
116 }; 111 };
117 112
118 // TODO(miu): Naming and minor type changes are badly needed in a later CL. 113 // TODO(miu): Naming and minor type changes are badly needed in a later CL.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 int channels; 154 int channels;
160 155
161 // The target frame rate. For audio, this is normally 100 (i.e., frames have 156 // The target frame rate. For audio, this is normally 100 (i.e., frames have
162 // a duration of 10ms each). For video, this is normally 30, but any frame 157 // a duration of 10ms each). For video, this is normally 30, but any frame
163 // rate is supported. 158 // rate is supported.
164 int max_frame_rate; // TODO(miu): Rename to target_frame_rate. 159 int max_frame_rate; // TODO(miu): Rename to target_frame_rate.
165 160
166 // Codec used for the compression of signal data. 161 // Codec used for the compression of signal data.
167 // TODO(miu): Merge the AudioCodec and VideoCodec enums into one so this union 162 // TODO(miu): Merge the AudioCodec and VideoCodec enums into one so this union
168 // is not necessary. 163 // is not necessary.
169 transport::Codec codec; 164 Codec codec;
170 165
171 // The AES crypto key and initialization vector. Each of these strings 166 // The AES crypto key and initialization vector. Each of these strings
172 // contains the data in binary form, of size kAesKeySize. If they are empty 167 // contains the data in binary form, of size kAesKeySize. If they are empty
173 // strings, crypto is not being used. 168 // strings, crypto is not being used.
174 std::string aes_key; 169 std::string aes_key;
175 std::string aes_iv_mask; 170 std::string aes_iv_mask;
176 }; 171 };
177 172
178 // import from media::cast::transport 173 // Import from media::cast.
179 typedef transport::Packet Packet; 174
180 typedef transport::PacketList PacketList; 175 typedef Packet Packet;
176 typedef PacketList PacketList;
181 177
182 typedef base::Callback<void(CastInitializationStatus)> 178 typedef base::Callback<void(CastInitializationStatus)>
183 CastInitializationCallback; 179 CastInitializationCallback;
184 180
185 typedef base::Callback<void(scoped_refptr<base::SingleThreadTaskRunner>, 181 typedef base::Callback<void(scoped_refptr<base::SingleThreadTaskRunner>,
186 scoped_ptr<media::VideoEncodeAccelerator>)> 182 scoped_ptr<media::VideoEncodeAccelerator>)>
187 ReceiveVideoEncodeAcceleratorCallback; 183 ReceiveVideoEncodeAcceleratorCallback;
188 typedef base::Callback<void(const ReceiveVideoEncodeAcceleratorCallback&)> 184 typedef base::Callback<void(const ReceiveVideoEncodeAcceleratorCallback&)>
189 CreateVideoEncodeAcceleratorCallback; 185 CreateVideoEncodeAcceleratorCallback;
190 186
191 typedef base::Callback<void(scoped_ptr<base::SharedMemory>)> 187 typedef base::Callback<void(scoped_ptr<base::SharedMemory>)>
192 ReceiveVideoEncodeMemoryCallback; 188 ReceiveVideoEncodeMemoryCallback;
193 typedef base::Callback<void(size_t size, 189 typedef base::Callback<void(size_t size,
194 const ReceiveVideoEncodeMemoryCallback&)> 190 const ReceiveVideoEncodeMemoryCallback&)>
195 CreateVideoEncodeMemoryCallback; 191 CreateVideoEncodeMemoryCallback;
196 192
197 } // namespace cast 193 } // namespace cast
198 } // namespace media 194 } // namespace media
199 195
200 #endif // MEDIA_CAST_CAST_CONFIG_H_ 196 #endif // MEDIA_CAST_CAST_CONFIG_H_
OLDNEW
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698