Cog/Plugins/FFMPEG/FFMPEGDecoder.h
Christopher Snowhill 39dcb88728 FFmpeg input: Support reading metadata
Where TagLib is not being employed, use FFmpeg to read tags where
possible. This allows reading tags from files like IFF. It reads it
through properties, otherwise allowing tag readers to function like
usual.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 15:29:13 -08:00

69 lines
1.2 KiB
Objective-C

//
// FFMPEGDecoder.h
// FFMPEG
//
// Created by Andre Reffhaug on 2/26/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "Plugin.h"
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
@interface FFMPEGDecoder : NSObject <CogDecoder> {
id<CogSource> source;
BOOL seekable;
int channels;
uint32_t channelConfig;
int bitsPerSample;
BOOL floatingPoint;
BOOL lossy;
float frequency;
long totalFrames;
long framesRead;
int bitrate;
@private
unsigned char *buffer;
AVIOContext *ioCtx;
int streamIndex;
AVFormatContext *formatCtx;
AVCodecContext *codecCtx;
AVFrame *lastDecodedFrame;
AVPacket *lastReadPacket;
BOOL rawDSD;
BOOL rawDSDReverseBits;
BOOL rawDSDPlanar;
int bytesConsumedFromDecodedFrame;
BOOL readNextPacket;
int64_t seekFrame;
int64_t skipSamples;
BOOL endOfStream;
BOOL endOfAudio;
int metadataIndex;
NSString *artist;
NSString *albumartist;
NSString *album;
NSString *title;
NSString *genre;
NSNumber *year;
NSNumber *track;
NSNumber *disc;
float replayGainAlbumGain;
float replayGainAlbumPeak;
float replayGainTrackGain;
float replayGainTrackPeak;
int attachedPicIndex;
NSData *albumArt;
NSDictionary *id3Metadata;
}
@end