libavformat/internal.h File Reference

#include <stdint.h>
#include "avformat.h"

Go to the source code of this file.

Defines

#define dynarray_add(tab, nb_ptr, elem)
#define NTP_OFFSET   2208988800ULL
#define NTP_OFFSET_US   (NTP_OFFSET * 1000000ULL)

Functions

void ff_dynarray_add (intptr_t **tab_ptr, int *nb_ptr, intptr_t elem)
time_t mktimegm (struct tm *tm)
struct tm * brktimegm (time_t secs, struct tm *tm)
const char * small_strptime (const char *p, const char *fmt, struct tm *dt)
char * ff_data_to_hex (char *buf, const uint8_t *src, int size, int lowercase)
void ff_program_add_stream_index (AVFormatContext *ac, int progid, unsigned int idx)
void ff_interleave_add_packet (AVFormatContext *s, AVPacket *pkt, int(*compare)(AVFormatContext *, AVPacket *, AVPacket *))
 Add packet to AVFormatContext->packet_buffer list, determining its interleaved position using compare() function argument.
void ff_read_frame_flush (AVFormatContext *s)
 Flush the frame reader.
uint64_t ff_ntp_time (void)
 Gets the current time since NTP epoch in microseconds.
int ff_probe_input_buffer (ByteIOContext **pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size)
 Probes a bytestream to determine the input format.
void ff_url_split (char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
 Splits a URL string into components.
int ff_url_join (char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...)
 Assembles a URL string from components.
void ff_sdp_write_media (char *buff, int size, AVCodecContext *c, const char *dest_addr, int port, int ttl)
 Appends the media-specific SDP fragment for the media stream c to the buffer buff.


Define Documentation

#define dynarray_add ( tab,
nb_ptr,
elem   ) 

Value:

do {\
    ff_dynarray_add((intptr_t **)(tab), nb_ptr, (intptr_t)(elem));\
} while(0)

Definition at line 38 of file internal.h.

Referenced by av_new_program(), ff_new_chapter(), matroska_parse_block(), mpegts_add_service(), and sdp_parse_line().

#define NTP_OFFSET   2208988800ULL

Definition at line 62 of file internal.h.

#define NTP_OFFSET_US   (NTP_OFFSET * 1000000ULL)

Definition at line 63 of file internal.h.

Referenced by ff_ntp_time(), and rtp_write_header().


Function Documentation

struct tm* brktimegm ( time_t  secs,
struct tm *  tm 
) [read]

Definition at line 68 of file cutils.c.

Referenced by dv_write_pack().

char* ff_data_to_hex ( char *  buf,
const uint8_t *  src,
int  size,
int  lowercase 
)

Definition at line 3520 of file utils.c.

Referenced by ff_rdt_calc_response_and_checksum(), and make_digest_auth().

void ff_dynarray_add ( intptr_t **  tab_ptr,
int *  nb_ptr,
intptr_t  elem 
)

Definition at line 25 of file cutils.c.

void ff_interleave_add_packet ( AVFormatContext s,
AVPacket pkt,
int(*)(AVFormatContext *, AVPacket *, AVPacket *)  compare 
)

Add packet to AVFormatContext->packet_buffer list, determining its interleaved position using compare() function argument.

Definition at line 2814 of file utils.c.

Referenced by av_interleave_packet_per_dts(), and ff_audio_rechunk_interleave().

uint64_t ff_ntp_time ( void   ) 

Gets the current time since NTP epoch in microseconds.

Definition at line 3165 of file utils.c.

Referenced by rtp_write_header(), and rtp_write_packet().

int ff_probe_input_buffer ( ByteIOContext **  pb,
AVInputFormat **  fmt,
const char *  filename,
void *  logctx,
unsigned int  offset,
unsigned int  max_probe_size 
)

Probes a bytestream to determine the input format.

Each time a probe returns with a score that is too low, the probe buffer size is increased and another attempt is made. When the maximum probe size is reached, the input format with the highest score is returned.

Parameters:
pb the bytestream to probe, it may be closed and opened again
fmt the input format is put here
filename the filename of the stream
logctx the log context
offset the offset within the bytestream to probe from
max_probe_size the maximum probe buffer size (zero for default)
Returns:
0 in case of success, a negative value corresponding to an AVERROR code otherwise

Definition at line 494 of file utils.c.

Referenced by av_open_input_file().

void ff_program_add_stream_index ( AVFormatContext ac,
int  progid,
unsigned int  idx 
)

Definition at line 2972 of file utils.c.

Referenced by pmt_cb().

void ff_read_frame_flush ( AVFormatContext s  ) 

Flush the frame reader.

Definition at line 1277 of file utils.c.

Referenced by av_seek_frame(), av_seek_frame_generic(), avformat_seek_file(), ff_restore_parser_state(), and search_hi_lo_keyframes().

void ff_sdp_write_media ( char *  buff,
int  size,
AVCodecContext c,
const char *  dest_addr,
int  port,
int  ttl 
)

Appends the media-specific SDP fragment for the media stream c to the buffer buff.

Note, the buffer needs to be initialized, since it is appended to existing content.

Parameters:
buff the buffer to append the SDP fragment to
size the size of the buff buffer
c the AVCodecContext of the media to describe
dest_addr the destination address of the media stream, may be NULL
port the destination port of the media stream, 0 if unknown
ttl the time to live of the stream, 0 if not multicast

Definition at line 373 of file sdp.c.

Referenced by mov_write_udta_sdp().

int ff_url_join ( char *  str,
int  size,
const char *  proto,
const char *  authorization,
const char *  hostname,
int  port,
const char *  fmt,
  ... 
)

Assembles a URL string from components.

This is the reverse operation of ff_url_split.

Note, this requires networking to be initialized, so the caller must ensure ff_network_init has been called.

See also:
ff_url_split
Parameters:
str the buffer to fill with the url
size the size of the str buffer
proto the protocol identifier, if null, the separator after the identifier is left out, too
authorization an optional authorization string, may be null
hostname the host name string
port the port number, left out from the string if negative
fmt a generic format string for everything to add after the host/port, may be null
Returns:
the number of characters written to the destination buffer

Definition at line 3556 of file utils.c.

Referenced by build_udp_url(), gen_connect(), gopher_open(), http_open_cnx(), rtmp_open(), rtp_set_remote_url(), and sdp_read_header().

void ff_url_split ( char *  proto,
int  proto_size,
char *  authorization,
int  authorization_size,
char *  hostname,
int  hostname_size,
int *  port_ptr,
char *  path,
int  path_size,
const char *  url 
)

Splits a URL string into components.

To reassemble components back into a URL, use ff_url_join instead of using snprintf directly.

The pointers to buffers for storing individual components may be null, in order to ignore that component. Buffers for components not found are set to empty strings. If the port isn't found, it is set to a negative value.

See also:
ff_url_join
Parameters:
proto the buffer for the protocol
proto_size the size of the proto buffer
authorization the buffer for the authorization
authorization_size the size of the authorization buffer
hostname the buffer for the host name
hostname_size the size of the hostname buffer
port_ptr a pointer to store the port number in
path the buffer for the path
path_size the size of the path buffer
url the URL to split

Definition at line 3459 of file utils.c.

Referenced by find_rtp_session_with_url(), gopher_open(), http_open_cnx(), rtmp_open(), rtp_open(), rtp_set_remote_url(), rtsp_cmd_describe(), rtsp_cmd_setup(), sdp_parse_line(), tcp_open(), udp_open(), and udp_set_remote_url().

time_t mktimegm ( struct tm *  tm  ) 

Definition at line 44 of file cutils.c.

Referenced by parse_date().

const char* small_strptime ( const char *  p,
const char *  fmt,
struct tm *  dt 
)

Definition at line 125 of file cutils.c.

Referenced by parse_date().


Generated on Fri Oct 26 02:36:52 2012 for FFmpeg by  doxygen 1.5.8