Added clean and empty decoder/reader add-on code :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6128 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
SubDir OBOS_TOP src add-ons media plugins musepack ;
|
||||
|
||||
UsePrivateHeaders media ;
|
||||
|
||||
Addon musepack : media plugins :
|
||||
MusePack.cpp
|
||||
MusePackReader.cpp
|
||||
MusePackDecoder.cpp
|
||||
: false
|
||||
: libmusepack.a
|
||||
;
|
||||
|
||||
LinkSharedOSLibs musepack : be libmedia.so ;
|
||||
|
||||
SubInclude OBOS_TOP src add-ons media plugins musepack mpc ;
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include "MusePack.h"
|
||||
#include "MusePackReader.h"
|
||||
#include "MusePackDecoder.h"
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <InterfaceDefs.h>
|
||||
|
||||
|
||||
Reader *
|
||||
MusePackPlugin::NewReader()
|
||||
{
|
||||
return new MusePackReader();
|
||||
}
|
||||
|
||||
Decoder *
|
||||
MusePackPlugin::NewDecoder()
|
||||
{
|
||||
return new MusePackDecoder();
|
||||
}
|
||||
|
||||
status_t
|
||||
MusePackPlugin::RegisterPlugin()
|
||||
{
|
||||
PublishDecoder("audiocodec/musepack", "musepack", "musepack decoder");
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
MediaPlugin *
|
||||
instantiate_plugin()
|
||||
{
|
||||
return new MusePackPlugin();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef MUSEPACK_PLUGIN_H
|
||||
#define MUSEPACK_PLUGIN_H
|
||||
|
||||
|
||||
#include "ReaderPlugin.h"
|
||||
#include "DecoderPlugin.h"
|
||||
|
||||
|
||||
class MusePackPlugin : public ReaderPlugin, DecoderPlugin {
|
||||
public:
|
||||
Reader *NewReader();
|
||||
|
||||
Decoder *NewDecoder();
|
||||
status_t RegisterPlugin();
|
||||
};
|
||||
|
||||
#endif /* MUSEPACK_PLUGIN_H */
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include "MusePackDecoder.h"
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <InterfaceDefs.h>
|
||||
|
||||
|
||||
MusePackDecoder::MusePackDecoder()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MusePackDecoder::~MusePackDecoder()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackDecoder::Setup(media_format *ioEncodedFormat, const void *infoBuffer, int32 infoSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackDecoder::NegotiateOutputFormat(media_format *ioDecodedFormat)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackDecoder::Seek(uint32 seekTo, int64 seekFrame, int64 *frame, bigtime_t seekTime, bigtime_t *time)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackDecoder::Decode(void *buffer, int64 *frameCount, media_header *mediaHeader, media_decode_info *info)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef MUSEPACK_DECODER_H
|
||||
#define MUSEPACK_DECODER_H
|
||||
|
||||
|
||||
#include "DecoderPlugin.h"
|
||||
#include <MediaFormats.h>
|
||||
|
||||
|
||||
class MusePackDecoder : public Decoder {
|
||||
public:
|
||||
MusePackDecoder();
|
||||
~MusePackDecoder();
|
||||
|
||||
status_t Setup(media_format *ioEncodedFormat,
|
||||
const void *infoBuffer, int32 infoSize);
|
||||
|
||||
status_t NegotiateOutputFormat(media_format *ioDecodedFormat);
|
||||
|
||||
status_t Seek(uint32 seekTo, int64 seekFrame, int64 *frame,
|
||||
bigtime_t seekTime, bigtime_t *time);
|
||||
|
||||
status_t Decode(void *buffer, int64 *frameCount,
|
||||
media_header *mediaHeader, media_decode_info *info);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MUSEPACK_DECODER_H */
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include "MusePackReader.h"
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <InterfaceDefs.h>
|
||||
|
||||
|
||||
MusePackReader::MusePackReader()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MusePackReader::~MusePackReader()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
MusePackReader::Copyright()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::Sniff(int32 *streamCount)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MusePackReader::GetFileFormatInfo(media_file_format *mff)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::AllocateCookie(int32 streamNumber, void **cookie)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::FreeCookie(void *cookie)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, media_format *format, void **infoBuffer, int32 *infoSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::Seek(void *cookie, uint32 seekTo, int64 *frame, bigtime_t *time)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
MusePackReader::GetNextChunk(void *cookie, void **chunkBuffer, int32 *chunkSize, media_header *mediaHeader)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef MUSEPACK_READER_H
|
||||
#define MUSEPACK_READER_H
|
||||
|
||||
|
||||
#include "ReaderPlugin.h"
|
||||
#include <MediaFormats.h>
|
||||
|
||||
|
||||
class MusePackReader : public Reader {
|
||||
public:
|
||||
MusePackReader();
|
||||
~MusePackReader();
|
||||
|
||||
const char *Copyright();
|
||||
|
||||
status_t Sniff(int32 *streamCount);
|
||||
|
||||
void GetFileFormatInfo(media_file_format *mff);
|
||||
|
||||
status_t AllocateCookie(int32 streamNumber, void **cookie);
|
||||
status_t FreeCookie(void *cookie);
|
||||
|
||||
status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration,
|
||||
media_format *format, void **infoBuffer, int32 *infoSize);
|
||||
|
||||
status_t Seek(void *cookie, uint32 seekTo,
|
||||
int64 *frame, bigtime_t *time);
|
||||
|
||||
status_t GetNextChunk(void *cookie, void **chunkBuffer, int32 *chunkSize,
|
||||
media_header *mediaHeader);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MUSEPACK_READER_H */
|
||||
Reference in New Issue
Block a user