00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVFORMAT_INTERNAL_H
00022 #define AVFORMAT_INTERNAL_H
00023
00024 #include <stdint.h>
00025 #include "avformat.h"
00026
00027 void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
00028
00029 #ifdef __GNUC__
00030 #define dynarray_add(tab, nb_ptr, elem)\
00031 do {\
00032 __typeof__(tab) _tab = (tab);\
00033 __typeof__(elem) _elem = (elem);\
00034 (void)sizeof(**_tab == _elem); \
00035 ff_dynarray_add((intptr_t **)_tab, nb_ptr, (intptr_t)_elem);\
00036 } while(0)
00037 #else
00038 #define dynarray_add(tab, nb_ptr, elem)\
00039 do {\
00040 ff_dynarray_add((intptr_t **)(tab), nb_ptr, (intptr_t)(elem));\
00041 } while(0)
00042 #endif
00043
00044 time_t mktimegm(struct tm *tm);
00045 struct tm *brktimegm(time_t secs, struct tm *tm);
00046 const char *small_strptime(const char *p, const char *fmt,
00047 struct tm *dt);
00048
00049 char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase);
00050
00051 void ff_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);
00052
00057 void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
00058 int (*compare)(AVFormatContext *, AVPacket *, AVPacket *));
00059
00060 void ff_read_frame_flush(AVFormatContext *s);
00061
00062 #define NTP_OFFSET 2208988800ULL
00063 #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL)
00064
00066 uint64_t ff_ntp_time(void);
00067
00083 int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
00084 const char *filename, void *logctx,
00085 unsigned int offset, unsigned int max_probe_size);
00086
00109 void ff_url_split(char *proto, int proto_size,
00110 char *authorization, int authorization_size,
00111 char *hostname, int hostname_size,
00112 int *port_ptr,
00113 char *path, int path_size,
00114 const char *url);
00115
00136 int ff_url_join(char *str, int size, const char *proto,
00137 const char *authorization, const char *hostname,
00138 int port, const char *fmt, ...);
00139
00154 void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
00155 const char *dest_addr, int port, int ttl);
00156
00157 #endif