FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
chromaprint.c File Reference
#include "avformat.h"
#include "libavutil/opt.h"
#include "libavcodec/internal.h"
#include <chromaprint.h>

Go to the source code of this file.

Data Structures

struct  ChromaprintMuxContext
 

Macros

#define CPR_VERSION_INT
 
#define OFFSET(x)   offsetof(ChromaprintMuxContext, x)
 
#define FLAGS   AV_OPT_FLAG_ENCODING_PARAM
 

Enumerations

enum  FingerprintFormat { FINGERPRINT_RAW, FINGERPRINT_COMPRESSED, FINGERPRINT_BASE64 }
 

Functions

static void cleanup (ChromaprintMuxContext *cpr)
 
static int write_header (AVFormatContext *s)
 
static int write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass chromaprint_class
 
AVOutputFormat ff_chromaprint_muxer
 

Macro Definition Documentation

#define CPR_VERSION_INT
Value:
AV_VERSION_INT(CHROMAPRINT_VERSION_MAJOR, \
CHROMAPRINT_VERSION_MINOR, \
CHROMAPRINT_VERSION_PATCH)
#define AV_VERSION_INT(a, b, c)
Definition: version.h:35

Definition at line 27 of file chromaprint.c.

#define OFFSET (   x)    offsetof(ChromaprintMuxContext, x)

Definition at line 157 of file chromaprint.c.

#define FLAGS   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 158 of file chromaprint.c.

Enumeration Type Documentation

Enumerator
FINGERPRINT_RAW 
FINGERPRINT_COMPRESSED 
FINGERPRINT_BASE64 

Definition at line 31 of file chromaprint.c.

Function Documentation

static void cleanup ( ChromaprintMuxContext cpr)
static

Definition at line 45 of file chromaprint.c.

Referenced by write_header(), and write_trailer().

static int write_header ( AVFormatContext s)
static

Definition at line 54 of file chromaprint.c.

static int write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 109 of file chromaprint.c.

static int write_trailer ( AVFormatContext s)
static

Definition at line 115 of file chromaprint.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "silence_threshold", "threshold for detecting silence", OFFSET(silence_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 32767, FLAGS },
{ "algorithm", "version of the fingerprint algorithm", OFFSET(algorithm), AV_OPT_TYPE_INT, { .i64 = CHROMAPRINT_ALGORITHM_DEFAULT }, CHROMAPRINT_ALGORITHM_TEST1, INT_MAX, FLAGS },
{ "fp_format", "fingerprint format to write", OFFSET(fp_format), AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, FINGERPRINT_BASE64, FLAGS },
{ "raw", "binary raw fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_RAW }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
{ "compressed", "binary compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_COMPRESSED }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
{ "base64", "Base64 compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_BASE64 }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: chromaprint.c:158
#define OFFSET(x)
Definition: chromaprint.c:157

Definition at line 159 of file chromaprint.c.

const AVClass chromaprint_class
static
Initial value:
= {
.class_name = "chromaprint muxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:70
av_default_item_name
static const AVOption options[]
Definition: chromaprint.c:159

Definition at line 169 of file chromaprint.c.

AVOutputFormat ff_chromaprint_muxer
Initial value:
= {
.name = "chromaprint",
.long_name = NULL_IF_CONFIG_SMALL("Chromaprint"),
.priv_data_size = sizeof(ChromaprintMuxContext),
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
.priv_class = &chromaprint_class,
}
static int write_header(AVFormatContext *s)
Definition: chromaprint.c:54
static int write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: chromaprint.c:109
#define AV_NE(be, le)
Definition: common.h:50
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:485
static const AVClass chromaprint_class
Definition: chromaprint.c:169
static int write_trailer(AVFormatContext *s)
Definition: chromaprint.c:115

Definition at line 176 of file chromaprint.c.