Chromium Code Reviews| 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_ |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 class VideoSender; | 29 class VideoSender; |
| 30 | 30 |
| 31 class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> { | 31 class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> { |
| 32 public: | 32 public: |
| 33 // Insert video frames into Cast sender. Frames will be encoded, packetized | 33 // Insert video frames into Cast sender. Frames will be encoded, packetized |
| 34 // and sent to the network. | 34 // and sent to the network. |
| 35 virtual void InsertRawVideoFrame( | 35 virtual void InsertRawVideoFrame( |
| 36 const scoped_refptr<media::VideoFrame>& video_frame, | 36 const scoped_refptr<media::VideoFrame>& video_frame, |
| 37 const base::TimeTicks& capture_time) = 0; | 37 const base::TimeTicks& capture_time) = 0; |
| 38 | 38 |
| 39 // Creates a |VideoFrame| suitable for input via |InsertRawVideoFrame|. Frames | |
| 40 // obtained in this manner may provide benefits such memory reuse and affinity | |
| 41 // with the encoder. The format is guaranteed to be I420 or NV12. | |
| 42 virtual scoped_refptr<VideoFrame> CreateFrame(base::TimeDelta timestamp) = 0; | |
|
Alpha Left Google
2014/11/17 20:23:14
What if CastSender is not yet initialized? Then th
jfroy
2014/11/17 21:23:05
OK, I'll clarify that if the initialization status
Alpha Left Google
2014/11/18 02:57:58
You're right. VideoFrameInput is not available unt
| |
| 43 | |
| 39 protected: | 44 protected: |
| 40 virtual ~VideoFrameInput() {} | 45 virtual ~VideoFrameInput() {} |
| 41 | 46 |
| 42 private: | 47 private: |
| 43 friend class base::RefCountedThreadSafe<VideoFrameInput>; | 48 friend class base::RefCountedThreadSafe<VideoFrameInput>; |
| 44 }; | 49 }; |
| 45 | 50 |
| 46 class AudioFrameInput : public base::RefCountedThreadSafe<AudioFrameInput> { | 51 class AudioFrameInput : public base::RefCountedThreadSafe<AudioFrameInput> { |
| 47 public: | 52 public: |
| 48 // Insert audio frames into Cast sender. Frames will be encoded, packetized | 53 // Insert audio frames into Cast sender. Frames will be encoded, packetized |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // Change the target delay. This is only valid if the receiver | 95 // Change the target delay. This is only valid if the receiver |
| 91 // supports the "adaptive_target_delay" rtp extension. | 96 // supports the "adaptive_target_delay" rtp extension. |
| 92 virtual void SetTargetPlayoutDelay( | 97 virtual void SetTargetPlayoutDelay( |
| 93 base::TimeDelta new_target_playout_delay) = 0; | 98 base::TimeDelta new_target_playout_delay) = 0; |
| 94 }; | 99 }; |
| 95 | 100 |
| 96 } // namespace cast | 101 } // namespace cast |
| 97 } // namespace media | 102 } // namespace media |
| 98 | 103 |
| 99 #endif // MEDIA_CAST_CAST_SENDER_H_ | 104 #endif // MEDIA_CAST_CAST_SENDER_H_ |
| OLD | NEW |