[libav-api] Extract RTCP stats from AVFormatContext

Éloi Bail eloi.bail at savoirfairelinux.com
Mon Aug 10 20:12:40 CEST 2015

Hi all,

I work on an open source Audio/Video communication software sending/receiving RTP streams. RTCP is enabled and RTCP reports between peers are successfully exchanged over network and given to ffmpeg.

I would like to regularly extract RTCP report in my app to monitor for example packet dropping.  RTPStatistics struct looks to be good.

I looked to ffmpeg code and could not find a way to expose it from AVFormatContext . I would like to do something like this :

 RTSPState* rtsp_state = (RTSPState*) <my AVFormatContext struct> ->priv_data;              
 RTSPStream* rtsp_stream = rtsp_state->rtsp_streams[0];                  
 RTPDemuxContext* rtp_demux_context = (RTPDemuxContext*) rtsp_stream->transport_priv;                                                               
 RTPStatistics stat = rtp_demux_context->statistics;                     

But all those struct are not exposed. 

Could someone tell me if I am wrong ? Would it be a good idea to expose it by av_dict_set ?



Eloi BAIL 
Consultant en logiciel libre 
Savoir-faire Linux 
Tel: + 1 (514) 276 5468 ext. 175

More information about the libav-api mailing list