FFmpeg
Loading...
Searching...
No Matches
reader.c File Reference
#include <stdio.h>
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/dict.h"
#include "libavutil/mem.h"
#include "libavcodec/bytestream.h"
#include "libavformat/avformat.h"
#include "libavformat/demux.h"
#include "libavformat/flac_picture.h"
#include "libavformat/internal.h"
#include "libavformat/metadata.h"
#include "libavformat/vorbis/comment.h"

Go to the source code of this file.

Functions

static int ogm_chapter (AVFormatContext *as, const uint8_t *key, const uint8_t *val)
 
int ff_vorbis_comment_read_stream (AVFormatContext *as, AVStream *st, const uint8_t *buf, int size)
 Parse Vorbis comments and add metadata to an AVStream.
 
static int vorbis_parse_single_comment (AVFormatContext *as, AVDictionary **m, const uint8_t *buf, uint32_t size, int *updates, int parse_picture)
 This function temporarily modifies the (const qualified) input buffer and reverts its changes before return.
 
int ff_vorbis_comment_read (AVFormatContext *as, AVDictionary **m, const uint8_t *buf, int size, int parse_picture)
 Parse Vorbis comments.
 

Function Documentation

◆ ogm_chapter()

static int ogm_chapter ( AVFormatContext * as,
const uint8_t * key,
const uint8_t * val )
static

Definition at line 42 of file reader.c.

Referenced by vorbis_parse_single_comment().

◆ ff_vorbis_comment_read_stream()

int ff_vorbis_comment_read_stream ( AVFormatContext * as,
AVStream * st,
const uint8_t * buf,
int size )

Parse Vorbis comments and add metadata to an AVStream.

Note
The buffer will be temporarily modified by this function, so it needs to be writable. Furthermore it must be padded by a single byte (not counted in size). All changes will have been reverted upon return.

Definition at line 73 of file reader.c.

Referenced by ff_vorbis_update_metadata(), flac_header(), ogm_header(), opus_header(), speex_header(), theora_header(), and vp8_header().

◆ vorbis_parse_single_comment()

static int vorbis_parse_single_comment ( AVFormatContext * as,
AVDictionary ** m,
const uint8_t * buf,
uint32_t size,
int * updates,
int parse_picture )
static

This function temporarily modifies the (const qualified) input buffer and reverts its changes before return.

The input buffer needs to have at least one byte of padding.

Definition at line 90 of file reader.c.

Referenced by ff_vorbis_comment_read().

◆ ff_vorbis_comment_read()

int ff_vorbis_comment_read ( AVFormatContext * ms,
AVDictionary ** m,
const uint8_t * buf,
int size,
int parse_picture )

Parse Vorbis comments.

Note
The buffer will be temporarily modified by this function, so it needs to be writable. Furthermore it must be padded by a single byte (not counted in size). All changes will have been reverted upon return.

Definition at line 148 of file reader.c.

Referenced by ff_vorbis_comment_read_stream(), and flac_read_header().