• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavformat/internal.h

Go to the documentation of this file.
00001 /*
00002  * copyright (c) 2001 Fabrice Bellard
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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); /* check that types are compatible */\
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 /* AVFORMAT_INTERNAL_H */

Generated on Fri Sep 16 2011 17:17:38 for FFmpeg by  doxygen 1.7.1