OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef MEDIA_CAST_CAST_SENDER_IMPL_H_ | 4 #ifndef MEDIA_CAST_CAST_SENDER_IMPL_H_ |
5 #define MEDIA_CAST_CAST_SENDER_IMPL_H_ | 5 #define MEDIA_CAST_CAST_SENDER_IMPL_H_ |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "media/cast/cast_config.h" | 9 #include "media/cast/cast_config.h" |
10 #include "media/cast/cast_defines.h" | 10 #include "media/cast/cast_defines.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 const CastInitializationCallback& cast_initialization_cb, | 35 const CastInitializationCallback& cast_initialization_cb, |
36 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, | 36 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, |
37 const CreateVideoEncodeMemoryCallback& create_video_encode_mem_cb) | 37 const CreateVideoEncodeMemoryCallback& create_video_encode_mem_cb) |
38 OVERRIDE; | 38 OVERRIDE; |
39 | 39 |
40 virtual ~CastSenderImpl(); | 40 virtual ~CastSenderImpl(); |
41 | 41 |
42 virtual scoped_refptr<AudioFrameInput> audio_frame_input() OVERRIDE; | 42 virtual scoped_refptr<AudioFrameInput> audio_frame_input() OVERRIDE; |
43 virtual scoped_refptr<VideoFrameInput> video_frame_input() OVERRIDE; | 43 virtual scoped_refptr<VideoFrameInput> video_frame_input() OVERRIDE; |
44 | 44 |
45 virtual PacketReceiverCallback packet_receiver() OVERRIDE; | |
46 | |
47 private: | 45 private: |
48 void ReceivedPacket(scoped_ptr<Packet> packet); | 46 void ReceivedPacket(scoped_ptr<Packet> packet); |
49 | 47 |
50 CastInitializationCallback initialization_callback_; | 48 CastInitializationCallback initialization_callback_; |
51 scoped_ptr<AudioSender> audio_sender_; | 49 scoped_ptr<AudioSender> audio_sender_; |
52 scoped_ptr<VideoSender> video_sender_; | 50 scoped_ptr<VideoSender> video_sender_; |
53 scoped_refptr<AudioFrameInput> audio_frame_input_; | 51 scoped_refptr<AudioFrameInput> audio_frame_input_; |
54 scoped_refptr<VideoFrameInput> video_frame_input_; | 52 scoped_refptr<VideoFrameInput> video_frame_input_; |
55 scoped_refptr<CastEnvironment> cast_environment_; | 53 scoped_refptr<CastEnvironment> cast_environment_; |
56 // The transport sender is owned by the owner of the CastSender, and should be | 54 // The transport sender is owned by the owner of the CastSender, and should be |
57 // valid throughout the lifetime of the CastSender. | 55 // valid throughout the lifetime of the CastSender. |
58 CastTransportSender* const transport_sender_; | 56 CastTransportSender* const transport_sender_; |
59 uint32 ssrc_of_audio_sender_; | 57 uint32 ssrc_of_audio_sender_; |
60 uint32 ssrc_of_video_sender_; | 58 uint32 ssrc_of_video_sender_; |
61 | 59 |
62 // NOTE: Weak pointers must be invalidated before all other member variables. | 60 // NOTE: Weak pointers must be invalidated before all other member variables. |
63 base::WeakPtrFactory<CastSenderImpl> weak_factory_; | 61 base::WeakPtrFactory<CastSenderImpl> weak_factory_; |
64 | 62 |
65 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl); | 63 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl); |
66 }; | 64 }; |
67 | 65 |
68 } // namespace cast | 66 } // namespace cast |
69 } // namespace media | 67 } // namespace media |
70 | 68 |
71 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_ | 69 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_ |
OLD | NEW |