Roll Clang 206824:209387
[chromium-blink-merge.git] / media / cast / cast_receiver_impl.h
blob1fcb355f52ba30cc892e8d793458c9261518cd51
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_RECEIVER_IMPL_H_
6 #define MEDIA_CAST_CAST_RECEIVER_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/cast/audio_receiver/audio_receiver.h"
11 #include "media/cast/cast_config.h"
12 #include "media/cast/cast_environment.h"
13 #include "media/cast/cast_receiver.h"
14 #include "media/cast/transport/pacing/paced_sender.h"
15 #include "media/cast/video_receiver/video_receiver.h"
17 namespace media {
18 namespace cast {
19 // This calls is a pure owner class that group all required receive objects
20 // together such as pacer, packet receiver, frame receiver, audio and video
21 // receivers.
22 class CastReceiverImpl : public CastReceiver {
23 public:
24 CastReceiverImpl(scoped_refptr<CastEnvironment> cast_environment,
25 const AudioReceiverConfig& audio_config,
26 const VideoReceiverConfig& video_config,
27 transport::PacketSender* const packet_sender);
29 virtual ~CastReceiverImpl();
31 // All received RTP and RTCP packets for the call should be sent to this
32 // PacketReceiver;
33 virtual transport::PacketReceiverCallback packet_receiver() OVERRIDE;
35 // Interface to get audio and video frames from the CastReceiver.
36 virtual scoped_refptr<FrameReceiver> frame_receiver() OVERRIDE;
38 private:
39 void ReceivedPacket(scoped_ptr<Packet> packet);
41 transport::PacedSender pacer_;
42 AudioReceiver audio_receiver_;
43 VideoReceiver video_receiver_;
44 scoped_refptr<FrameReceiver> frame_receiver_;
45 scoped_refptr<CastEnvironment> cast_environment_;
46 const uint32 ssrc_of_audio_sender_;
47 const uint32 ssrc_of_video_sender_;
49 DISALLOW_COPY_AND_ASSIGN(CastReceiverImpl);
52 } // namespace cast
53 } // namespace media
55 #endif // MEDIA_CAST_CAST_RECEIVER_IMPL_