[FFmpeg-devel] [RFC] Synchronize the start times of multiple RTP streams

Ronald S. Bultje rsbultje
Sun Apr 4 17:52:14 CEST 2010


Hi Martin,

On Sat, Apr 3, 2010 at 4:34 PM, Martin Storsj? <martin at martin.st> wrote:
> The patches in the series are more or less incremental, as in, each give a
> small enhancement in behaviour - the more of them you use, the better
> things behave. :-)

I'm not sure what the RTP-Info part does, can you describe that?

> +                for (j = 0; j < reply->nb_rtp_info; j++) {
> +                    if (!strcmp(reply->rtp_info[j].url,
> +                                rt->rtsp_streams[i]->control_url)) {
> +                        rtpctx->base_timestamp = reply->rtp_info[i].rtptime;
> +                        break;
> +                    }
> +                }
> +                if (j >= reply->nb_rtp_info) {
> +                    // No rtp info for this stream?
> +                }

You could add an av_log() for those where setting it fails.

> +#define RTSP_RTP_INFO_MAX_STREAMS 5
[..]
> +typedef struct RTPStreamInfo {
> +    char url[1024];
> +    uint64_t seq;
> +    uint64_t rtptime;
> +} RTPStreamInfo;

[5] is a little low (I think it's per-stream), why not just directly
set it in the AVStream when it's given?

In general, I definitely think 1-2 are the way to go, and would want
ot test 3-4 to see what they do. I'd also like Luca (both)'s inputs,
they know the RFCs better than me.

Ronald



More information about the ffmpeg-devel mailing list