Remove Unused AsTextButtonBorder RTTI helper.
[chromium-blink-merge.git] / media / cast / cast_config.h
blob61e9620491bc7372607d48755fe73438ee4a48f2
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_CAST_CAST_CONFIG_H_
6 #define MEDIA_CAST_CAST_CONFIG_H_
8 #include <list>
9 #include <string>
10 #include <vector>
12 #include "base/basictypes.h"
13 #include "base/callback.h"
14 #include "base/memory/ref_counted.h"
15 #include "media/cast/cast_defines.h"
16 #include "media/cast/transport/cast_transport_config.h"
18 namespace media {
19 namespace cast {
21 enum RtcpMode {
22 kRtcpCompound, // Compound RTCP mode is described by RFC 4585.
23 kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506.
26 struct AudioSenderConfig {
27 AudioSenderConfig();
29 uint32 sender_ssrc;
30 uint32 incoming_feedback_ssrc;
32 int rtcp_interval;
33 std::string rtcp_c_name;
34 RtcpMode rtcp_mode;
36 transport::RtpConfig rtp_config;
38 bool use_external_encoder;
39 int frequency;
40 int channels;
41 int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best).
42 transport::AudioCodec codec;
45 struct VideoSenderConfig {
46 VideoSenderConfig();
48 uint32 sender_ssrc;
49 uint32 incoming_feedback_ssrc;
51 int rtcp_interval;
52 std::string rtcp_c_name;
53 RtcpMode rtcp_mode;
55 transport::RtpConfig rtp_config;
57 bool use_external_encoder;
58 int width; // Incoming frames will be scaled to this size.
59 int height;
61 float congestion_control_back_off;
62 int max_bitrate;
63 int min_bitrate;
64 int start_bitrate;
65 int max_qp;
66 int min_qp;
67 int max_frame_rate;
68 int max_number_of_video_buffers_used; // Max value depend on codec.
69 transport::VideoCodec codec;
70 int number_of_cores;
73 struct AudioReceiverConfig {
74 AudioReceiverConfig();
76 uint32 feedback_ssrc;
77 uint32 incoming_ssrc;
79 int rtcp_interval;
80 std::string rtcp_c_name;
81 RtcpMode rtcp_mode;
83 // The time the receiver is prepared to wait for retransmissions.
84 int rtp_max_delay_ms;
85 int rtp_payload_type;
87 bool use_external_decoder;
88 int frequency;
89 int channels;
90 transport::AudioCodec codec;
92 std::string aes_key; // Binary string of size kAesKeySize.
93 std::string aes_iv_mask; // Binary string of size kAesKeySize.
96 struct VideoReceiverConfig {
97 VideoReceiverConfig();
99 uint32 feedback_ssrc;
100 uint32 incoming_ssrc;
102 int rtcp_interval;
103 std::string rtcp_c_name;
104 RtcpMode rtcp_mode;
106 // The time the receiver is prepared to wait for retransmissions.
107 int rtp_max_delay_ms;
108 int rtp_payload_type;
110 bool use_external_decoder;
111 int max_frame_rate;
113 // Some HW decoders can not run faster than the frame rate, preventing it
114 // from catching up after a glitch.
115 bool decoder_faster_than_max_frame_rate;
116 transport::VideoCodec codec;
118 std::string aes_key; // Binary string of size kAesKeySize.
119 std::string aes_iv_mask; // Binary string of size kAesKeySize.
122 // DEPRECATED: Do not use in new code. Please migrate existing code to use
123 // media::AudioBus.
124 struct PcmAudioFrame {
125 PcmAudioFrame();
126 ~PcmAudioFrame();
128 int channels; // Samples in interleaved stereo format. L0, R0, L1 ,R1 ,...
129 int frequency;
130 std::vector<int16> samples;
133 // import from media::cast::transport
134 typedef transport::Packet Packet;
135 typedef transport::PacketList PacketList;
137 enum CastInitializationStatus {
138 STATUS_INITIALIZED,
139 STATUS_INVALID_CAST_ENVIRONMENT,
140 STATUS_INVALID_CRYPTO_CONFIGURATION,
141 STATUS_UNSUPPORTED_AUDIO_CODEC,
142 STATUS_INVALID_AUDIO_CONFIGURATION,
143 STATUS_INVALID_VIDEO_CONFIGURATION,
144 STATUS_GPU_ACCELERATION_NOT_SUPPORTED,
145 STATUS_GPU_ACCELERATION_ERROR,
148 typedef base::Callback<void(CastInitializationStatus)>
149 CastInitializationCallback;
151 } // namespace cast
152 } // namespace media
154 #endif // MEDIA_CAST_CAST_CONFIG_H_