#include <stdint.h>#include "avformat.h"Go to the source code of this file.
Data Structures | |
| struct | AVCodecTag |
Defines | |
| #define | MAX_URL_SIZE 4096 |
| #define | dynarray_add(tab, nb_ptr, elem) |
| #define | NTP_OFFSET 2208988800ULL |
| #define | NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) |
| #define | SPACE_CHARS " \t\r\n" |
Typedefs | |
| typedef void(* | ff_parse_key_val_cb )(void *context, const char *key, int key_len, char **dest, int *dest_len) |
| Callback function type for ff_parse_key_value. | |
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) |
| int | ff_hex_to_data (uint8_t *data, const char *p) |
| Parse a string of hexadecimal strings. | |
| 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) |
| Get 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) |
| Probe 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) |
| int | ff_url_join (char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...) |
| Assemble a URL string from components. | |
| void | ff_sdp_write_media (char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl) |
| Append the media-specific SDP fragment for the media stream c to the buffer buff. | |
| int | ff_write_chained (AVFormatContext *dst, int dst_stream, AVPacket *pkt, AVFormatContext *src) |
| Write a packet to another muxer than the one the user originally intended. | |
| int | ff_get_v_length (uint64_t val) |
| Get the length in bytes which is needed to store val as v. | |
| void | ff_put_v (ByteIOContext *bc, uint64_t val) |
| Put val using a variable number of bytes. | |
| int | ff_get_line (ByteIOContext *s, char *buf, int maxlen) |
| Read a whole line of text from ByteIOContext. | |
| void | ff_parse_key_value (const char *str, ff_parse_key_val_cb callback_get_buf, void *context) |
| Parse a string with comma-separated key=value pairs. | |
| int | ff_find_stream_index (AVFormatContext *s, int id) |
| Find stream index based on format-specific stream ID. | |
| #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 45 of file internal.h.
Referenced by av_new_program(), ff_new_chapter(), ff_rtsp_setup_output_streams(), matroska_parse_block(), mpegts_add_service(), new_variant(), and parse_playlist().
| #define MAX_URL_SIZE 4096 |
Definition at line 27 of file internal.h.
| #define NTP_OFFSET 2208988800ULL |
Definition at line 79 of file internal.h.
| #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) |
| #define SPACE_CHARS " \t\r\n" |
Definition at line 197 of file internal.h.
Referenced by ff_hex_to_data(), ff_rtsp_parse_line(), get_word(), get_word_until_chars(), process_line(), rtsp_parse_range(), rtsp_parse_range_npt(), rtsp_parse_rtp_info(), and rtsp_parse_transport().
| typedef void(* ff_parse_key_val_cb)(void *context, const char *key, int key_len, char **dest, int *dest_len) |
Callback function type for ff_parse_key_value.
| key | a pointer to the key | |
| key_len | the number of bytes that belong to the key, including the '=' char | |
| dest | return the destination pointer for the value in *dest, may be null to ignore the value | |
| dest_len | the length of the *dest buffer |
Definition at line 209 of file internal.h.
| 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 3693 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 | |||
| ) |
| int ff_find_stream_index | ( | AVFormatContext * | s, | |
| int | id | |||
| ) |
Find stream index based on format-specific stream ID.
Definition at line 3874 of file utils.c.
Referenced by get_sindex(), and parse_chunks().
| int ff_get_line | ( | ByteIOContext * | s, | |
| char * | buf, | |||
| int | maxlen | |||
| ) |
Read a whole line of text from ByteIOContext.
Stop reading after reaching either a
, a or EOF. The returned string is always terminated, and may be truncated if the buffer is too small.
| s | the read-only ByteIOContext | |
| buf | buffer to store the read line | |
| maxlen | size of the buffer |
Definition at line 563 of file aviobuf.c.
Referenced by read_chomp_line(), read_header(), and srt_read_packet().
| int ff_get_v_length | ( | uint64_t | val | ) |
Get the length in bytes which is needed to store val as v.
Definition at line 276 of file aviobuf.c.
Referenced by ff_put_v(), and write_packet().
| int ff_hex_to_data | ( | uint8_t * | data, | |
| const char * | p | |||
| ) |
Parse a string of hexadecimal strings.
Any space between the hexadecimal digits is ignored.
| data | if non-null, the parsed data is written to this pointer | |
| p | the string to parse |
Definition at line 3714 of file utils.c.
Referenced by parse_fmtp_config().
| 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 2967 of file utils.c.
Referenced by av_interleave_packet_per_dts(), and ff_audio_rechunk_interleave().
| uint64_t ff_ntp_time | ( | void | ) |
Get the current time since NTP epoch in microseconds.
Definition at line 3320 of file utils.c.
Referenced by rtp_write_header(), and rtp_write_packet().
| void ff_parse_key_value | ( | const char * | str, | |
| ff_parse_key_val_cb | callback_get_buf, | |||
| void * | context | |||
| ) |
Parse a string with comma-separated key=value pairs.
The value strings may be quoted and may contain escaped characters within quoted strings.
| str | the string to parse | |
| callback_get_buf | function that returns where to store the unescaped value string. | |
| context | the opaque context pointer to pass to callback_get_buf |
Definition at line 3820 of file utils.c.
Referenced by ff_http_auth_handle_header(), and parse_playlist().
| int ff_probe_input_buffer | ( | ByteIOContext ** | pb, | |
| AVInputFormat ** | fmt, | |||
| const char * | filename, | |||
| void * | logctx, | |||
| unsigned int | offset, | |||
| unsigned int | max_probe_size | |||
| ) |
Probe 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 527 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_put_v | ( | ByteIOContext * | bc, | |
| uint64_t | val | |||
| ) |
Put val using a variable number of bytes.
Definition at line 285 of file aviobuf.c.
Referenced by put_packet(), put_s(), put_str(), put_tt(), write_globalinfo(), write_mainheader(), write_packet(), write_streamheader(), and write_streaminfo().
| void ff_read_frame_flush | ( | AVFormatContext * | s | ) |
Flush the frame reader.
Definition at line 1316 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, | |||
| const char * | dest_type, | |||
| int | port, | |||
| int | ttl | |||
| ) |
Append 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.
| 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 | |
| dest_type | the destination address type, 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 450 of file sdp.c.
Referenced by avf_sdp_create(), and 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, | |||
| ... | ||||
| ) |
Assemble a URL string from components.
This is the reverse operation of av_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. An empty string is treated the same as a null string. | |
| 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 3757 of file utils.c.
Referenced by build_udp_url(), ff_rtsp_connect(), ff_rtsp_setup_output_streams(), gen_connect(), gopher_open(), http_open_cnx(), make_setup_request(), mms_open(), mmsh_open(), rtmp_open(), rtp_set_remote_url(), sap_read_header(), sap_write_header(), 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 | |||
| ) |
| int ff_write_chained | ( | AVFormatContext * | dst, | |
| int | dst_stream, | |||
| AVPacket * | pkt, | |||
| AVFormatContext * | src | |||
| ) |
Write a packet to another muxer than the one the user originally intended.
Useful when chaining muxers, where one muxer internally writes a received packet to another muxer.
| dst | the muxer to write the packet to | |
| dst_stream | the stream index within dst to write the packet to | |
| pkt | the packet to be written | |
| src | the muxer the packet originally was intended for |
Definition at line 3802 of file utils.c.
Referenced by ff_mov_add_hinted_packet(), rtsp_write_packet(), and sap_write_packet().
| time_t mktimegm | ( | struct tm * | tm | ) |
| const char* small_strptime | ( | const char * | p, | |
| const char * | fmt, | |||
| struct tm * | dt | |||
| ) |
1.5.6