[vlc-devel] [PATCH 1/1] Supporting ONVIF Profile-G recording playback

Ross Finlayson finlayson at live555.com
Tue Aug 5 00:06:10 CEST 2014


>  /*****************************************************************************
> + * Format a time string for the RTSP header
> + 
> *****************************************************************************/
> +static char* makeRtspTime(char* buf, int buflen, mtime_t msecs) {
> +    time_t secs = msecs / 1000;
> +    if (secs <= 0) return NULL;
> +    strftime(buf, buflen, "%Y%m%dT%H%M%S.000Z", gmtime(&secs));
> +    return buf;
> +}

FYI, you should probably rename this function to be something like "makeISO8601Time()", and perhaps make it non-specific to the LIVE555 access module (and non-static), because this time format (YYYYMMDDHHMMSS.<fraction>) is defined in an ISO standard (ISO 8601) - which is referenced by the RTSP standard (RFC 2326).  The format is not specific to RTSP.

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140804/21ec9717/attachment.html>


More information about the vlc-devel mailing list