hello all
I made an example using the mediasoup c++ library
but the number of packets sent never increases.
This may be due to
code like this
this->sendTransport = this->device.CreateSendTransport(
this,
sendTransportId,
CreateProducerTransport_response->JObject["iceParameters"],
CreateProducerTransport_response->JObject["iceCandidates"],
CreateProducerTransport_response->JObject["dtlsParameters"]);
if(this->device.CanProduce("video"))
{
std::cout<<"device can video"<<std::endl;
auto videoTrack = createVideoTrack(std::to_string(rtc::CreateRandomId()));
auto videoProd = this->sendTransport->Produce(this, videoTrack, nullptr, nullptr, nullptr);
while (true)
{
std::this_thread::sleep_for(std::chrono::milliseconds(3000));
std::cout<<"Video Track State : "<<videoProd->GetTrack()->state()<<std::endl;
std::cout<<"Stats : "<<videoProd->GetStats()<<std::endl;
}
}
stats output like this
[image]
[
{
"base64Certificate": "MIIBFzCBvaADAgECAgkA8DnhrX4X6qMwCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTIyMDEyOTE1NTcwM1oXDTIyMDMwMTE1NTcwM1owETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHaBbMG5hy541YfevmjgLvjwG2swU968hlllJ9L5VI7mzgtttQgErjldFinQMgF9FrPNxm3RV9jFDjcB3cK2rpTAKBggqhkjOPQQDAgNJADBGAiEAwDZJVJyifaCMPKNhKBP03hmQG9RPHQYp7NCxqCFkqAACIQDE48ZGsx8zALZCXsaMB+IC0WB8FoVcRSAMhyOwGTmrkw==",
"fingerprint": "5B:AE:6C:98:F8:19:70:5E:D0:D2:45:F1:A9:D5:75:EA:AF:9F:D4:0A:AC:75:48:1F:39:F2:C0:D6:C3:CA:C0:E1",
"fingerprintAlgorithm": "sha-256",
"id": "RTCCertificate_5B:AE:6C:98:F8:19:70:5E:D0:D2:45:F1:A9:D5:75:EA:AF:9F:D4:0A:AC:75:48:1F:39:F2:C0:D6:C3:CA:C0:E1",
"timestamp": 1643558229565216,
"type": "certificate"
},
{
"clockRate": 90000,
"id": "RTCCodec_0_Outbound_96",
"mimeType": "video/VP8",
"payloadType": 96,
"timestamp": 1643558229565216,
"transportId": "RTCTransport_0_1",
"type": "codec"
},
{
"bytesReceived": 0,
"bytesSent": 0,
"consentRequestsSent": 5,
"currentRoundTripTime": 0.001,
"id": "RTCIceCandidatePair_upTaEBCz_jcp5EcHU",
"localCandidateId": "RTCIceCandidate_upTaEBCz",
"nominated": true,
"priority": 4623781745793970000,
"remoteCandidateId": "RTCIceCandidate_jcp5EcHU",
"requestsReceived": 0,
"requestsSent": 1,
"responsesReceived": 6,
"responsesSent": 0,
"state": "succeeded",
"timestamp": 1643558229565216,
"totalRoundTripTime": 0.002,
"transportId": "RTCTransport_0_1",
"type": "candidate-pair",
"writable": true
},
{
"address": "127.0.0.1",
"candidateType": "host",
"id": "RTCIceCandidate_jcp5EcHU",
"ip": "127.0.0.1",
"isRemote": true,
"port": 46591,
"priority": 1076558079,
"protocol": "udp",
"timestamp": 1643558229565216,
"transportId": "RTCTransport_0_1",
"type": "remote-candidate"
},
{
"address": "192.168.1.103",
"candidateType": "host",
"id": "RTCIceCandidate_upTaEBCz",
"ip": "192.168.1.103",
"isRemote": false,
"networkType": "unknown",
"port": 40724,
"priority": 2122194687,
"protocol": "udp",
"timestamp": 1643558229565216,
"transportId": "RTCTransport_0_1",
"type": "local-candidate"
},
{
"detached": false,
"ended": false,
"frameHeight": 0,
"frameWidth": 0,
"framesSent": 0,
"hugeFramesSent": 0,
"id": "RTCMediaStreamTrack_sender_1",
"kind": "video",
"mediaSourceId": "RTCVideoSource_1",
"remoteSource": false,
"timestamp": 1643558229565216,
"trackIdentifier": "fb6b7d09-ca40-4964-b4fc-3f2167fb38f4",
"type": "track"
},
{
"bytesSent": 0,
"codecId": "RTCCodec_0_Outbound_96",
"encoderImplementation": "unknown",
"firCount": 0,
"framesEncoded": 0,
"framesSent": 0,
"headerBytesSent": 0,
"hugeFramesSent": 0,
"id": "RTCOutboundRTPVideoStream_250272703",
"keyFramesEncoded": 0,
"kind": "video",
"mediaSourceId": "RTCVideoSource_1",
"mediaType": "video",
"nackCount": 0,
"packetsSent": 0,
"pliCount": 0,
"qualityLimitationDurations": {
"bandwidth": 5793,
"cpu": 0,
"none": 212,
"other": 0
},
"qualityLimitationReason": "bandwidth",
"qualityLimitationResolutionChanges": 0,
"retransmittedBytesSent": 0,
"retransmittedPacketsSent": 0,
"ssrc": 250272703,
"timestamp": 1643558229565216,
"totalEncodeTime": 0,
"totalEncodedBytesTarget": 0,
"totalPacketSendDelay": 0,
"trackId": "RTCMediaStreamTrack_sender_1",
"transportId": "RTCTransport_0_1",
"type": "outbound-rtp"
},
{
"bytesReceived": 0,
"bytesSent": 0,
"dtlsState": "connecting",
"id": "RTCTransport_0_1",
"localCertificateId": "RTCCertificate_5B:AE:6C:98:F8:19:70:5E:D0:D2:45:F1:A9:D5:75:EA:AF:9F:D4:0A:AC:75:48:1F:39:F2:C0:D6:C3:CA:C0:E1",
"packetsReceived": 0,
"packetsSent": 0,
"selectedCandidatePairChanges": 2,
"selectedCandidatePairId": "RTCIceCandidatePair_upTaEBCz_jcp5EcHU",
"timestamp": 1643558229565216,
"type": "transport"
},
{
"frames": 30,
"framesPerSecond": 5,
"id": "RTCVideoSource_1",
"kind": "video",
"timestamp": 1643558229565216,
"trackIdentifier": "fb6b7d09-ca40-4964-b4fc-3f2167fb38f4",
"type": "media-source"
}
]