Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484 Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769 Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36958}
This commit is contained in:
@ -16,14 +16,15 @@
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
// Deserializes a JSON representation of the VideoReceiveStream::Config back
|
||||
// into a valid object. This will not initialize the decoders or the renderer.
|
||||
VideoReceiveStream::Config ParseVideoReceiveStreamJsonConfig(
|
||||
// Deserializes a JSON representation of the VideoReceiveStreamInterface::Config
|
||||
// back into a valid object. This will not initialize the decoders or the
|
||||
// renderer.
|
||||
VideoReceiveStreamInterface::Config ParseVideoReceiveStreamJsonConfig(
|
||||
webrtc::Transport* transport,
|
||||
const Json::Value& json) {
|
||||
auto receive_config = VideoReceiveStream::Config(transport);
|
||||
auto receive_config = VideoReceiveStreamInterface::Config(transport);
|
||||
for (const auto& decoder_json : json["decoders"]) {
|
||||
VideoReceiveStream::Decoder decoder;
|
||||
VideoReceiveStreamInterface::Decoder decoder;
|
||||
decoder.video_format =
|
||||
SdpVideoFormat(decoder_json["payload_name"].asString());
|
||||
decoder.payload_type = decoder_json["payload_type"].asInt64();
|
||||
@ -69,7 +70,7 @@ VideoReceiveStream::Config ParseVideoReceiveStreamJsonConfig(
|
||||
}
|
||||
|
||||
Json::Value GenerateVideoReceiveStreamJsonConfig(
|
||||
const VideoReceiveStream::Config& config) {
|
||||
const VideoReceiveStreamInterface::Config& config) {
|
||||
Json::Value root_json;
|
||||
|
||||
root_json["decoders"] = Json::Value(Json::arrayValue);
|
||||
|
||||
@ -17,15 +17,16 @@
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
// Deserializes a JSON representation of the VideoReceiveStream::Config back
|
||||
// into a valid object. This will not initialize the decoders or the renderer.
|
||||
VideoReceiveStream::Config ParseVideoReceiveStreamJsonConfig(
|
||||
// Deserializes a JSON representation of the VideoReceiveStreamInterface::Config
|
||||
// back into a valid object. This will not initialize the decoders or the
|
||||
// renderer.
|
||||
VideoReceiveStreamInterface::Config ParseVideoReceiveStreamJsonConfig(
|
||||
webrtc::Transport* transport,
|
||||
const Json::Value& json);
|
||||
|
||||
// Serialize a VideoReceiveStream::Config into a Json object.
|
||||
// Serialize a VideoReceiveStreamInterface::Config into a Json object.
|
||||
Json::Value GenerateVideoReceiveStreamJsonConfig(
|
||||
const VideoReceiveStream::Config& config);
|
||||
const VideoReceiveStreamInterface::Config& config);
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
@ -17,9 +17,9 @@ namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
TEST(CallConfigUtils, MarshalUnmarshalProcessSameObject) {
|
||||
VideoReceiveStream::Config recv_config(nullptr);
|
||||
VideoReceiveStreamInterface::Config recv_config(nullptr);
|
||||
|
||||
VideoReceiveStream::Decoder decoder;
|
||||
VideoReceiveStreamInterface::Decoder decoder;
|
||||
decoder.payload_type = 10;
|
||||
decoder.video_format.name = "test";
|
||||
decoder.video_format.parameters["99"] = "b";
|
||||
@ -37,7 +37,7 @@ TEST(CallConfigUtils, MarshalUnmarshalProcessSameObject) {
|
||||
recv_config.rtp.rtx_associated_payload_types[10] = 10;
|
||||
recv_config.rtp.extensions.emplace_back("uri", 128, true);
|
||||
|
||||
VideoReceiveStream::Config unmarshaled_config =
|
||||
VideoReceiveStreamInterface::Config unmarshaled_config =
|
||||
ParseVideoReceiveStreamJsonConfig(
|
||||
nullptr, GenerateVideoReceiveStreamJsonConfig(recv_config));
|
||||
|
||||
|
||||
@ -309,7 +309,7 @@ void CallTest::SetSendUlpFecConfig(VideoSendStream::Config* send_config) {
|
||||
}
|
||||
|
||||
void CallTest::SetReceiveUlpFecConfig(
|
||||
VideoReceiveStream::Config* receive_config) {
|
||||
VideoReceiveStreamInterface::Config* receive_config) {
|
||||
receive_config->rtp.red_payload_type = kRedPayloadType;
|
||||
receive_config->rtp.ulpfec_payload_type = kUlpfecPayloadType;
|
||||
receive_config->rtp.rtx_associated_payload_types[kRtxRedPayloadType] =
|
||||
@ -353,7 +353,7 @@ void CallTest::CreateMatchingVideoReceiveConfigs(
|
||||
}
|
||||
|
||||
void CallTest::AddMatchingVideoReceiveConfigs(
|
||||
std::vector<VideoReceiveStream::Config>* receive_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_configs,
|
||||
const VideoSendStream::Config& video_send_config,
|
||||
Transport* rtcp_send_transport,
|
||||
bool send_side_bwe,
|
||||
@ -362,7 +362,7 @@ void CallTest::AddMatchingVideoReceiveConfigs(
|
||||
bool receiver_reference_time_report,
|
||||
int rtp_history_ms) {
|
||||
RTC_DCHECK(!video_send_config.rtp.ssrcs.empty());
|
||||
VideoReceiveStream::Config default_config(rtcp_send_transport);
|
||||
VideoReceiveStreamInterface::Config default_config(rtcp_send_transport);
|
||||
default_config.rtp.transport_cc = send_side_bwe;
|
||||
default_config.rtp.local_ssrc = kReceiverLocalVideoSsrc;
|
||||
for (const RtpExtension& extension : video_send_config.rtp.extensions)
|
||||
@ -374,7 +374,8 @@ void CallTest::AddMatchingVideoReceiveConfigs(
|
||||
default_config.renderer = &fake_renderer_;
|
||||
|
||||
for (size_t i = 0; i < video_send_config.rtp.ssrcs.size(); ++i) {
|
||||
VideoReceiveStream::Config video_recv_config(default_config.Copy());
|
||||
VideoReceiveStreamInterface::Config video_recv_config(
|
||||
default_config.Copy());
|
||||
video_recv_config.decoders.clear();
|
||||
if (!video_send_config.rtp.rtx.ssrcs.empty()) {
|
||||
video_recv_config.rtp.rtx_ssrc = video_send_config.rtp.rtx.ssrcs[i];
|
||||
@ -382,7 +383,7 @@ void CallTest::AddMatchingVideoReceiveConfigs(
|
||||
video_send_config.rtp.payload_type;
|
||||
}
|
||||
video_recv_config.rtp.remote_ssrc = video_send_config.rtp.ssrcs[i];
|
||||
VideoReceiveStream::Decoder decoder;
|
||||
VideoReceiveStreamInterface::Decoder decoder;
|
||||
|
||||
decoder.payload_type = video_send_config.rtp.payload_type;
|
||||
decoder.video_format = SdpVideoFormat(video_send_config.rtp.payload_name);
|
||||
@ -592,7 +593,7 @@ void CallTest::Start() {
|
||||
void CallTest::StartVideoStreams() {
|
||||
for (VideoSendStream* video_send_stream : video_send_streams_)
|
||||
video_send_stream->Start();
|
||||
for (VideoReceiveStream* video_recv_stream : video_receive_streams_)
|
||||
for (VideoReceiveStreamInterface* video_recv_stream : video_receive_streams_)
|
||||
video_recv_stream->Start();
|
||||
}
|
||||
|
||||
@ -608,7 +609,7 @@ void CallTest::Stop() {
|
||||
void CallTest::StopVideoStreams() {
|
||||
for (VideoSendStream* video_send_stream : video_send_streams_)
|
||||
video_send_stream->Stop();
|
||||
for (VideoReceiveStream* video_recv_stream : video_receive_streams_)
|
||||
for (VideoReceiveStreamInterface* video_recv_stream : video_receive_streams_)
|
||||
video_recv_stream->Stop();
|
||||
}
|
||||
|
||||
@ -621,7 +622,7 @@ void CallTest::DestroyStreams() {
|
||||
|
||||
DestroyVideoSendStreams();
|
||||
|
||||
for (VideoReceiveStream* video_recv_stream : video_receive_streams_)
|
||||
for (VideoReceiveStreamInterface* video_recv_stream : video_receive_streams_)
|
||||
receiver_call_->DestroyVideoReceiveStream(video_recv_stream);
|
||||
|
||||
for (FlexfecReceiveStream* flexfec_recv_stream : flexfec_receive_streams_)
|
||||
@ -781,7 +782,7 @@ size_t BaseTest::GetNumFlexfecStreams() const {
|
||||
|
||||
void BaseTest::ModifyVideoConfigs(
|
||||
VideoSendStream::Config* send_config,
|
||||
std::vector<VideoReceiveStream::Config>* receive_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_configs,
|
||||
VideoEncoderConfig* encoder_config) {}
|
||||
|
||||
void BaseTest::ModifyVideoCaptureStartResolution(int* width,
|
||||
@ -793,7 +794,7 @@ void BaseTest::ModifyVideoDegradationPreference(
|
||||
|
||||
void BaseTest::OnVideoStreamsCreated(
|
||||
VideoSendStream* send_stream,
|
||||
const std::vector<VideoReceiveStream*>& receive_streams) {}
|
||||
const std::vector<VideoReceiveStreamInterface*>& receive_streams) {}
|
||||
|
||||
void BaseTest::ModifyAudioConfigs(
|
||||
AudioSendStream::Config* send_config,
|
||||
|
||||
@ -99,7 +99,8 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface {
|
||||
|
||||
void SetSendFecConfig(std::vector<uint32_t> video_send_ssrcs);
|
||||
void SetSendUlpFecConfig(VideoSendStream::Config* send_config);
|
||||
void SetReceiveUlpFecConfig(VideoReceiveStream::Config* receive_config);
|
||||
void SetReceiveUlpFecConfig(
|
||||
VideoReceiveStreamInterface::Config* receive_config);
|
||||
void CreateSendConfig(size_t num_video_streams,
|
||||
size_t num_audio_streams,
|
||||
size_t num_flexfec_streams,
|
||||
@ -117,7 +118,7 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface {
|
||||
bool receiver_reference_time_report,
|
||||
int rtp_history_ms);
|
||||
void AddMatchingVideoReceiveConfigs(
|
||||
std::vector<VideoReceiveStream::Config>* receive_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_configs,
|
||||
const VideoSendStream::Config& video_send_config,
|
||||
Transport* rtcp_send_transport,
|
||||
bool send_side_bwe,
|
||||
@ -195,8 +196,8 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface {
|
||||
|
||||
std::unique_ptr<Call> receiver_call_;
|
||||
std::unique_ptr<PacketTransport> receive_transport_;
|
||||
std::vector<VideoReceiveStream::Config> video_receive_configs_;
|
||||
std::vector<VideoReceiveStream*> video_receive_streams_;
|
||||
std::vector<VideoReceiveStreamInterface::Config> video_receive_configs_;
|
||||
std::vector<VideoReceiveStreamInterface*> video_receive_streams_;
|
||||
std::vector<AudioReceiveStream::Config> audio_receive_configs_;
|
||||
std::vector<AudioReceiveStream*> audio_receive_streams_;
|
||||
std::vector<FlexfecReceiveStream::Config> flexfec_receive_configs_;
|
||||
@ -274,7 +275,7 @@ class BaseTest : public RtpRtcpObserver {
|
||||
|
||||
virtual void ModifyVideoConfigs(
|
||||
VideoSendStream::Config* send_config,
|
||||
std::vector<VideoReceiveStream::Config>* receive_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_configs,
|
||||
VideoEncoderConfig* encoder_config);
|
||||
virtual void ModifyVideoCaptureStartResolution(int* width,
|
||||
int* heigt,
|
||||
@ -284,7 +285,7 @@ class BaseTest : public RtpRtcpObserver {
|
||||
|
||||
virtual void OnVideoStreamsCreated(
|
||||
VideoSendStream* send_stream,
|
||||
const std::vector<VideoReceiveStream*>& receive_streams);
|
||||
const std::vector<VideoReceiveStreamInterface*>& receive_streams);
|
||||
|
||||
virtual void ModifyAudioConfigs(
|
||||
AudioSendStream::Config* send_config,
|
||||
|
||||
@ -131,16 +131,16 @@ void FillEncoderConfiguration(VideoCodecType codec_type,
|
||||
}
|
||||
}
|
||||
|
||||
VideoReceiveStream::Decoder CreateMatchingDecoder(
|
||||
VideoReceiveStreamInterface::Decoder CreateMatchingDecoder(
|
||||
int payload_type,
|
||||
const std::string& payload_name) {
|
||||
VideoReceiveStream::Decoder decoder;
|
||||
VideoReceiveStreamInterface::Decoder decoder;
|
||||
decoder.payload_type = payload_type;
|
||||
decoder.video_format = SdpVideoFormat(payload_name);
|
||||
return decoder;
|
||||
}
|
||||
|
||||
VideoReceiveStream::Decoder CreateMatchingDecoder(
|
||||
VideoReceiveStreamInterface::Decoder CreateMatchingDecoder(
|
||||
const VideoSendStream::Config& config) {
|
||||
return CreateMatchingDecoder(config.rtp.payload_type,
|
||||
config.rtp.payload_name);
|
||||
|
||||
@ -53,11 +53,11 @@ void FillEncoderConfiguration(VideoCodecType codec_type,
|
||||
size_t num_streams,
|
||||
VideoEncoderConfig* configuration);
|
||||
|
||||
VideoReceiveStream::Decoder CreateMatchingDecoder(
|
||||
VideoReceiveStreamInterface::Decoder CreateMatchingDecoder(
|
||||
int payload_type,
|
||||
const std::string& payload_name);
|
||||
|
||||
VideoReceiveStream::Decoder CreateMatchingDecoder(
|
||||
VideoReceiveStreamInterface::Decoder CreateMatchingDecoder(
|
||||
const VideoSendStream::Config& config);
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
@ -34,7 +34,7 @@ void RtpReplayer::Replay(const std::string& replay_config_filepath,
|
||||
const uint8_t* rtp_dump_data,
|
||||
size_t rtp_dump_size) {
|
||||
auto stream_state = std::make_unique<StreamState>();
|
||||
std::vector<VideoReceiveStream::Config> receive_stream_configs =
|
||||
std::vector<VideoReceiveStreamInterface::Config> receive_stream_configs =
|
||||
ReadConfigFromFile(replay_config_filepath, &(stream_state->transport));
|
||||
return Replay(std::move(stream_state), std::move(receive_stream_configs),
|
||||
rtp_dump_data, rtp_dump_size);
|
||||
@ -42,7 +42,7 @@ void RtpReplayer::Replay(const std::string& replay_config_filepath,
|
||||
|
||||
void RtpReplayer::Replay(
|
||||
std::unique_ptr<StreamState> stream_state,
|
||||
std::vector<VideoReceiveStream::Config> receive_stream_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config> receive_stream_configs,
|
||||
const uint8_t* rtp_dump_data,
|
||||
size_t rtp_dump_size) {
|
||||
RunLoop loop;
|
||||
@ -83,9 +83,9 @@ void RtpReplayer::Replay(
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<VideoReceiveStream::Config> RtpReplayer::ReadConfigFromFile(
|
||||
const std::string& replay_config,
|
||||
Transport* transport) {
|
||||
std::vector<VideoReceiveStreamInterface::Config>
|
||||
RtpReplayer::ReadConfigFromFile(const std::string& replay_config,
|
||||
Transport* transport) {
|
||||
Json::CharReaderBuilder factory;
|
||||
std::unique_ptr<Json::CharReader> json_reader =
|
||||
absl::WrapUnique(factory.newCharReader());
|
||||
@ -99,7 +99,7 @@ std::vector<VideoReceiveStream::Config> RtpReplayer::ReadConfigFromFile(
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<VideoReceiveStream::Config> receive_stream_configs;
|
||||
std::vector<VideoReceiveStreamInterface::Config> receive_stream_configs;
|
||||
receive_stream_configs.reserve(json_configs.size());
|
||||
for (const auto& json : json_configs) {
|
||||
receive_stream_configs.push_back(
|
||||
@ -109,7 +109,7 @@ std::vector<VideoReceiveStream::Config> RtpReplayer::ReadConfigFromFile(
|
||||
}
|
||||
|
||||
void RtpReplayer::SetupVideoStreams(
|
||||
std::vector<VideoReceiveStream::Config>* receive_stream_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_stream_configs,
|
||||
StreamState* stream_state,
|
||||
Call* call) {
|
||||
stream_state->decoder_factory = std::make_unique<InternalDecoderFactory>();
|
||||
|
||||
@ -44,7 +44,7 @@ class RtpReplayer final {
|
||||
struct StreamState {
|
||||
test::NullTransport transport;
|
||||
std::vector<std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>> sinks;
|
||||
std::vector<VideoReceiveStream*> receive_streams;
|
||||
std::vector<VideoReceiveStreamInterface*> receive_streams;
|
||||
std::unique_ptr<VideoDecoderFactory> decoder_factory;
|
||||
};
|
||||
|
||||
@ -53,23 +53,24 @@ class RtpReplayer final {
|
||||
const uint8_t* rtp_dump_data,
|
||||
size_t rtp_dump_size);
|
||||
|
||||
// Construct an RtpReplayer from a set of VideoReceiveStream::Configs. Note
|
||||
// the stream_state.transport must be set for each receiver stream.
|
||||
// Construct an RtpReplayer from a set of
|
||||
// VideoReceiveStreamInterface::Configs. Note the stream_state.transport must
|
||||
// be set for each receiver stream.
|
||||
static void Replay(
|
||||
std::unique_ptr<StreamState> stream_state,
|
||||
std::vector<VideoReceiveStream::Config> receive_stream_config,
|
||||
std::vector<VideoReceiveStreamInterface::Config> receive_stream_config,
|
||||
const uint8_t* rtp_dump_data,
|
||||
size_t rtp_dump_size);
|
||||
|
||||
private:
|
||||
// Reads the replay configuration from Json.
|
||||
static std::vector<VideoReceiveStream::Config> ReadConfigFromFile(
|
||||
static std::vector<VideoReceiveStreamInterface::Config> ReadConfigFromFile(
|
||||
const std::string& replay_config,
|
||||
Transport* transport);
|
||||
|
||||
// Configures the stream state based on the receiver configurations.
|
||||
static void SetupVideoStreams(
|
||||
std::vector<VideoReceiveStream::Config>* receive_stream_configs,
|
||||
std::vector<VideoReceiveStreamInterface::Config>* receive_stream_configs,
|
||||
StreamState* stream_state,
|
||||
Call* call);
|
||||
|
||||
|
||||
@ -19,9 +19,9 @@ namespace webrtc {
|
||||
|
||||
void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
auto stream_state = std::make_unique<test::RtpReplayer::StreamState>();
|
||||
VideoReceiveStream::Config vp8_config(&(stream_state->transport));
|
||||
VideoReceiveStreamInterface::Config vp8_config(&(stream_state->transport));
|
||||
|
||||
VideoReceiveStream::Decoder vp8_decoder;
|
||||
VideoReceiveStreamInterface::Decoder vp8_decoder;
|
||||
vp8_decoder.video_format = SdpVideoFormat("VP8");
|
||||
vp8_decoder.payload_type = 125;
|
||||
vp8_config.decoders.push_back(std::move(vp8_decoder));
|
||||
@ -33,7 +33,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
vp8_config.rtp.nack.rtp_history_ms = 1000;
|
||||
vp8_config.rtp.lntf.enabled = true;
|
||||
|
||||
std::vector<VideoReceiveStream::Config> replay_configs;
|
||||
std::vector<VideoReceiveStreamInterface::Config> replay_configs;
|
||||
replay_configs.push_back(std::move(vp8_config));
|
||||
|
||||
test::RtpReplayer::Replay(std::move(stream_state), std::move(replay_configs),
|
||||
|
||||
@ -19,9 +19,9 @@ namespace webrtc {
|
||||
|
||||
void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
auto stream_state = std::make_unique<test::RtpReplayer::StreamState>();
|
||||
VideoReceiveStream::Config vp9_config(&(stream_state->transport));
|
||||
VideoReceiveStreamInterface::Config vp9_config(&(stream_state->transport));
|
||||
|
||||
VideoReceiveStream::Decoder vp9_decoder;
|
||||
VideoReceiveStreamInterface::Decoder vp9_decoder;
|
||||
vp9_decoder.video_format = SdpVideoFormat("VP9");
|
||||
vp9_decoder.payload_type = 124;
|
||||
vp9_config.decoders.push_back(std::move(vp9_decoder));
|
||||
@ -32,7 +32,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
vp9_config.rtp.transport_cc = true;
|
||||
vp9_config.rtp.nack.rtp_history_ms = 1000;
|
||||
|
||||
std::vector<VideoReceiveStream::Config> replay_configs;
|
||||
std::vector<VideoReceiveStreamInterface::Config> replay_configs;
|
||||
replay_configs.push_back(std::move(vp9_config));
|
||||
|
||||
test::RtpReplayer::Replay(std::move(stream_state), std::move(replay_configs),
|
||||
|
||||
@ -174,7 +174,8 @@ void VideoSendStatsCollector::AddStats(VideoSendStream::Stats sample,
|
||||
last_update_ = at_time;
|
||||
}
|
||||
|
||||
void VideoReceiveStatsCollector::AddStats(VideoReceiveStream::Stats sample) {
|
||||
void VideoReceiveStatsCollector::AddStats(
|
||||
VideoReceiveStreamInterface::Stats sample) {
|
||||
if (sample.decode_ms > 0)
|
||||
stats_.decode_time.AddSampleMs(sample.decode_ms);
|
||||
if (sample.max_decode_ms > 0)
|
||||
|
||||
@ -90,7 +90,7 @@ class VideoSendStatsCollector {
|
||||
};
|
||||
class VideoReceiveStatsCollector {
|
||||
public:
|
||||
void AddStats(VideoReceiveStream::Stats sample);
|
||||
void AddStats(VideoReceiveStreamInterface::Stats sample);
|
||||
CollectedVideoReceiveStats& stats() { return stats_; }
|
||||
|
||||
private:
|
||||
|
||||
@ -45,7 +45,7 @@ void CreateAnalyzedStream(Scenario* s,
|
||||
// Querying the video stats from within the expected runtime environment
|
||||
// (i.e. the TQ that belongs to the CallClient, not the Scenario TQ that
|
||||
// we're currently on).
|
||||
VideoReceiveStream::Stats video_receive_stats;
|
||||
VideoReceiveStreamInterface::Stats video_receive_stats;
|
||||
auto* video_stream = video->receive();
|
||||
callee->SendTask([&video_stream, &video_receive_stats]() {
|
||||
video_receive_stats = video_stream->GetStats();
|
||||
|
||||
@ -317,16 +317,16 @@ std::unique_ptr<FrameGeneratorInterface> CreateFrameGenerator(
|
||||
}
|
||||
}
|
||||
|
||||
VideoReceiveStream::Config CreateVideoReceiveStreamConfig(
|
||||
VideoReceiveStreamInterface::Config CreateVideoReceiveStreamConfig(
|
||||
VideoStreamConfig config,
|
||||
Transport* feedback_transport,
|
||||
VideoDecoderFactory* decoder_factory,
|
||||
VideoReceiveStream::Decoder decoder,
|
||||
VideoReceiveStreamInterface::Decoder decoder,
|
||||
rtc::VideoSinkInterface<VideoFrame>* renderer,
|
||||
uint32_t local_ssrc,
|
||||
uint32_t ssrc,
|
||||
uint32_t rtx_ssrc) {
|
||||
VideoReceiveStream::Config recv(feedback_transport);
|
||||
VideoReceiveStreamInterface::Config recv(feedback_transport);
|
||||
recv.rtp.transport_cc = config.stream.packet_feedback;
|
||||
recv.rtp.local_ssrc = local_ssrc;
|
||||
recv.rtp.extensions = GetVideoRtpExtensions(config);
|
||||
@ -546,7 +546,7 @@ ReceiveVideoStream::ReceiveVideoStream(CallClient* receiver,
|
||||
decoder_factory_ = std::make_unique<InternalDecoderFactory>();
|
||||
}
|
||||
|
||||
VideoReceiveStream::Decoder decoder =
|
||||
VideoReceiveStreamInterface::Decoder decoder =
|
||||
CreateMatchingDecoder(CodecTypeToPayloadType(config.encoder.codec),
|
||||
CodecTypeToPayloadString(config.encoder.codec));
|
||||
size_t num_streams = 1;
|
||||
@ -611,9 +611,9 @@ void ReceiveVideoStream::Stop() {
|
||||
});
|
||||
}
|
||||
|
||||
VideoReceiveStream::Stats ReceiveVideoStream::GetStats() const {
|
||||
VideoReceiveStreamInterface::Stats ReceiveVideoStream::GetStats() const {
|
||||
if (receive_streams_.empty())
|
||||
return VideoReceiveStream::Stats();
|
||||
return VideoReceiveStreamInterface::Stats();
|
||||
// TODO(srte): Handle multiple receive streams.
|
||||
return receive_streams_.back()->GetStats();
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ class ReceiveVideoStream {
|
||||
|
||||
void Start();
|
||||
void Stop();
|
||||
VideoReceiveStream::Stats GetStats() const;
|
||||
VideoReceiveStreamInterface::Stats GetStats() const;
|
||||
|
||||
private:
|
||||
friend class Scenario;
|
||||
@ -93,7 +93,7 @@ class ReceiveVideoStream {
|
||||
Transport* feedback_transport,
|
||||
VideoFrameMatcher* matcher);
|
||||
|
||||
std::vector<VideoReceiveStream*> receive_streams_;
|
||||
std::vector<VideoReceiveStreamInterface*> receive_streams_;
|
||||
FlexfecReceiveStream* flecfec_stream_ = nullptr;
|
||||
FakeVideoRenderer fake_renderer_;
|
||||
std::vector<std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>>
|
||||
|
||||
Reference in New Issue
Block a user