diff options
author | mikhal@webrtc.org <mikhal@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-02-01 19:33:21 +0000 |
---|---|---|
committer | mikhal@webrtc.org <mikhal@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-02-01 19:33:21 +0000 |
commit | 16196644914f7b91ba8029c936ca2cf65e771749 (patch) | |
tree | 6d18db04d00a7c64f73aaf183e6669784b2b4b37 /video_engine/vie_rtp_rtcp_impl.cc | |
parent | 7fff32c808707eb6810d1057747069d7afce9939 (diff) | |
download | webrtc-16196644914f7b91ba8029c936ca2cf65e771749.tar.gz |
Adding a send side API for streaming
Review URL: https://webrtc-codereview.appspot.com/1070009
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3457 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/vie_rtp_rtcp_impl.cc')
-rw-r--r-- | video_engine/vie_rtp_rtcp_impl.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/video_engine/vie_rtp_rtcp_impl.cc b/video_engine/vie_rtp_rtcp_impl.cc index 0c047d7a..7bd6f6d2 100644 --- a/video_engine/vie_rtp_rtcp_impl.cc +++ b/video_engine/vie_rtp_rtcp_impl.cc @@ -553,6 +553,33 @@ int ViERTP_RTCPImpl::SetHybridNACKFECStatus( return 0; } +int ViERTP_RTCPImpl::EnableSenderStreamingMode(int video_channel, + int target_delay_ms) { + WEBRTC_TRACE(kTraceApiCall, kTraceVideo, + ViEId(shared_data_->instance_id(), video_channel), + "%s(channel: %d, target_delay: %d)", + __FUNCTION__, video_channel, target_delay_ms); + ViEChannelManagerScoped cs(*(shared_data_->channel_manager())); + ViEChannel* vie_channel = cs.Channel(video_channel); + if (!vie_channel) { + WEBRTC_TRACE(kTraceError, kTraceVideo, + ViEId(shared_data_->instance_id(), video_channel), + "%s: Channel %d doesn't exist", __FUNCTION__, video_channel); + shared_data_->SetLastError(kViERtpRtcpInvalidChannelId); + return -1; + } + + // Update the channel's streaming mode settings. + if (vie_channel->EnableSenderStreamingMode(target_delay_ms) != 0) { + WEBRTC_TRACE(kTraceError, kTraceVideo, + ViEId(shared_data_->instance_id(), video_channel), + "%s: failed for channel %d", __FUNCTION__, video_channel); + shared_data_->SetLastError(kViERtpRtcpUnknownError); + return -1; + } + return 0; +} + int ViERTP_RTCPImpl::SetKeyFrameRequestMethod( const int video_channel, const ViEKeyFrameRequestMethod method) { |