OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 11 #ifndef WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
12 #define WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 12 #define WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/call.h" | 17 #include "webrtc/call.h" |
18 #include "webrtc/call/transport_adapter.h" | 18 #include "webrtc/call/transport_adapter.h" |
19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
21 #include "webrtc/video/encoded_frame_callback_adapter.h" | 21 #include "webrtc/video/encoded_frame_callback_adapter.h" |
| 22 #include "webrtc/video/encoder_state_feedback.h" |
22 #include "webrtc/video/payload_router.h" | 23 #include "webrtc/video/payload_router.h" |
23 #include "webrtc/video/send_statistics_proxy.h" | 24 #include "webrtc/video/send_statistics_proxy.h" |
24 #include "webrtc/video/video_capture_input.h" | 25 #include "webrtc/video/video_capture_input.h" |
| 26 #include "webrtc/video/vie_channel.h" |
| 27 #include "webrtc/video/vie_encoder.h" |
25 #include "webrtc/video_receive_stream.h" | 28 #include "webrtc/video_receive_stream.h" |
26 #include "webrtc/video_send_stream.h" | 29 #include "webrtc/video_send_stream.h" |
27 | 30 |
28 namespace webrtc { | 31 namespace webrtc { |
29 | 32 |
30 class BitrateAllocator; | 33 class BitrateAllocator; |
31 class CallStats; | 34 class CallStats; |
32 class CongestionController; | 35 class CongestionController; |
33 class EncoderStateFeedback; | |
34 class ProcessThread; | 36 class ProcessThread; |
35 class ViEChannel; | 37 class ViEChannel; |
36 class ViEEncoder; | 38 class ViEEncoder; |
37 | 39 |
38 namespace internal { | 40 namespace internal { |
39 | 41 |
40 class VideoSendStream : public webrtc::VideoSendStream, | 42 class VideoSendStream : public webrtc::VideoSendStream, |
41 public webrtc::CpuOveruseObserver { | 43 public webrtc::CpuOveruseObserver { |
42 public: | 44 public: |
43 VideoSendStream(int num_cpu_cores, | 45 VideoSendStream(int num_cpu_cores, |
(...skipping 24 matching lines...) Expand all Loading... |
68 | 70 |
69 typedef std::map<uint32_t, RtpState> RtpStateMap; | 71 typedef std::map<uint32_t, RtpState> RtpStateMap; |
70 RtpStateMap GetRtpStates() const; | 72 RtpStateMap GetRtpStates() const; |
71 | 73 |
72 int64_t GetRtt() const; | 74 int64_t GetRtt() const; |
73 int GetPaddingNeededBps() const; | 75 int GetPaddingNeededBps() const; |
74 | 76 |
75 private: | 77 private: |
76 bool SetSendCodec(VideoCodec video_codec); | 78 bool SetSendCodec(VideoCodec video_codec); |
77 void ConfigureSsrcs(); | 79 void ConfigureSsrcs(); |
| 80 TransportFeedbackObserver* GetTransportFeedbackObserver() const; |
78 | 81 |
79 SendStatisticsProxy stats_proxy_; | 82 SendStatisticsProxy stats_proxy_; |
80 TransportAdapter transport_adapter_; | 83 TransportAdapter transport_adapter_; |
81 EncodedFrameCallbackAdapter encoded_frame_proxy_; | 84 EncodedFrameCallbackAdapter encoded_frame_proxy_; |
82 const VideoSendStream::Config config_; | 85 const VideoSendStream::Config config_; |
83 VideoEncoderConfig encoder_config_; | 86 VideoEncoderConfig encoder_config_; |
84 std::map<uint32_t, RtpState> suspended_ssrcs_; | 87 std::map<uint32_t, RtpState> suspended_ssrcs_; |
85 | 88 |
86 ProcessThread* const module_process_thread_; | 89 ProcessThread* const module_process_thread_; |
87 CallStats* const call_stats_; | 90 CallStats* const call_stats_; |
88 CongestionController* const congestion_controller_; | 91 CongestionController* const congestion_controller_; |
89 | 92 |
90 OveruseFrameDetector overuse_detector_; | 93 OveruseFrameDetector overuse_detector_; |
91 rtc::scoped_ptr<VideoCaptureInput> input_; | |
92 PayloadRouter payload_router_; | 94 PayloadRouter payload_router_; |
93 rtc::scoped_ptr<ViEEncoder> vie_encoder_; | 95 ViEEncoder vie_encoder_; |
94 rtc::scoped_ptr<ViEChannel> vie_channel_; | 96 VideoCodingModule* const vcm_; |
95 // TODO(pbos): Make proper const. | 97 EncoderStateFeedback encoder_feedback_; |
96 // const after construction. | 98 ViEChannel vie_channel_; |
97 VideoCodingModule* vcm_; | 99 VideoCaptureInput input_; |
98 rtc::scoped_ptr<EncoderStateFeedback> encoder_feedback_; | |
99 | |
100 // Used as a workaround to indicate that we should be using the configured | |
101 // start bitrate initially, instead of the one reported by VideoEngine (which | |
102 // defaults to too high). | |
103 bool use_config_bitrate_; | |
104 }; | 100 }; |
105 } // namespace internal | 101 } // namespace internal |
106 } // namespace webrtc | 102 } // namespace webrtc |
107 | 103 |
108 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 104 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
OLD | NEW |