modules/rtp_rtcp/source/rtp_rtcp_impl2_unittest.cc
// Checks that the packet and byte counters from an RTCP SR are not zero once
// a frame is sent.
Checks that the packet and byte counters from an RTCP SR are not zero once
a frame is sent.
Checks that the packet and byte counters from an RTCP SR are not zero once a frame is sent .
TEST_P(RtpRtcpImpl2Test, SenderReportStatsPacketByteCounters) {
  using SenderReportStats = RtpRtcpInterface::SenderReportStats;
  EXPECT_TRUE(
      SendFrame(&sender_, sender_video_.get(), kBaseLayerTid, 0));
  ASSERT_THAT(sender_.transport_.rtp_packets_sent_, Gt(0));
  AdvanceTimeMs(1);
  ASSERT_THAT(sender_.impl_->SendRTCP(kRtcpReport), Eq(0));
  EXPECT_THAT(receiver_.impl_->GetSenderReportStats(),
              Optional(AllOf(Field(&SenderReportStats::packets_sent, Gt(0u)),
                             Field(&SenderReportStats::bytes_sent, Gt(0u)))));
}
TEST_P ( RtpRtcpImpl2Test , SenderReportStatsPacketByteCounters ) { using SenderReportStats = RtpRtcpInterface :: SenderReportStats ; EXPECT_TRUE ( SendFrame ( & sender_ , sender_video_ . get ( ) , kBaseLayerTid , 0 ) ) ; ASSERT_THAT ( sender_ . transport_ . rtp_packets_sent_ , Gt ( 0 ) ) ; AdvanceTimeMs ( 1 ) ; ASSERT_THAT ( sender_ . impl_ -> SendRTCP ( kRtcpReport ) , Eq ( 0 ) ) ; EXPECT_THAT ( receiver_ . impl_ -> GetSenderReportStats ( ) , Optional ( AllOf ( Field ( & SenderReportStats :: packets_sent , Gt ( 0u ) ) , Field ( & SenderReportStats :: bytes_sent , Gt ( 0u ) ) ) ) ) ; }
Checks that the packet and byte counters from an RTCP SR are not zero once
a frame is sent.
Checks that the packet and byte counters from an RTCP SR are not zero once a frame is sent .
// Send a frame in order to send an SR. /*timestamp=*/ // Advance time otherwise the RTCP SR report will not include any packets // generated by `SendFrame()`. // Send an SR.