2015-09-24 16:47:53 -07:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
2015-09-24 16:47:53 -07:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* 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.
|
2015-09-24 16:47:53 -07:00
|
|
|
*/
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
// This file contains classes that implement RtpReceiverInterface.
|
|
|
|
|
// An RtpReceiver associates a MediaStreamTrackInterface with an underlying
|
2016-06-27 16:30:35 -07:00
|
|
|
// transport (provided by cricket::VoiceChannel/cricket::VideoChannel)
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef PC_RTPRECEIVER_H_
|
|
|
|
|
#define PC_RTPRECEIVER_H_
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2017-01-02 08:42:32 -08:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
#include <string>
|
2017-10-30 09:57:42 -07:00
|
|
|
#include <vector>
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/mediastreaminterface.h"
|
|
|
|
|
#include "api/rtpreceiverinterface.h"
|
|
|
|
|
#include "media/base/videobroadcaster.h"
|
|
|
|
|
#include "pc/remoteaudiosource.h"
|
|
|
|
|
#include "pc/videotracksource.h"
|
2015-09-28 16:53:55 -07:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2016-06-06 14:27:39 -07:00
|
|
|
// Internal class used by PeerConnection.
|
|
|
|
|
class RtpReceiverInternal : public RtpReceiverInterface {
|
|
|
|
|
public:
|
|
|
|
|
virtual void Stop() = 0;
|
2018-01-10 17:15:20 -08:00
|
|
|
|
2018-02-15 15:19:50 -08:00
|
|
|
// Sets the underlying MediaEngine channel associated with this RtpSender.
|
|
|
|
|
// SetVoiceMediaChannel should be used for audio RtpSenders and
|
|
|
|
|
// SetVideoMediaChannel should be used for video RtpSenders. Must call the
|
|
|
|
|
// appropriate SetXxxMediaChannel(nullptr) before the media channel is
|
|
|
|
|
// destroyed.
|
|
|
|
|
virtual void SetVoiceMediaChannel(
|
|
|
|
|
cricket::VoiceMediaChannel* voice_media_channel) = 0;
|
|
|
|
|
virtual void SetVideoMediaChannel(
|
|
|
|
|
cricket::VideoMediaChannel* video_media_channel) = 0;
|
|
|
|
|
|
2018-01-17 17:41:02 -08:00
|
|
|
// Configures the RtpReceiver with the underlying media channel, with the
|
|
|
|
|
// given SSRC as the stream identifier. If |ssrc| is 0, the receiver will
|
|
|
|
|
// receive packets on unsignaled SSRCs.
|
|
|
|
|
virtual void SetupMediaChannel(uint32_t ssrc) = 0;
|
|
|
|
|
|
2017-02-25 18:15:09 -08:00
|
|
|
// This SSRC is used as an identifier for the receiver between the API layer
|
2017-06-12 01:16:46 -07:00
|
|
|
// and the WebRtcVideoEngine, WebRtcVoiceEngine layer.
|
2017-02-25 18:15:09 -08:00
|
|
|
virtual uint32_t ssrc() const = 0;
|
2018-01-10 11:51:34 -08:00
|
|
|
|
|
|
|
|
// Call this to notify the RtpReceiver when the first packet has been received
|
|
|
|
|
// on the corresponding channel.
|
|
|
|
|
virtual void NotifyFirstPacketReceived() = 0;
|
2018-01-10 17:15:20 -08:00
|
|
|
|
|
|
|
|
// Set the associated remote media streams for this receiver. The remote track
|
|
|
|
|
// will be removed from any streams that are no longer present and added to
|
|
|
|
|
// any new streams.
|
2018-07-04 20:51:53 +02:00
|
|
|
virtual void set_stream_ids(std::vector<std::string> stream_ids) = 0;
|
|
|
|
|
// TODO(https://crbug.com/webrtc/9480): Remove SetStreams() in favor of
|
|
|
|
|
// set_stream_ids() as soon as downstream projects are no longer dependent on
|
|
|
|
|
// stream objects.
|
2018-01-10 17:15:20 -08:00
|
|
|
virtual void SetStreams(
|
|
|
|
|
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams) = 0;
|
2018-02-15 15:19:50 -08:00
|
|
|
|
|
|
|
|
// Returns an ID that changes if the attached track changes, but
|
|
|
|
|
// otherwise remains constant. Used to generate IDs for stats.
|
|
|
|
|
// The special value zero means that no track is attached.
|
|
|
|
|
virtual int AttachmentId() const = 0;
|
2016-06-06 14:27:39 -07:00
|
|
|
};
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
class AudioRtpReceiver : public ObserverInterface,
|
|
|
|
|
public AudioSourceInterface::AudioObserver,
|
2018-01-10 11:51:34 -08:00
|
|
|
public rtc::RefCountedObject<RtpReceiverInternal> {
|
2015-09-28 16:53:55 -07:00
|
|
|
public:
|
2018-07-04 20:51:53 +02:00
|
|
|
AudioRtpReceiver(rtc::Thread* worker_thread,
|
|
|
|
|
std::string receiver_id,
|
|
|
|
|
std::vector<std::string> stream_ids);
|
|
|
|
|
// TODO(https://crbug.com/webrtc/9480): Remove this when streams() is removed.
|
2017-11-21 13:41:51 +01:00
|
|
|
AudioRtpReceiver(
|
2018-01-10 11:51:34 -08:00
|
|
|
rtc::Thread* worker_thread,
|
2017-11-27 13:01:52 -08:00
|
|
|
const std::string& receiver_id,
|
2018-01-17 17:41:02 -08:00
|
|
|
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams);
|
2015-09-28 16:53:55 -07:00
|
|
|
virtual ~AudioRtpReceiver();
|
|
|
|
|
|
|
|
|
|
// ObserverInterface implementation
|
|
|
|
|
void OnChanged() override;
|
|
|
|
|
|
|
|
|
|
// AudioSourceInterface::AudioObserver implementation
|
|
|
|
|
void OnSetVolume(double volume) override;
|
|
|
|
|
|
2016-03-24 03:16:19 -07:00
|
|
|
rtc::scoped_refptr<AudioTrackInterface> audio_track() const {
|
|
|
|
|
return track_.get();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
// RtpReceiverInterface implementation
|
|
|
|
|
rtc::scoped_refptr<MediaStreamTrackInterface> track() const override {
|
|
|
|
|
return track_.get();
|
|
|
|
|
}
|
2018-07-04 20:51:53 +02:00
|
|
|
std::vector<std::string> stream_ids() const override;
|
2017-11-21 13:41:51 +01:00
|
|
|
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams()
|
|
|
|
|
const override {
|
|
|
|
|
return streams_;
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2016-06-27 16:30:35 -07:00
|
|
|
cricket::MediaType media_type() const override {
|
|
|
|
|
return cricket::MEDIA_TYPE_AUDIO;
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
std::string id() const override { return id_; }
|
|
|
|
|
|
2016-05-16 11:40:30 -07:00
|
|
|
RtpParameters GetParameters() const override;
|
|
|
|
|
bool SetParameters(const RtpParameters& parameters) override;
|
|
|
|
|
|
2018-08-29 17:02:10 -07:00
|
|
|
void SetFrameDecryptor(
|
|
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor) override;
|
|
|
|
|
|
|
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> GetFrameDecryptor()
|
|
|
|
|
const override;
|
|
|
|
|
|
2016-06-06 14:27:39 -07:00
|
|
|
// RtpReceiverInternal implementation.
|
|
|
|
|
void Stop() override;
|
2018-01-17 17:41:02 -08:00
|
|
|
void SetupMediaChannel(uint32_t ssrc) override;
|
|
|
|
|
uint32_t ssrc() const override { return ssrc_.value_or(0); }
|
2018-01-10 11:51:34 -08:00
|
|
|
void NotifyFirstPacketReceived() override;
|
2018-07-04 20:51:53 +02:00
|
|
|
void set_stream_ids(std::vector<std::string> stream_ids) override;
|
2018-01-10 17:15:20 -08:00
|
|
|
void SetStreams(const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&
|
|
|
|
|
streams) override;
|
2016-06-14 11:47:14 -07:00
|
|
|
void SetObserver(RtpReceiverObserverInterface* observer) override;
|
2018-02-15 15:19:50 -08:00
|
|
|
void SetVoiceMediaChannel(
|
2018-09-10 14:06:02 -07:00
|
|
|
cricket::VoiceMediaChannel* voice_media_channel) override;
|
|
|
|
|
|
2018-02-15 15:19:50 -08:00
|
|
|
void SetVideoMediaChannel(
|
|
|
|
|
cricket::VideoMediaChannel* video_media_channel) override {
|
|
|
|
|
RTC_NOTREACHED();
|
|
|
|
|
}
|
2016-06-14 11:47:14 -07:00
|
|
|
|
Reland of Implemented the GetSources() in native code. (patchset #1 id:1 of https://codereview.webrtc.org/2809613002/ )
Reason for revert:
Re-land, reverting did not fix bug.
https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
Original issue's description:
> Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
>
> Reason for revert:
> Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see
>
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
>
> Original issue's description:
> > Added the GetSources() to the RtpReceiverInterface and implemented
> > it for the AudioRtpReceiver.
> >
> > This method returns a vector of RtpSource(both CSRC source and SSRC
> > source) which contains the ID of a source, the timestamp, the source
> > type (SSRC or CSRC) and the audio level.
> >
> > The RtpSource objects are buffered and maintained by the
> > RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> > the info of the contributing source will be pulled along the object
> > chain:
> > AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> > AudioReceiveStream -> voe::Channel -> RtpRtcp module
> >
> > Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
> >
> > BUG=chromium:703122
> > TBR=stefan@webrtc.org, danilchap@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2770233003
> > Cr-Commit-Position: refs/heads/master@{#17591}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/292084c3765d9f3ee406ca2ec86eae206b540053
>
> TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:703122
>
> Review-Url: https://codereview.webrtc.org/2809613002
> Cr-Commit-Position: refs/heads/master@{#17616}
> Committed: https://chromium.googlesource.com/external/webrtc/+/fbcc5cb3869d1370008e40f24fc03ac8fb69c675
TBR=deadbeef@webrtc.org,solenberg@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org,olka@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:703122
Review-Url: https://codereview.webrtc.org/2810623003
Cr-Commit-Position: refs/heads/master@{#17621}
2017-04-10 07:39:05 -07:00
|
|
|
std::vector<RtpSource> GetSources() const override;
|
2018-01-11 17:18:19 +01:00
|
|
|
int AttachmentId() const override { return attachment_id_; }
|
Reland of Implemented the GetSources() in native code. (patchset #1 id:1 of https://codereview.webrtc.org/2809613002/ )
Reason for revert:
Re-land, reverting did not fix bug.
https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
Original issue's description:
> Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
>
> Reason for revert:
> Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see
>
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
>
> Original issue's description:
> > Added the GetSources() to the RtpReceiverInterface and implemented
> > it for the AudioRtpReceiver.
> >
> > This method returns a vector of RtpSource(both CSRC source and SSRC
> > source) which contains the ID of a source, the timestamp, the source
> > type (SSRC or CSRC) and the audio level.
> >
> > The RtpSource objects are buffered and maintained by the
> > RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> > the info of the contributing source will be pulled along the object
> > chain:
> > AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> > AudioReceiveStream -> voe::Channel -> RtpRtcp module
> >
> > Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
> >
> > BUG=chromium:703122
> > TBR=stefan@webrtc.org, danilchap@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2770233003
> > Cr-Commit-Position: refs/heads/master@{#17591}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/292084c3765d9f3ee406ca2ec86eae206b540053
>
> TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:703122
>
> Review-Url: https://codereview.webrtc.org/2809613002
> Cr-Commit-Position: refs/heads/master@{#17616}
> Committed: https://chromium.googlesource.com/external/webrtc/+/fbcc5cb3869d1370008e40f24fc03ac8fb69c675
TBR=deadbeef@webrtc.org,solenberg@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org,olka@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:703122
Review-Url: https://codereview.webrtc.org/2810623003
Cr-Commit-Position: refs/heads/master@{#17621}
2017-04-10 07:39:05 -07:00
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
private:
|
|
|
|
|
void Reconfigure();
|
2018-01-10 11:51:34 -08:00
|
|
|
bool SetOutputVolume(double volume);
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2018-01-10 11:51:34 -08:00
|
|
|
rtc::Thread* const worker_thread_;
|
2015-12-12 01:37:01 +01:00
|
|
|
const std::string id_;
|
2018-01-17 17:41:02 -08:00
|
|
|
const rtc::scoped_refptr<RemoteAudioSource> source_;
|
2016-03-24 03:16:19 -07:00
|
|
|
const rtc::scoped_refptr<AudioTrackInterface> track_;
|
2018-01-17 17:41:02 -08:00
|
|
|
cricket::VoiceMediaChannel* media_channel_ = nullptr;
|
2018-06-19 16:47:43 +02:00
|
|
|
absl::optional<uint32_t> ssrc_;
|
2017-11-21 13:41:51 +01:00
|
|
|
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams_;
|
2015-09-28 16:53:55 -07:00
|
|
|
bool cached_track_enabled_;
|
2016-06-27 16:30:35 -07:00
|
|
|
double cached_volume_ = 1;
|
|
|
|
|
bool stopped_ = false;
|
2016-06-14 11:47:14 -07:00
|
|
|
RtpReceiverObserverInterface* observer_ = nullptr;
|
|
|
|
|
bool received_first_packet_ = false;
|
2018-01-11 17:18:19 +01:00
|
|
|
int attachment_id_ = 0;
|
2018-08-29 17:02:10 -07:00
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor_;
|
2015-09-28 16:53:55 -07:00
|
|
|
};
|
|
|
|
|
|
2018-01-10 11:51:34 -08:00
|
|
|
class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> {
|
2015-09-28 16:53:55 -07:00
|
|
|
public:
|
2017-02-25 18:15:09 -08:00
|
|
|
// An SSRC of 0 will create a receiver that will match the first SSRC it
|
|
|
|
|
// sees.
|
2018-07-04 20:51:53 +02:00
|
|
|
VideoRtpReceiver(rtc::Thread* worker_thread,
|
|
|
|
|
std::string receiver_id,
|
|
|
|
|
std::vector<std::string> streams_ids);
|
|
|
|
|
// TODO(hbos): Remove this when streams() is removed.
|
|
|
|
|
// https://crbug.com/webrtc/9480
|
2017-11-21 13:41:51 +01:00
|
|
|
VideoRtpReceiver(
|
2018-01-10 11:51:34 -08:00
|
|
|
rtc::Thread* worker_thread,
|
2018-01-10 17:15:20 -08:00
|
|
|
const std::string& receiver_id,
|
2018-01-17 17:41:02 -08:00
|
|
|
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams);
|
2015-09-28 16:53:55 -07:00
|
|
|
|
|
|
|
|
virtual ~VideoRtpReceiver();
|
|
|
|
|
|
2016-03-10 18:32:00 +01:00
|
|
|
rtc::scoped_refptr<VideoTrackInterface> video_track() const {
|
|
|
|
|
return track_.get();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
// RtpReceiverInterface implementation
|
|
|
|
|
rtc::scoped_refptr<MediaStreamTrackInterface> track() const override {
|
|
|
|
|
return track_.get();
|
|
|
|
|
}
|
2018-07-04 20:51:53 +02:00
|
|
|
std::vector<std::string> stream_ids() const override;
|
2017-11-21 13:41:51 +01:00
|
|
|
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams()
|
|
|
|
|
const override {
|
|
|
|
|
return streams_;
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2016-06-27 16:30:35 -07:00
|
|
|
cricket::MediaType media_type() const override {
|
|
|
|
|
return cricket::MEDIA_TYPE_VIDEO;
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
std::string id() const override { return id_; }
|
|
|
|
|
|
2016-05-16 11:40:30 -07:00
|
|
|
RtpParameters GetParameters() const override;
|
|
|
|
|
bool SetParameters(const RtpParameters& parameters) override;
|
|
|
|
|
|
2018-08-29 17:02:10 -07:00
|
|
|
void SetFrameDecryptor(
|
|
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor) override;
|
|
|
|
|
|
|
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> GetFrameDecryptor()
|
|
|
|
|
const override;
|
|
|
|
|
|
2016-06-06 14:27:39 -07:00
|
|
|
// RtpReceiverInternal implementation.
|
|
|
|
|
void Stop() override;
|
2018-01-17 17:41:02 -08:00
|
|
|
void SetupMediaChannel(uint32_t ssrc) override;
|
|
|
|
|
uint32_t ssrc() const override { return ssrc_.value_or(0); }
|
2018-01-10 11:51:34 -08:00
|
|
|
void NotifyFirstPacketReceived() override;
|
2018-07-04 20:51:53 +02:00
|
|
|
void set_stream_ids(std::vector<std::string> stream_ids) override;
|
2018-01-10 17:15:20 -08:00
|
|
|
void SetStreams(const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&
|
|
|
|
|
streams) override;
|
2016-06-06 14:27:39 -07:00
|
|
|
|
2016-06-14 11:47:14 -07:00
|
|
|
void SetObserver(RtpReceiverObserverInterface* observer) override;
|
|
|
|
|
|
2018-02-15 15:19:50 -08:00
|
|
|
void SetVoiceMediaChannel(
|
|
|
|
|
cricket::VoiceMediaChannel* voice_media_channel) override {
|
|
|
|
|
RTC_NOTREACHED();
|
|
|
|
|
}
|
2018-09-10 14:06:02 -07:00
|
|
|
|
2018-02-15 15:19:50 -08:00
|
|
|
void SetVideoMediaChannel(
|
2018-09-10 14:06:02 -07:00
|
|
|
cricket::VideoMediaChannel* video_media_channel) override;
|
2018-02-15 15:19:50 -08:00
|
|
|
|
|
|
|
|
int AttachmentId() const override { return attachment_id_; }
|
2016-06-14 11:47:14 -07:00
|
|
|
|
2018-09-26 16:04:32 +02:00
|
|
|
std::vector<RtpSource> GetSources() const override;
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
private:
|
2018-05-23 16:28:17 +02:00
|
|
|
class VideoRtpTrackSource : public VideoTrackSource {
|
|
|
|
|
public:
|
|
|
|
|
VideoRtpTrackSource() : VideoTrackSource(true /* remote */) {}
|
|
|
|
|
|
|
|
|
|
rtc::VideoSourceInterface<VideoFrame>* source() override {
|
|
|
|
|
return &broadcaster_;
|
|
|
|
|
}
|
|
|
|
|
rtc::VideoSinkInterface<VideoFrame>* sink() { return &broadcaster_; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// |broadcaster_| is needed since the decoder can only handle one sink.
|
|
|
|
|
// It might be better if the decoder can handle multiple sinks and consider
|
|
|
|
|
// the VideoSinkWants.
|
|
|
|
|
rtc::VideoBroadcaster broadcaster_;
|
|
|
|
|
};
|
|
|
|
|
|
2018-01-10 11:51:34 -08:00
|
|
|
bool SetSink(rtc::VideoSinkInterface<VideoFrame>* sink);
|
2016-06-14 11:47:14 -07:00
|
|
|
|
2018-01-10 11:51:34 -08:00
|
|
|
rtc::Thread* const worker_thread_;
|
2018-01-10 17:15:20 -08:00
|
|
|
const std::string id_;
|
2018-01-10 11:51:34 -08:00
|
|
|
cricket::VideoMediaChannel* media_channel_ = nullptr;
|
2018-06-19 16:47:43 +02:00
|
|
|
absl::optional<uint32_t> ssrc_;
|
2016-03-10 18:32:00 +01:00
|
|
|
// |source_| is held here to be able to change the state of the source when
|
|
|
|
|
// the VideoRtpReceiver is stopped.
|
2018-05-23 16:28:17 +02:00
|
|
|
rtc::scoped_refptr<VideoRtpTrackSource> source_;
|
2016-03-10 18:32:00 +01:00
|
|
|
rtc::scoped_refptr<VideoTrackInterface> track_;
|
2017-11-21 13:41:51 +01:00
|
|
|
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams_;
|
2016-06-27 16:30:35 -07:00
|
|
|
bool stopped_ = false;
|
2016-06-14 11:47:14 -07:00
|
|
|
RtpReceiverObserverInterface* observer_ = nullptr;
|
|
|
|
|
bool received_first_packet_ = false;
|
2018-01-11 17:18:19 +01:00
|
|
|
int attachment_id_ = 0;
|
2018-08-29 17:02:10 -07:00
|
|
|
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor_;
|
2015-09-28 16:53:55 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // PC_RTPRECEIVER_H_
|