Hi All!

I have a question related to demuxing of incoming rtp stream by means of
libavformat.

1) My program has it own event loop (libevent) and I can't easily integrate
libavformat routines to reading from udp and tcp sockets straightforwardly
2) I already wrote custom IO routines and RTSP protocol negotiator
(communicates with other side and requests streaming from RTSP server to
local udp ports)

What I tried to do:

 ioBuffer_ = (unsigned char *)av_mallocz(_IO_BUFFER_SIZE
                                                +
FF_INPUT_BUFFER_PADDING_SIZE);

 ioContext_ = avio_alloc_context(ioBuffer_, _IO_BUFFER_SIZE,
           0, ptr, my_read, NULL, NULL);


 formatCtx_ = avformat_alloc_context();
 formatCtx_->flags |= AVFMT_FLAG_CUSTOM_IO | AVFMT_FLAG_NONBLOCK;
 formatCtx_->pb = ioContext_;
 res = avformat_open_input(&formatCtx_, "spf-avs", NULL, NULL);


my_read() - reads incoming raw RTP stream packets

Unfortunately constantly returns AVERROR(EAGAIN)

I just want to feed raw RTP data to libavformat for demuxing  purposes and
just get the pure videodata back for further processing

What should I do for to get it done?

Thanks in advance!

-- 
Be happy,
Best regards,
Dmitry Volyntsev
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to