| 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 // | 4 // |
| 5 // This is the main interface for the cast sender. | 5 // This is the main interface for the cast sender. |
| 6 // | 6 // |
| 7 // The AudioFrameInput, VideoFrameInput and PacketReciever interfaces should | 7 // The AudioFrameInput, VideoFrameInput and PacketReciever interfaces should |
| 8 // be accessed from the main thread. | 8 // be accessed from the main thread. |
| 9 | 9 |
| 10 #ifndef MEDIA_CAST_CAST_SENDER_H_ | 10 #ifndef MEDIA_CAST_CAST_SENDER_H_ |
| 11 #define MEDIA_CAST_CAST_SENDER_H_ | 11 #define MEDIA_CAST_CAST_SENDER_H_ |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/time/tick_clock.h" | 17 #include "base/time/tick_clock.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "media/base/audio_bus.h" | 19 #include "media/base/audio_bus.h" |
| 20 #include "media/cast/cast_config.h" | 20 #include "media/cast/cast_config.h" |
| 21 #include "media/cast/cast_environment.h" | 21 #include "media/cast/cast_environment.h" |
| 22 #include "media/cast/transport/cast_transport_sender.h" | 22 #include "media/cast/transport/cast_transport_sender.h" |
| 23 #include "media/filters/gpu_video_accelerator_factories.h" | |
| 24 | 23 |
| 25 namespace media { | 24 namespace media { |
| 26 class GpuVideoAcceleratorFactories; | |
| 27 class VideoFrame; | 25 class VideoFrame; |
| 28 | 26 |
| 29 namespace cast { | 27 namespace cast { |
| 30 class AudioSender; | 28 class AudioSender; |
| 31 class VideoSender; | 29 class VideoSender; |
| 32 | 30 |
| 33 class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> { | 31 class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> { |
| 34 public: | 32 public: |
| 35 // Insert video frames into Cast sender. Frames will be encoded, packetized | 33 // Insert video frames into Cast sender. Frames will be encoded, packetized |
| 36 // and sent to the network. | 34 // and sent to the network. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Status of the initialization will be returned on cast_initialization_cb. | 81 // Status of the initialization will be returned on cast_initialization_cb. |
| 84 virtual void InitializeAudio( | 82 virtual void InitializeAudio( |
| 85 const AudioSenderConfig& audio_config, | 83 const AudioSenderConfig& audio_config, |
| 86 const CastInitializationCallback& cast_initialization_cb) = 0; | 84 const CastInitializationCallback& cast_initialization_cb) = 0; |
| 87 | 85 |
| 88 // Initialize the video stack. Must be called in order to send video frames. | 86 // Initialize the video stack. Must be called in order to send video frames. |
| 89 // Status of the initialization will be returned on cast_initialization_cb. | 87 // Status of the initialization will be returned on cast_initialization_cb. |
| 90 virtual void InitializeVideo( | 88 virtual void InitializeVideo( |
| 91 const VideoSenderConfig& video_config, | 89 const VideoSenderConfig& video_config, |
| 92 const CastInitializationCallback& cast_initialization_cb, | 90 const CastInitializationCallback& cast_initialization_cb, |
| 93 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories) = 0; | 91 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, |
| 92 const CreateVideoEncodeMemoryCallback& create_video_encode_mem_cb) = 0; |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 } // namespace cast | 95 } // namespace cast |
| 97 } // namespace media | 96 } // namespace media |
| 98 | 97 |
| 99 #endif // MEDIA_CAST_CAST_SENDER_H_ | 98 #endif // MEDIA_CAST_CAST_SENDER_H_ |
| OLD | NEW |