Allow overlapping sync and async startup requests
[chromium-blink-merge.git] / media / cast / cast_sender.h
blobb5a3bcba706ea6837464087cee182f28789e4068
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_SENDER_H_
6 #define MEDIA_CAST_CAST_SENDER_H_
8 #include "base/basictypes.h"
9 #include "base/time/time.h"
10 #include "media/cast/cast_config.h"
12 namespace media {
13 namespace cast {
15 class FrameInput {
16 public:
17 virtual void InsertRawVideoFrame(const I420VideoFrame& video_frame,
18 base::TimeTicks capture_time) = 0;
20 virtual void InsertCodedVideoFrame(const EncodedVideoFrame& video_frame,
21 base::TimeTicks capture_time) = 0;
23 virtual void InsertRawAudioFrame(const PcmAudioFrame& audio_frame,
24 base::TimeTicks recorded_time) = 0;
26 virtual void InsertCodedAudioFrame(const EncodedAudioFrame& audio_frame,
27 base::TimeTicks recorded_time) = 0;
29 protected:
30 virtual ~FrameInput() {}
33 class CastSender {
34 public:
35 static CastSender* CreateCastSender(
36 const AudioSenderConfig& audio_config,
37 const VideoSenderConfig& video_config,
38 VideoEncoderController* const video_encoder_controller,
39 PacketSender* const packet_sender);
41 virtual ~CastSender() {};
43 virtual FrameInput* frame_input() = 0;
45 // All RTCP packets for the call should be inserted to this
46 // PacketReceiver. The PacketReceiver pointer is valid as long as the
47 // CastSender instance exists.
48 virtual PacketReceiver* packet_receiver() = 0;
51 } // namespace cast
52 } // namespace media
54 #endif // MEDIA_CAST_CAST_SENDER_H_