X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Finternal.h;h=72f15d3362741ae79f3eb0fdd560a54c160873f0;hb=80e4fe4063001d0cf468d5f4c7c02ba5b04484b7;hp=0f121a0d5e832ad6772a2f5d935e25ff6573f5f9;hpb=80d156d7fdc44b09783ba242fe2681a6d4cc8df5;p=ffmpeg diff --git a/libavformat/internal.h b/libavformat/internal.h index 0f121a0d5e8..72f15d33627 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -26,6 +26,12 @@ #define MAX_URL_SIZE 4096 +#ifdef DEBUG +# define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size) +#else +# define hex_dump_debug(class, buf, size) +#endif + typedef struct AVCodecTag { enum CodecID id; unsigned int tag; @@ -100,7 +106,7 @@ uint64_t ff_ntp_time(void); */ int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, - int port, const char *fmt, ...); + int port, const char *fmt, ...) av_printf_format(7, 8); /** * Append the media-specific SDP fragment for the media stream c @@ -116,11 +122,12 @@ int ff_url_join(char *str, int size, const char *proto, * @param dest_type the destination address type, may be NULL * @param port the destination port of the media stream, 0 if unknown * @param ttl the time to live of the stream, 0 if not multicast - * @param flags the AVFormatContext->flags, modifying the generated SDP + * @param fmt the AVFormatContext, which might contain options modifying + * the generated SDP */ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, - int port, int ttl, int flags); + int port, int ttl, AVFormatContext *fmt); /** * Write a packet to another muxer than the one the user originally @@ -148,14 +155,14 @@ void ff_put_v(AVIOContext *bc, uint64_t val); /** * Read a whole line of text from AVIOContext. Stop reading after reaching - * either a \n, a \0 or EOF. The returned string is always \0 terminated, + * either a \\n, a \\0 or EOF. The returned string is always \\0-terminated, * and may be truncated if the buffer is too small. * * @param s the read-only AVIOContext * @param buf buffer to store the read line * @param maxlen size of the buffer * @return the length of the string written in the buffer, not including the - * final \0 + * final \\0 */ int ff_get_line(AVIOContext *s, char *buf, int maxlen); @@ -239,4 +246,9 @@ void ff_make_absolute_url(char *buf, int size, const char *base, enum CodecID ff_guess_image2_codec(const char *filename); +/** + * Convert a date string in ISO8601 format to Unix timestamp. + */ +int64_t ff_iso8601_to_unix_time(const char *datestr); + #endif /* AVFORMAT_INTERNAL_H */