2013-04-18 12:02:52 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-12-18 09:46:22 +00:00
|
|
|
#ifndef WEBRTC_VIDEO_RECEIVE_STREAM_H_
|
|
|
|
|
#define WEBRTC_VIDEO_RECEIVE_STREAM_H_
|
2013-04-18 12:02:52 +00:00
|
|
|
|
2016-03-15 01:00:47 -07:00
|
|
|
#include <limits>
|
2014-01-20 14:43:55 +00:00
|
|
|
#include <map>
|
2013-04-18 12:02:52 +00:00
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2016-11-28 07:02:13 -08:00
|
|
|
#include "webrtc/api/call/transport.h"
|
2016-09-28 06:19:48 -07:00
|
|
|
#include "webrtc/base/platform_file.h"
|
2013-04-18 12:02:52 +00:00
|
|
|
#include "webrtc/common_types.h"
|
2016-04-18 21:12:48 -07:00
|
|
|
#include "webrtc/common_video/include/frame_callback.h"
|
2013-10-28 16:32:01 +00:00
|
|
|
#include "webrtc/config.h"
|
2016-04-18 21:12:48 -07:00
|
|
|
#include "webrtc/media/base/videosinkinterface.h"
|
2013-04-18 12:02:52 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class VideoDecoder;
|
|
|
|
|
|
2016-05-01 20:18:34 -07:00
|
|
|
class VideoReceiveStream {
|
2013-04-18 12:02:52 +00:00
|
|
|
public:
|
2014-10-29 15:28:39 +00:00
|
|
|
// TODO(mflodman) Move all these settings to VideoDecoder and move the
|
|
|
|
|
// declaration to common_types.h.
|
|
|
|
|
struct Decoder {
|
2015-01-15 10:09:39 +00:00
|
|
|
std::string ToString() const;
|
2014-10-29 15:28:39 +00:00
|
|
|
|
|
|
|
|
// The actual decoder instance.
|
2015-06-11 12:38:38 +02:00
|
|
|
VideoDecoder* decoder = nullptr;
|
2014-10-29 15:28:39 +00:00
|
|
|
|
|
|
|
|
// Received RTP packets with this payload type will be sent to this decoder
|
|
|
|
|
// instance.
|
2015-06-11 12:38:38 +02:00
|
|
|
int payload_type = 0;
|
2014-10-29 15:28:39 +00:00
|
|
|
|
|
|
|
|
// Name of the decoded payload (such as VP8). Maps back to the depacketizer
|
|
|
|
|
// used to unpack incoming packets.
|
|
|
|
|
std::string payload_name;
|
2016-08-05 09:19:25 -07:00
|
|
|
|
2016-11-25 03:56:37 -08:00
|
|
|
// This map contains the codec specific parameters from SDP, i.e. the "fmtp"
|
|
|
|
|
// parameters. It is the same as cricket::CodecParameterMap used in
|
|
|
|
|
// cricket::VideoCodec.
|
|
|
|
|
std::map<std::string, std::string> codec_params;
|
2014-10-29 15:28:39 +00:00
|
|
|
};
|
|
|
|
|
|
2015-02-25 10:42:16 +00:00
|
|
|
struct Stats {
|
2016-08-11 08:41:18 -07:00
|
|
|
std::string ToString(int64_t time_ms) const;
|
|
|
|
|
|
2015-02-25 10:42:16 +00:00
|
|
|
int network_frame_rate = 0;
|
|
|
|
|
int decode_frame_rate = 0;
|
|
|
|
|
int render_frame_rate = 0;
|
2017-01-23 07:21:55 -08:00
|
|
|
uint32_t frames_rendered = 0;
|
2015-02-25 10:42:16 +00:00
|
|
|
|
|
|
|
|
// Decoder stats.
|
2015-12-18 16:01:11 +01:00
|
|
|
std::string decoder_implementation_name = "unknown";
|
2015-02-25 10:42:16 +00:00
|
|
|
FrameCounts frame_counts;
|
|
|
|
|
int decode_ms = 0;
|
|
|
|
|
int max_decode_ms = 0;
|
|
|
|
|
int current_delay_ms = 0;
|
|
|
|
|
int target_delay_ms = 0;
|
|
|
|
|
int jitter_buffer_ms = 0;
|
|
|
|
|
int min_playout_delay_ms = 0;
|
2015-04-24 15:16:03 +02:00
|
|
|
int render_delay_ms = 10;
|
2016-10-26 07:09:24 -07:00
|
|
|
uint32_t frames_decoded = 0;
|
Reland of Add QP sum stats for received streams. (patchset #2 id:300001 of https://codereview.webrtc.org/2680893002/ )
Reason for revert:
Fix the problem.
Original issue's description:
> Revert of Add QP sum stats for received streams. (patchset #10 id:180001 of https://codereview.webrtc.org/2649133005/ )
>
> Reason for revert:
> Breaks downstream build.
>
> Original issue's description:
> > Add QP sum stats for received streams.
> >
> > This is not implemented yet in any of the decoders.
> >
> > BUG=webrtc:6541
> >
> > Review-Url: https://codereview.webrtc.org/2649133005
> > Cr-Commit-Position: refs/heads/master@{#16475}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/ff0e72fd165facac27f0313aa178648782e63bc4
>
> TBR=hta@webrtc.org,hbos@webrtc.org,sprang@webrtc.org,magjed@webrtc.org,stefan@webrtc.org,sakal@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6541
>
> Review-Url: https://codereview.webrtc.org/2680893002 .
> Cr-Commit-Position: refs/heads/master@{#16480}
> Committed: https://chromium.googlesource.com/external/webrtc/+/69fb2cca4d54f3df7ceddcd1c3e9b0ad80fa849b
TBR=hta@webrtc.org,hbos@webrtc.org,sprang@webrtc.org,magjed@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
BUG=webrtc:6541
Review-Url: https://codereview.webrtc.org/2681663005
Cr-Commit-Position: refs/heads/master@{#16511}
2017-02-09 04:53:45 -08:00
|
|
|
rtc::Optional<uint64_t> qp_sum;
|
2015-02-25 10:42:16 +00:00
|
|
|
|
2015-08-28 07:35:32 -07:00
|
|
|
int current_payload_type = -1;
|
|
|
|
|
|
2015-02-25 10:42:16 +00:00
|
|
|
int total_bitrate_bps = 0;
|
|
|
|
|
int discarded_packets = 0;
|
|
|
|
|
|
2016-08-11 08:41:18 -07:00
|
|
|
int width = 0;
|
|
|
|
|
int height = 0;
|
|
|
|
|
|
2016-03-15 01:00:47 -07:00
|
|
|
int sync_offset_ms = std::numeric_limits<int>::max();
|
|
|
|
|
|
2015-02-25 10:42:16 +00:00
|
|
|
uint32_t ssrc = 0;
|
2014-02-07 12:06:29 +00:00
|
|
|
std::string c_name;
|
2015-02-25 10:42:16 +00:00
|
|
|
StreamDataCounters rtp_stats;
|
|
|
|
|
RtcpPacketTypeCounter rtcp_packet_type_counts;
|
|
|
|
|
RtcpStatistics rtcp_stats;
|
2013-06-05 11:33:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Config {
|
2016-06-10 17:58:01 +02:00
|
|
|
private:
|
|
|
|
|
// Access to the copy constructor is private to force use of the Copy()
|
|
|
|
|
// method for those exceptional cases where we do use it.
|
|
|
|
|
Config(const Config&) = default;
|
|
|
|
|
|
|
|
|
|
public:
|
2015-08-28 04:07:10 -07:00
|
|
|
Config() = delete;
|
2016-06-10 17:58:01 +02:00
|
|
|
Config(Config&&) = default;
|
2015-09-28 09:59:31 -07:00
|
|
|
explicit Config(Transport* rtcp_send_transport)
|
2015-08-28 04:07:10 -07:00
|
|
|
: rtcp_send_transport(rtcp_send_transport) {}
|
|
|
|
|
|
2016-06-10 17:58:01 +02:00
|
|
|
Config& operator=(Config&&) = default;
|
|
|
|
|
Config& operator=(const Config&) = delete;
|
|
|
|
|
|
|
|
|
|
// Mostly used by tests. Avoid creating copies if you can.
|
|
|
|
|
Config Copy() const { return Config(*this); }
|
|
|
|
|
|
2015-01-15 10:09:39 +00:00
|
|
|
std::string ToString() const;
|
2014-10-29 15:28:39 +00:00
|
|
|
|
|
|
|
|
// Decoders for every payload that we can receive.
|
|
|
|
|
std::vector<Decoder> decoders;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
|
|
|
|
// Receive-stream specific RTP settings.
|
|
|
|
|
struct Rtp {
|
2015-01-15 10:09:39 +00:00
|
|
|
std::string ToString() const;
|
2013-12-03 10:13:04 +00:00
|
|
|
|
|
|
|
|
// Synchronization source (stream identifier) to be received.
|
2015-06-11 12:38:38 +02:00
|
|
|
uint32_t remote_ssrc = 0;
|
Reland of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #1 id:1 of https://codereview.webrtc.org/2649323010/ )
Reason for revert:
Downstream project relied on changed struct.
Transition made possible by https://codereview.webrtc.org/2655243006/.
Original issue's description:
> Revert of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #7 id:160001 of https://codereview.webrtc.org/2646073004/ )
>
> Reason for revert:
> Breaks internal downstream project.
>
> Original issue's description:
> > Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters.
> >
> > Prior to this CL, received RTX (associated) payload types were only configured
> > when WebRtcVideoChannel2::AddRecvStream was called. In the same method, the RTX
> > SSRC was set up.
> >
> > After this CL, the RTX (associated) payload types are set in
> > WebRtcVideoChannel2::SetRecvParameters, which is the appropriate place to set
> > them. The RTX SSRC is still set in WebRtcVideoChannel2::AddRecvStream, since
> > that is the code path that sets other SSRCs.
> >
> > As part of this fix, the VideoReceiveStream::Config::Rtp struct is changed.
> > We remove the possibility for each video payload type to have an associated
> > specific RTX SSRC. Although the config previously allowed for this, all payload
> > types always had the same RTX SSRC set, and the underlying RtpPayloadRegistry
> > did not support multiple SSRCs. This change to the config struct should thus not
> > have any functional impact. The change does however affect the RtcEventLog, since
> > that is used for storing the VideoReceiveStream::Configs. For simplicity,
> > this CL does not change the event log proto definitions, instead duplicating
> > the serialized RTX SSRCs such that they fit in the existing proto definition.
> >
> > BUG=webrtc:7011
> >
> > Review-Url: https://codereview.webrtc.org/2646073004
> > Cr-Commit-Position: refs/heads/master@{#16302}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/fe2bef39cd2a5c891a49f7320514fb04324dc66c
>
> TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,brandtr@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7011
>
> Review-Url: https://codereview.webrtc.org/2649323010
> Cr-Commit-Position: refs/heads/master@{#16307}
> Committed: https://chromium.googlesource.com/external/webrtc/+/e4974953ce0d03a60fae7659b199a6a62a79fa30
TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,kjellander@webrtc.org,kjellander@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
# NOTREECHECKS=true
# NOTRY=true
BUG=webrtc:7011
Review-Url: https://codereview.webrtc.org/2654163006
Cr-Commit-Position: refs/heads/master@{#16322}
2017-01-27 04:53:07 -08:00
|
|
|
|
2013-12-03 10:13:04 +00:00
|
|
|
// Sender SSRC used for sending RTCP (such as receiver reports).
|
2015-06-11 12:38:38 +02:00
|
|
|
uint32_t local_ssrc = 0;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
2013-10-17 14:14:42 +00:00
|
|
|
// See RtcpMode for description.
|
2015-10-02 02:36:56 -07:00
|
|
|
RtcpMode rtcp_mode = RtcpMode::kCompound;
|
2013-10-17 14:14:42 +00:00
|
|
|
|
2014-01-20 08:34:49 +00:00
|
|
|
// Extended RTCP settings.
|
|
|
|
|
struct RtcpXr {
|
|
|
|
|
// True if RTCP Receiver Reference Time Report Block extension
|
|
|
|
|
// (RFC 3611) should be enabled.
|
2015-06-11 12:38:38 +02:00
|
|
|
bool receiver_reference_time_report = false;
|
2014-01-20 08:34:49 +00:00
|
|
|
} rtcp_xr;
|
|
|
|
|
|
2013-12-13 16:36:28 +00:00
|
|
|
// See draft-alvestrand-rmcat-remb for information.
|
2015-06-11 12:38:38 +02:00
|
|
|
bool remb = false;
|
2013-12-13 16:36:28 +00:00
|
|
|
|
2015-11-20 18:05:48 -08:00
|
|
|
// See draft-holmer-rmcat-transport-wide-cc-extensions for details.
|
|
|
|
|
bool transport_cc = false;
|
|
|
|
|
|
2013-06-05 11:33:21 +00:00
|
|
|
// See NackConfig for description.
|
|
|
|
|
NackConfig nack;
|
|
|
|
|
|
2016-10-04 23:28:39 -07:00
|
|
|
// See UlpfecConfig for description.
|
|
|
|
|
UlpfecConfig ulpfec;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
Reland of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #1 id:1 of https://codereview.webrtc.org/2649323010/ )
Reason for revert:
Downstream project relied on changed struct.
Transition made possible by https://codereview.webrtc.org/2655243006/.
Original issue's description:
> Revert of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #7 id:160001 of https://codereview.webrtc.org/2646073004/ )
>
> Reason for revert:
> Breaks internal downstream project.
>
> Original issue's description:
> > Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters.
> >
> > Prior to this CL, received RTX (associated) payload types were only configured
> > when WebRtcVideoChannel2::AddRecvStream was called. In the same method, the RTX
> > SSRC was set up.
> >
> > After this CL, the RTX (associated) payload types are set in
> > WebRtcVideoChannel2::SetRecvParameters, which is the appropriate place to set
> > them. The RTX SSRC is still set in WebRtcVideoChannel2::AddRecvStream, since
> > that is the code path that sets other SSRCs.
> >
> > As part of this fix, the VideoReceiveStream::Config::Rtp struct is changed.
> > We remove the possibility for each video payload type to have an associated
> > specific RTX SSRC. Although the config previously allowed for this, all payload
> > types always had the same RTX SSRC set, and the underlying RtpPayloadRegistry
> > did not support multiple SSRCs. This change to the config struct should thus not
> > have any functional impact. The change does however affect the RtcEventLog, since
> > that is used for storing the VideoReceiveStream::Configs. For simplicity,
> > this CL does not change the event log proto definitions, instead duplicating
> > the serialized RTX SSRCs such that they fit in the existing proto definition.
> >
> > BUG=webrtc:7011
> >
> > Review-Url: https://codereview.webrtc.org/2646073004
> > Cr-Commit-Position: refs/heads/master@{#16302}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/fe2bef39cd2a5c891a49f7320514fb04324dc66c
>
> TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,brandtr@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7011
>
> Review-Url: https://codereview.webrtc.org/2649323010
> Cr-Commit-Position: refs/heads/master@{#16307}
> Committed: https://chromium.googlesource.com/external/webrtc/+/e4974953ce0d03a60fae7659b199a6a62a79fa30
TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,kjellander@webrtc.org,kjellander@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
# NOTREECHECKS=true
# NOTRY=true
BUG=webrtc:7011
Review-Url: https://codereview.webrtc.org/2654163006
Cr-Commit-Position: refs/heads/master@{#16322}
2017-01-27 04:53:07 -08:00
|
|
|
// SSRC for retransmissions.
|
|
|
|
|
uint32_t rtx_ssrc = 0;
|
2014-01-24 09:30:53 +00:00
|
|
|
|
2017-03-09 06:13:20 -08:00
|
|
|
// Set if the stream is protected using FlexFEC.
|
|
|
|
|
bool protected_by_flexfec = false;
|
|
|
|
|
|
Reland of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #1 id:1 of https://codereview.webrtc.org/2649323010/ )
Reason for revert:
Downstream project relied on changed struct.
Transition made possible by https://codereview.webrtc.org/2655243006/.
Original issue's description:
> Revert of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (patchset #7 id:160001 of https://codereview.webrtc.org/2646073004/ )
>
> Reason for revert:
> Breaks internal downstream project.
>
> Original issue's description:
> > Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters.
> >
> > Prior to this CL, received RTX (associated) payload types were only configured
> > when WebRtcVideoChannel2::AddRecvStream was called. In the same method, the RTX
> > SSRC was set up.
> >
> > After this CL, the RTX (associated) payload types are set in
> > WebRtcVideoChannel2::SetRecvParameters, which is the appropriate place to set
> > them. The RTX SSRC is still set in WebRtcVideoChannel2::AddRecvStream, since
> > that is the code path that sets other SSRCs.
> >
> > As part of this fix, the VideoReceiveStream::Config::Rtp struct is changed.
> > We remove the possibility for each video payload type to have an associated
> > specific RTX SSRC. Although the config previously allowed for this, all payload
> > types always had the same RTX SSRC set, and the underlying RtpPayloadRegistry
> > did not support multiple SSRCs. This change to the config struct should thus not
> > have any functional impact. The change does however affect the RtcEventLog, since
> > that is used for storing the VideoReceiveStream::Configs. For simplicity,
> > this CL does not change the event log proto definitions, instead duplicating
> > the serialized RTX SSRCs such that they fit in the existing proto definition.
> >
> > BUG=webrtc:7011
> >
> > Review-Url: https://codereview.webrtc.org/2646073004
> > Cr-Commit-Position: refs/heads/master@{#16302}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/fe2bef39cd2a5c891a49f7320514fb04324dc66c
>
> TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,brandtr@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7011
>
> Review-Url: https://codereview.webrtc.org/2649323010
> Cr-Commit-Position: refs/heads/master@{#16307}
> Committed: https://chromium.googlesource.com/external/webrtc/+/e4974953ce0d03a60fae7659b199a6a62a79fa30
TBR=stefan@webrtc.org,magjed@webrtc.org,terelius@webrtc.org,kjellander@webrtc.org,kjellander@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
# NOTREECHECKS=true
# NOTRY=true
BUG=webrtc:7011
Review-Url: https://codereview.webrtc.org/2654163006
Cr-Commit-Position: refs/heads/master@{#16322}
2017-01-27 04:53:07 -08:00
|
|
|
// Map from video payload type (apt) -> RTX payload type (pt).
|
|
|
|
|
// For RTX to be enabled, both an SSRC and this mapping are needed.
|
|
|
|
|
std::map<int, int> rtx_payload_types;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
|
|
|
|
// RTP header extensions used for the received stream.
|
|
|
|
|
std::vector<RtpExtension> extensions;
|
|
|
|
|
} rtp;
|
|
|
|
|
|
2015-08-28 04:07:10 -07:00
|
|
|
// Transport for outgoing packets (RTCP).
|
2015-09-28 09:59:31 -07:00
|
|
|
Transport* rtcp_send_transport = nullptr;
|
2015-08-28 04:07:10 -07:00
|
|
|
|
2016-09-30 06:19:08 -07:00
|
|
|
// Must not be 'nullptr' when the stream is started.
|
2016-03-23 04:48:10 -07:00
|
|
|
rtc::VideoSinkInterface<VideoFrame>* renderer = nullptr;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
|
|
|
|
// Expected delay needed by the renderer, i.e. the frame will be delivered
|
|
|
|
|
// this many milliseconds, if possible, earlier than the ideal render time.
|
|
|
|
|
// Only valid if 'renderer' is set.
|
2015-06-11 12:38:38 +02:00
|
|
|
int render_delay_ms = 10;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
2016-03-23 04:48:10 -07:00
|
|
|
// If set, pass frames on to the renderer as soon as they are
|
|
|
|
|
// available.
|
|
|
|
|
bool disable_prerenderer_smoothing = false;
|
|
|
|
|
|
2015-07-15 08:02:58 -07:00
|
|
|
// Identifier for an A/V synchronization group. Empty string to disable.
|
|
|
|
|
// TODO(pbos): Synchronize streams in a sync group, not just video streams
|
|
|
|
|
// to one of the audio streams.
|
|
|
|
|
std::string sync_group;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
|
|
|
|
// Called for each incoming video frame, i.e. in encoded state. E.g. used
|
|
|
|
|
// when
|
2015-06-11 12:38:38 +02:00
|
|
|
// saving the stream to a file. 'nullptr' disables the callback.
|
|
|
|
|
EncodedFrameObserver* pre_decode_callback = nullptr;
|
2013-06-05 11:33:21 +00:00
|
|
|
|
|
|
|
|
// Target delay in milliseconds. A positive value indicates this stream is
|
|
|
|
|
// used for streaming instead of a real-time call.
|
2015-06-11 12:38:38 +02:00
|
|
|
int target_delay_ms = 0;
|
2013-06-05 11:33:21 +00:00
|
|
|
};
|
|
|
|
|
|
2016-05-01 20:18:34 -07:00
|
|
|
// Starts stream activity.
|
|
|
|
|
// When a stream is active, it can receive, process and deliver packets.
|
|
|
|
|
virtual void Start() = 0;
|
|
|
|
|
// Stops stream activity.
|
|
|
|
|
// When a stream is stopped, it can't receive, process or deliver packets.
|
|
|
|
|
virtual void Stop() = 0;
|
|
|
|
|
|
2014-10-29 15:28:39 +00:00
|
|
|
// TODO(pbos): Add info on currently-received codec to Stats.
|
|
|
|
|
virtual Stats GetStats() const = 0;
|
2016-05-01 20:18:34 -07:00
|
|
|
|
2016-09-28 06:19:48 -07:00
|
|
|
// Takes ownership of the file, is responsible for closing it later.
|
|
|
|
|
// Calling this method will close and finalize any current log.
|
|
|
|
|
// Giving rtc::kInvalidPlatformFileValue disables logging.
|
|
|
|
|
// If a frame to be written would make the log too large the write fails and
|
|
|
|
|
// the log is closed and finalized. A |byte_limit| of 0 means no limit.
|
|
|
|
|
virtual void EnableEncodedFrameRecording(rtc::PlatformFile file,
|
|
|
|
|
size_t byte_limit) = 0;
|
|
|
|
|
inline void DisableEncodedFrameRecording() {
|
|
|
|
|
EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-01 20:18:34 -07:00
|
|
|
protected:
|
|
|
|
|
virtual ~VideoReceiveStream() {}
|
2013-04-18 12:02:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2013-12-18 09:46:22 +00:00
|
|
|
#endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_
|