GetStats on local video track, iOS

151 views
Skip to first unread message

Michael Siddi

unread,
Apr 10, 2017, 1:33:29 PM4/10/17
to discuss-webrtc
I was filing a bug but I think it's better to ask here for help, maybe I'm doing something wrong.
I cannot get the stats for my local video track but I can for my audio track and both the audio and video remote tracks.

What steps will reproduce the problem?
1. start a call, ensure that the peers see each other
2. get your video local track object from the RTCRtpSender object you created
3. and pass it to the peerConnection -statsForTrack:statsOutputLevel:completionHandler: method

What is the expected result?
the stats for the local video track

What do you see instead?
(peerconnection.cc:892): GetStats is called with an invalid track STREAMv0

What version of the product are you using? On what operating system?
Webrtc that ships with chrome 56

Please provide any additional information below.
Querying the [[[peerconnection localStreams] firstObject] videoTracks] returns zero tracks but the video track's owner can be found in the [peerconnection senders] array.

Thank you very much,
Michael

Taylor Brandstetter

unread,
Apr 10, 2017, 2:28:13 PM4/10/17
to discuss-webrtc
Is the RTCRtpSender created directly, using "senderWithKind", or through "addStream"? If you're using "senderWithKind", you may have found a bug. It appears getStats may only be working with track selectors when the track is added through "addStream".

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b800a725-3ab0-4506-93d4-851136874972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Siddi

unread,
Apr 10, 2017, 2:31:51 PM4/10/17
to discuss-webrtc
Yes, the RTCRtpSender is created with [self.peerConnection senderWithKind:kRTCMediaStreamTrackKindVideo streamId:kMediaStreamId].

Thank you for your answer, I'll file a bug then!

Michael



On Monday, April 10, 2017 at 8:28:13 PM UTC+2, Taylor Brandstetter wrote:
Is the RTCRtpSender created directly, using "senderWithKind", or through "addStream"? If you're using "senderWithKind", you may have found a bug. It appears getStats may only be working with track selectors when the track is added through "addStream".
On Mon, Apr 10, 2017 at 10:33 AM, Michael Siddi <msi...@praxic.it> wrote:
I was filing a bug but I think it's better to ask here for help, maybe I'm doing something wrong.
I cannot get the stats for my local video track but I can for my audio track and both the audio and video remote tracks.

What steps will reproduce the problem?
1. start a call, ensure that the peers see each other
2. get your video local track object from the RTCRtpSender object you created
3. and pass it to the peerConnection -statsForTrack:statsOutputLevel:completionHandler: method

What is the expected result?
the stats for the local video track

What do you see instead?
(peerconnection.cc:892): GetStats is called with an invalid track STREAMv0

What version of the product are you using? On what operating system?
Webrtc that ships with chrome 56

Please provide any additional information below.
Querying the [[[peerconnection localStreams] firstObject] videoTracks] returns zero tracks but the video track's owner can be found in the [peerconnection senders] array.

Thank you very much,
Michael

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages