#ifndef MEDIA_CAST_CAST_CONFIG_H_
#define MEDIA_CAST_CAST_CONFIG_H_
#include <list>
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "base/single_thread_task_runner.h"
#include "media/cast/cast_defines.h"
#include "media/cast/transport/cast_transport_config.h"
namespace media {
class VideoEncodeAccelerator;
namespace cast {
enum RtcpMode {
kRtcpCompound,
kRtcpReducedSize,
};
struct AudioSenderConfig {
AudioSenderConfig();
uint32 sender_ssrc;
uint32 incoming_feedback_ssrc;
int rtcp_interval;
std::string rtcp_c_name;
RtcpMode rtcp_mode;
transport::RtpConfig rtp_config;
bool use_external_encoder;
int frequency;
int channels;
int bitrate;
transport::AudioCodec codec;
};
struct VideoSenderConfig {
VideoSenderConfig();
uint32 sender_ssrc;
uint32 incoming_feedback_ssrc;
int rtcp_interval;
std::string rtcp_c_name;
RtcpMode rtcp_mode;
transport::RtpConfig rtp_config;
bool use_external_encoder;
int width;
int height;
float congestion_control_back_off;
int max_bitrate;
int min_bitrate;
int start_bitrate;
int max_qp;
int min_qp;
int max_frame_rate;
int max_number_of_video_buffers_used;
transport::VideoCodec codec;
int number_of_cores;
};
struct AudioReceiverConfig {
AudioReceiverConfig();
uint32 feedback_ssrc;
uint32 incoming_ssrc;
int rtcp_interval;
std::string rtcp_c_name;
RtcpMode rtcp_mode;
int rtp_max_delay_ms;
int rtp_payload_type;
bool use_external_decoder;
int frequency;
int channels;
transport::AudioCodec codec;
std::string aes_key;
std::string aes_iv_mask;
};
struct VideoReceiverConfig {
VideoReceiverConfig();
uint32 feedback_ssrc;
uint32 incoming_ssrc;
int rtcp_interval;
std::string rtcp_c_name;
RtcpMode rtcp_mode;
int rtp_max_delay_ms;
int rtp_payload_type;
bool use_external_decoder;
int max_frame_rate;
bool decoder_faster_than_max_frame_rate;
transport::VideoCodec codec;
std::string aes_key;
std::string aes_iv_mask;
};
struct PcmAudioFrame {
PcmAudioFrame();
~PcmAudioFrame();
int channels;
int frequency;
std::vector<int16> samples;
};
typedef transport::Packet Packet;
typedef transport::PacketList PacketList;
typedef base::Callback<void(CastInitializationStatus)>
CastInitializationCallback;
typedef base::Callback<void(scoped_refptr<base::SingleThreadTaskRunner>,
scoped_ptr<media::VideoEncodeAccelerator>)>
ReceiveVideoEncodeAcceleratorCallback;
typedef base::Callback<void(const ReceiveVideoEncodeAcceleratorCallback&)>
CreateVideoEncodeAcceleratorCallback;
typedef base::Callback<void(scoped_ptr<base::SharedMemory>)>
ReceiveVideoEncodeMemoryCallback;
typedef base::Callback<void(size_t size,
const ReceiveVideoEncodeMemoryCallback&)>
CreateVideoEncodeMemoryCallback;
}
}
#endif