| Index: trunk/src/media/cast/cast_config.h
|
| ===================================================================
|
| --- trunk/src/media/cast/cast_config.h (revision 243647)
|
| +++ trunk/src/media/cast/cast_config.h (working copy)
|
| @@ -13,7 +13,6 @@
|
| #include "base/callback.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "media/cast/cast_defines.h"
|
| -#include "media/cast/transport/cast_transport_config.h"
|
|
|
| namespace media {
|
| namespace cast {
|
| @@ -23,6 +22,17 @@
|
| kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506.
|
| };
|
|
|
| +enum VideoCodec {
|
| + kVp8,
|
| + kH264,
|
| +};
|
| +
|
| +enum AudioCodec {
|
| + kOpus,
|
| + kPcm16,
|
| + kExternalAudio,
|
| +};
|
| +
|
| struct AudioSenderConfig {
|
| AudioSenderConfig();
|
|
|
| @@ -41,7 +51,7 @@
|
| int frequency;
|
| int channels;
|
| int bitrate; // Set to <= 0 for "auto variable bitrate" (libopus knows best).
|
| - transport::AudioCodec codec;
|
| + AudioCodec codec;
|
|
|
| std::string aes_key; // Binary string of size kAesKeySize.
|
| std::string aes_iv_mask; // Binary string of size kAesKeySize.
|
| @@ -73,7 +83,7 @@
|
| int min_qp;
|
| int max_frame_rate;
|
| int max_number_of_video_buffers_used; // Max value depend on codec.
|
| - transport::VideoCodec codec;
|
| + VideoCodec codec;
|
| int number_of_cores;
|
|
|
| std::string aes_key; // Binary string of size kAesKeySize.
|
| @@ -97,7 +107,7 @@
|
| bool use_external_decoder;
|
| int frequency;
|
| int channels;
|
| - transport::AudioCodec codec;
|
| + AudioCodec codec;
|
|
|
| std::string aes_key; // Binary string of size kAesKeySize.
|
| std::string aes_iv_mask; // Binary string of size kAesKeySize.
|
| @@ -123,12 +133,23 @@
|
| // 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;
|
| + VideoCodec codec;
|
|
|
| std::string aes_key; // Binary string of size kAesKeySize.
|
| std::string aes_iv_mask; // Binary string of size kAesKeySize.
|
| };
|
|
|
| +struct EncodedVideoFrame {
|
| + EncodedVideoFrame();
|
| + ~EncodedVideoFrame();
|
| +
|
| + VideoCodec codec;
|
| + bool key_frame;
|
| + uint32 frame_id;
|
| + uint32 last_referenced_frame_id;
|
| + std::string data;
|
| +};
|
| +
|
| // DEPRECATED: Do not use in new code. Please migrate existing code to use
|
| // media::AudioBus.
|
| struct PcmAudioFrame {
|
| @@ -140,6 +161,19 @@
|
| std::vector<int16> samples;
|
| };
|
|
|
| +struct EncodedAudioFrame {
|
| + EncodedAudioFrame();
|
| + ~EncodedAudioFrame();
|
| +
|
| + AudioCodec codec;
|
| + uint32 frame_id; // Needed to release the frame.
|
| + int samples; // Needed send side to advance the RTP timestamp.
|
| + // Not used receive side.
|
| + // Support for max sampling rate of 48KHz, 2 channels, 100 ms duration.
|
| + static const int kMaxNumberOfSamples = 48 * 2 * 100;
|
| + std::string data;
|
| +};
|
| +
|
| typedef std::vector<uint8> Packet;
|
| typedef std::vector<Packet> PacketList;
|
|
|
|
|