Index: media/cast/cast_sender.h |
diff --git a/media/cast/cast_sender.h b/media/cast/cast_sender.h |
index a15e6d31ee3d090dc21e2eda1d54e337ee14fc01..4aa58c1bd6b16cfb6dd83f08d4d63c654a3cbd26 100644 |
--- a/media/cast/cast_sender.h |
+++ b/media/cast/cast_sender.h |
@@ -23,13 +23,13 @@ |
namespace media { |
class AudioBus; |
+class GpuVideoAcceleratorFactories; |
class VideoFrame; |
-} |
-namespace media { |
namespace cast { |
+class AudioSender; |
+class VideoSender; |
-// This Class is thread safe. |
class FrameInput : public base::RefCountedThreadSafe<FrameInput> { |
public: |
// The video_frame must be valid until the callback is called. |
@@ -48,6 +48,16 @@ class FrameInput : public base::RefCountedThreadSafe<FrameInput> { |
const base::TimeTicks& recorded_time, |
const base::Closure& done_callback) = 0; |
+ // Set the audio sender on which audio frames will be inserted to Cast. Must |
+ // be called on the main thread. |
+ // This function MUST be called before raw frames are inserted. |
+ virtual void SetAudioSender(base::WeakPtr<AudioSender> audio_sender) = 0; |
+ |
+ // Set the video sender on which video frames will be inserted to Cast. Must |
+ // be called on the main thread. |
+ // This function must be called before raw frames are inserted. |
+ virtual void SetVideoSender(base::WeakPtr<VideoSender> video_sender) = 0; |
+ |
protected: |
virtual ~FrameInput() {} |
@@ -58,15 +68,11 @@ class FrameInput : public base::RefCountedThreadSafe<FrameInput> { |
// This Class is thread safe. |
// The provided CastTransportSender object will always be called from the main |
// cast thread. |
-// At least one of AudioSenderConfig and VideoSenderConfig have to be provided. |
class CastSender { |
public: |
- static CastSender* CreateCastSender( |
+ static CastSender* Create( |
Ami GONE FROM CHROMIUM
2014/02/14 18:23:54
I think you missed this comment:
This doesn't doc
mikhal1
2014/02/18 19:20:43
Done, and matched receiver and transport.
On 2014/
|
scoped_refptr<CastEnvironment> cast_environment, |
- const AudioSenderConfig* audio_config, |
- const VideoSenderConfig* video_config, |
- const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, |
- const CastInitializationCallback& cast_initialization, |
+ const CastInitializationCallback& cast_initialization_cb, |
transport::CastTransportSender* const transport_sender); |
virtual ~CastSender() {} |
@@ -79,6 +85,16 @@ class CastSender { |
// All RTCP packets for the session should be inserted to this object. |
// Can be called from any thread. |
virtual transport::PacketReceiverCallback packet_receiver() = 0; |
+ |
+ // Initialize the audio stack. Must be called in order to send audio frames. |
+ // This function MUST be called before raw frames are inserted. |
+ virtual void InitializeAudio(const AudioSenderConfig& audio_config) = 0; |
+ |
+ // Initialize the video stack. Must be called in order to send video frames. |
+ // This function must be called before raw frames are inserted. |
+ virtual void InitializeVideo( |
+ const VideoSenderConfig& video_config, |
+ const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories) = 0; |
}; |
} // namespace cast |