54 db = strtol(
value, &fraction, 0);
55 if (*fraction++ ==
'.') {
57 mb +=
scale * (*fraction -
'0');
63 if (llabs(db) > (INT32_MAX -
mb) / 100000)
66 return db * 100000 + sign *
mb;
75 if (tg == INT32_MIN && ag == INT32_MIN)
81 sizeof(*replaygain), 0);
static int FUNC metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
AVPacketSideData * av_packet_side_data_new(AVPacketSideData **psd, int *pnb_sd, enum AVPacketSideDataType type, size_t size, int flags)
Allocate a new packet side data.
@ AV_PKT_DATA_REPLAYGAIN
This side data should be associated with an audio stream and contains ReplayGain information in form ...
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
static av_const int av_isdigit(int c)
Locale-independent conversion of ASCII isdigit.
static void scale(int *out, const int *in, const int w, const int h, const int shift)
int ff_replaygain_export(AVStream *st, AVDictionary *metadata)
Parse replaygain tags and export them as per-stream side data.
int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, int32_t ag, uint32_t ap)
Export already decoded replaygain values as per-stream side data.
static int32_t parse_value(const char *value, int32_t min)
int nb_coded_side_data
Amount of entries in coded_side_data.
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1....
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
uint32_t album_peak
Same as track_peak, but for the whole album,.
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
int32_t album_gain
Same as track_gain, but for the whole album.
AVCodecParameters * codecpar
Codec parameters associated with this stream.