#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. |
#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(), rtsp_setup_output_streams(), and sdp_parse_line().
#define NTP_OFFSET 2208988800ULL |
Definition at line 62 of file internal.h.
#define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) |
struct tm* brktimegm | ( | time_t | secs, | |
struct tm * | tm | |||
) | [read] |
char* ff_data_to_hex | ( | char * | buf, | |
const uint8_t * | src, | |||
int | size, | |||
int | lowercase | |||
) |
Definition at line 3482 of file utils.c.
Referenced by extradata2config(), ff_rdt_calc_response_and_checksum(), and make_digest_auth().
void ff_dynarray_add | ( | intptr_t ** | tab_ptr, | |
int * | nb_ptr, | |||
intptr_t | elem | |||
) |
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 2776 of file utils.c.
Referenced by av_interleave_packet_per_dts(), ff_audio_rechunk_interleave(), and ogg_interleave_per_granule().
uint64_t ff_ntp_time | ( | void | ) |
Gets the current time since NTP epoch in microseconds.
Definition at line 3127 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.
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) |
Definition at line 464 of file utils.c.
Referenced by av_open_input_file().
void ff_program_add_stream_index | ( | AVFormatContext * | ac, | |
int | progid, | |||
unsigned int | idx | |||
) |
void ff_read_frame_flush | ( | AVFormatContext * | s | ) |
Flush the frame reader.
Definition at line 1247 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().
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.
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 |
Definition at line 3518 of file utils.c.
Referenced by build_udp_url(), ff_rtsp_connect(), gen_connect(), gopher_open(), http_open_cnx(), make_setup_request(), rtmp_open(), rtp_set_remote_url(), rtsp_setup_output_streams(), 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.
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 3421 of file utils.c.
Referenced by ff_rtsp_connect(), 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_get_address(), sdp_parse_line(), tcp_open(), udp_open(), and udp_set_remote_url().
time_t mktimegm | ( | struct tm * | tm | ) |
const char* small_strptime | ( | const char * | p, | |
const char * | fmt, | |||
struct tm * | dt | |||
) |