| Index: media/cast/cast_sender_impl.h
|
| diff --git a/media/cast/cast_sender_impl.h b/media/cast/cast_sender_impl.h
|
| index bfb4041ec942391c552190eebeb5d67c44183ce5..85b8669192a917204ae19a0492913bccae85dc95 100644
|
| --- a/media/cast/cast_sender_impl.h
|
| +++ b/media/cast/cast_sender_impl.h
|
| @@ -8,49 +8,53 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "media/cast/audio_sender/audio_sender.h"
|
| #include "media/cast/cast_config.h"
|
| +#include "media/cast/cast_defines.h"
|
| #include "media/cast/cast_environment.h"
|
| #include "media/cast/cast_sender.h"
|
| #include "media/cast/video_sender/video_sender.h"
|
|
|
| namespace media {
|
| class VideoFrame;
|
| -}
|
|
|
| -namespace media {
|
| namespace cast {
|
| -
|
| class AudioSender;
|
| class VideoSender;
|
|
|
| -// This calls is a pure owner class that group all required sending objects
|
| -// together such as pacer, packet receiver, frame input, audio and video sender.
|
| +// This class combines all required sending objects such as the audio and video
|
| +// senders, pacer, packet receiver and frame input.
|
| class CastSenderImpl : public CastSender {
|
| public:
|
| - CastSenderImpl(
|
| - scoped_refptr<CastEnvironment> cast_environment,
|
| - const AudioSenderConfig* audio_config,
|
| - const VideoSenderConfig* video_config,
|
| - const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories,
|
| - const CastInitializationCallback& initialization_status,
|
| - transport::CastTransportSender* const transport_sender);
|
| + CastSenderImpl(scoped_refptr<CastEnvironment> cast_environment,
|
| + transport::CastTransportSender* const transport_sender);
|
| +
|
| + virtual void InitializeAudio(
|
| + const AudioSenderConfig& audio_config,
|
| + const CastInitializationCallback& cast_initialization_cb) OVERRIDE;
|
| + virtual void InitializeVideo(
|
| + const VideoSenderConfig& video_config,
|
| + const CastInitializationCallback& cast_initialization_cb,
|
| + const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories)
|
| + OVERRIDE;
|
|
|
| virtual ~CastSenderImpl();
|
|
|
| - virtual scoped_refptr<FrameInput> frame_input() OVERRIDE;
|
| + virtual scoped_refptr<AudioFrameInput> audio_frame_input() OVERRIDE;
|
| + virtual scoped_refptr<VideoFrameInput> video_frame_input() OVERRIDE;
|
| +
|
| virtual transport::PacketReceiverCallback packet_receiver() OVERRIDE;
|
|
|
| private:
|
| void ReceivedPacket(scoped_ptr<Packet> packet);
|
| - // Used to trampoline the result back on the correct thread. And guaranteed
|
| - // not to be called until the creation is complete.
|
| - void InitializationResult(CastInitializationStatus status) const;
|
|
|
| CastInitializationCallback initialization_callback_;
|
| scoped_ptr<AudioSender> audio_sender_;
|
| scoped_ptr<VideoSender> video_sender_;
|
| - scoped_refptr<FrameInput> frame_input_;
|
| - transport::PacketReceiverCallback packet_receiver_;
|
| + scoped_refptr<AudioFrameInput> audio_frame_input_;
|
| + scoped_refptr<VideoFrameInput> video_frame_input_;
|
| scoped_refptr<CastEnvironment> cast_environment_;
|
| + // The transport sender is owned by the owner of the CastSender, and should be
|
| + // valid throughout the lifetime of the CastSender.
|
| + transport::CastTransportSender* const transport_sender_;
|
| uint32 ssrc_of_audio_sender_;
|
| uint32 ssrc_of_video_sender_;
|
| base::WeakPtrFactory<CastSenderImpl> weak_factory_;
|
|
|