chromium/third_party/ffmpeg/libavformat/utils.c

/*
 * various utility functions for use within FFmpeg
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include <stdint.h>

#include "config.h"

#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/time.h"

#include "libavcodec/internal.h"

#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#if CONFIG_NETWORK
#include "network.h"
#endif
#include "os_support.h"

/**
 * @file
 * various utility functions for use within FFmpeg
 */

// Chromium: We use the internal field first_dts vvv
int64_t av_stream_get_first_dts(const AVStream *st)
{}
// Chromium: We use the internal field first_dts ^^^

/* an arbitrarily chosen "sane" max packet size -- 50M */
#define SANE_CHUNK_SIZE

/* Read the data in sane-sized chunks and append to pkt.
 * Return the number of bytes read or an error. */
static int append_packet_chunked(AVIOContext *s, AVPacket *pkt, int size)
{}

int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
{}

int av_append_packet(AVIOContext *s, AVPacket *pkt, int size)
{}

int av_filename_number_test(const char *filename)
{}

/**********************************************************/

unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
{}

enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
{}

enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags)
{}

unsigned int av_codec_get_tag(const AVCodecTag *const *tags, enum AVCodecID id)
{}

int av_codec_get_tag2(const AVCodecTag * const *tags, enum AVCodecID id,
                      unsigned int *tag)
{}

enum AVCodecID av_codec_get_id(const AVCodecTag *const *tags, unsigned int tag)
{}

int ff_alloc_extradata(AVCodecParameters *par, int size)
{}

/*******************************************************/

uint64_t ff_ntp_time(void)
{}

uint64_t ff_get_formatted_ntp_time(uint64_t ntp_time_us)
{}

uint64_t ff_parse_ntp_time(uint64_t ntp_ts)
{}

int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
{}

int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
{}

void av_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_mkdir_p(const char *path)
{}

char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
{}

int ff_hex_to_data(uint8_t *data, const char *p)
{}

void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
                        void *context)
{}

int avformat_network_init(void)
{}

int avformat_network_deinit(void)
{}

int ff_is_http_proto(const char *filename) {}

int ff_bprint_to_codecpar_extradata(AVCodecParameters *par, struct AVBPrint *buf)
{}