Codec Kit: Introduce BCodecKit namespace

This commit is contained in:
Barrett17
2018-11-27 11:38:04 +01:00
parent 247414814e
commit d33bd9ec7b
39 changed files with 258 additions and 136 deletions
+7
View File
@@ -12,6 +12,9 @@
#include <SupportDefs.h>
namespace BCodecKit {
class BAdapterIO;
class RelativePositionIO;
@@ -95,4 +98,8 @@ private:
uint32 _reserved[5];
};
} // namespace BCodecKit
#endif // _ADAPTER_IO_H
+4 -5
View File
@@ -5,6 +5,7 @@
#ifndef _CODEC_ROSTER_H
#define _CODEC_ROSTER_H
#include <Decoder.h>
#include <Encoder.h>
#include <MediaDefs.h>
@@ -13,8 +14,7 @@
#include <Writer.h>
namespace BPrivate {
namespace media {
namespace BCodecKit {
class BCodecRoster {
@@ -118,9 +118,8 @@ public:
static status_t GetNextEncoder(int32* cookie, media_codec_info* _codecInfo);
};
} // namespace media
} // namespace BPrivate
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _CODEC_ROSTER_H
+8 -5
View File
@@ -8,9 +8,12 @@
#include "MediaPlugin.h"
namespace BPrivate { namespace media {
namespace BCodecKit {
namespace BPrivate {
class PluginManager;
}
class PluginManager;
class BChunkProvider {
public:
@@ -63,7 +66,7 @@ private:
BMediaPlugin* fMediaPlugin;
// needed for plug-in reference count management
friend class PluginManager;
friend class BCodecKit::BPrivate::PluginManager;
virtual void _ReservedDecoder1();
virtual void _ReservedDecoder2();
@@ -84,8 +87,8 @@ public:
size_t* count) = 0;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _DECODER_PLUGIN_H
+8 -6
View File
@@ -6,16 +6,18 @@
#define _ENCODER_PLUGIN_H
#include <MediaPlugin.h>
#include <MediaTrack.h>
#include <MediaFormats.h>
#include <View.h>
#include "MediaPlugin.h"
namespace BCodecKit {
namespace BPrivate { namespace media {
namespace BPrivate {
class PluginManager;
}
class PluginManager;
class BChunkWriter {
public:
@@ -94,7 +96,7 @@ private:
BMediaPlugin* fMediaPlugin;
// needed for plug-in reference count management
friend class PluginManager;
friend class BCodecKit::BPrivate::PluginManager;
virtual void _ReservedEncoder1();
virtual void _ReservedEncoder2();
@@ -139,8 +141,8 @@ public:
media_format* outputFormat) = 0;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
}
#endif // _ENCODER_PLUGIN_H
+3 -7
View File
@@ -14,12 +14,9 @@
#include <Reader.h>
namespace BPrivate {
namespace media {
namespace BCodecKit {
class ChunkCache;
struct chunk_buffer;
struct stream_info;
@@ -85,9 +82,8 @@ private:
uint32 fReserved[5];
};
} // namespace media
} // namespace BPrivate
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _MEDIA_EXTRACTOR_H
+7
View File
@@ -10,6 +10,9 @@
#include <SupportDefs.h>
namespace BCodecKit {
enum media_io_flags {
B_MEDIA_STREAMING = 0x00000001,
@@ -41,4 +44,8 @@ private:
uint32 _reserved[5];
};
} // namespace BCodecKit
#endif // _MEDIA_IO_H
+12 -8
View File
@@ -5,9 +5,15 @@
#ifndef _MEDIA_PLUGIN_H
#define _MEDIA_PLUGIN_H
#include <SupportDefs.h>
namespace BPrivate { namespace media {
namespace BCodecKit {
namespace BPrivate {
class PluginManager;
}
// TODO: Shouldn't this be a BReferenceable?
@@ -23,7 +29,7 @@ private:
int32 fRefCount;
// needed for plug-in reference count management
friend class PluginManager;
friend class BCodecKit::BPrivate::PluginManager;
virtual void _ReservedMediaPlugin1();
virtual void _ReservedMediaPlugin2();
@@ -31,13 +37,11 @@ private:
uint32 fReserved[5];
};
class BDecoder;
class BReader;
} } // namespace BPrivate::media
using namespace BPrivate::media;
extern "C" BMediaPlugin* instantiate_plugin();
} // namespace BCodecKit
#endif // _MEDIA_PLUGIN_H
+3 -7
View File
@@ -6,13 +6,11 @@
#define _MEDIA_STREAMER_H
#include <Streamer.h>
#include <Url.h>
#include "Streamer.h"
namespace BPrivate {
namespace media {
namespace BCodecKit {
class BMediaStreamer {
@@ -33,9 +31,7 @@ private:
};
}; // namespace media
}; // namespace BPrivate
} // namespace BCodecKit
using namespace BPrivate::media;
#endif
+3 -6
View File
@@ -5,6 +5,7 @@
#ifndef _MEDIA_WRITER_H
#define _MEDIA_WRITER_H
#include <Encoder.h>
#include <MetaData.h>
#include <Writer.h>
@@ -12,8 +13,7 @@
#include "TList.h"
namespace BPrivate {
namespace media {
namespace BCodecKit {
class BMediaWriter {
@@ -63,10 +63,7 @@ private:
};
}; // namespace media
}; // namespace BPrivate
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _MEDIA_WRITER_H
+3 -6
View File
@@ -2,7 +2,6 @@
* Copyright 2018, Dario Casalinuovo. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _META_DATA_H
#define _META_DATA_H
@@ -10,8 +9,7 @@
#include <Message.h>
namespace BPrivate {
namespace media {
namespace BCodecKit {
// Playback capabilities
@@ -114,9 +112,8 @@ private:
BMetaData(const BMetaData&);
};
} // namespace media
} // namespace BPrivate
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _META_DATA_H
+8 -6
View File
@@ -8,9 +8,12 @@
#include "MediaPlugin.h"
namespace BPrivate { namespace media {
namespace BCodecKit {
namespace BPrivate {
class PluginManager;
}
class PluginManager;
enum {
B_MEDIA_SEEK_TO_TIME = 0x10000,
@@ -62,8 +65,7 @@ private:
BMediaPlugin* fMediaPlugin;
// needed for plug-in reference count management
friend class PluginManager;
friend class MediaExtractor;
friend class BCodecKit::BPrivate::PluginManager;
virtual void _ReservedReader1();
virtual void _ReservedReader2();
@@ -80,8 +82,8 @@ public:
virtual BReader* NewReader() = 0;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _READER_PLUGIN_H
+6 -6
View File
@@ -12,9 +12,11 @@
#include "MediaPlugin.h"
namespace BPrivate { namespace media {
namespace BCodecKit {
class PluginManager;
namespace BPrivate {
class PluginManager;
}
class BStreamer {
@@ -28,8 +30,7 @@ protected:
private:
BMediaPlugin* fMediaPlugin;
friend class PluginManager;
friend class MediaStreamer;
friend class BCodecKit::BPrivate::PluginManager;
virtual void _ReservedStreamer1();
virtual void _ReservedStreamer2();
@@ -48,9 +49,8 @@ public:
virtual BStreamer* NewStreamer() = 0;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _STREAMER_PLUGIN_H
+9 -6
View File
@@ -6,9 +6,13 @@
#include "MediaPlugin.h"
namespace BPrivate { namespace media {
class PluginManager;
namespace BCodecKit {
namespace BPrivate {
class PluginManager;
}
class BWriter {
public:
@@ -51,7 +55,7 @@ private:
BMediaPlugin* fMediaPlugin;
// needed for plug-in reference count management
friend class PluginManager;
friend class BCodecKit::BPrivate::PluginManager;
friend class BMediaWriter;
virtual void _ReservedWriter1();
@@ -70,11 +74,10 @@ public:
virtual status_t GetSupportedFileFormats(
const media_file_format** _fileFormats,
size_t* _count) = 0;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
} // namespace BCodecKit
#endif // _WRITER_PLUGIN_H
+5 -9
View File
@@ -4,15 +4,11 @@
#include <MediaDefs.h>
#include <MediaFormats.h>
namespace BPrivate {
namespace BCodecKit {
class BDecoder;
}
namespace BPrivate {
namespace media {
class BDecoder;
class BDecoderPlugin;
}
}
class BMediaDecoder {
public:
@@ -47,8 +43,8 @@ class BMediaDecoder {
status_t AttachToDecoder();
BPrivate::media::BDecoder* fDecoder;
status_t fInitStatus;
BCodecKit::BDecoder* fDecoder;
status_t fInitStatus;
/* fbc data and virtuals */
+5 -2
View File
@@ -26,8 +26,9 @@
#include "TList.h"
namespace BCodecKit {
namespace BPrivate {
namespace media {
class AddOnManager {
public:
@@ -131,7 +132,9 @@ private:
static AddOnManager sInstance;
};
} // namespace media
} // namespace BPrivate
} // namespace BCodecKit
#endif // _ADD_ON_MANAGER_H
+8 -4
View File
@@ -20,7 +20,10 @@
#include "TList.h"
namespace BPrivate { namespace media {
namespace BCodecKit {
namespace BPrivate {
class PluginManager {
public:
@@ -87,10 +90,11 @@ private:
BLocker fLocker;
};
} } // namespace BPrivate::media
using namespace BPrivate::media;
} } // namespace BCodecKit::BPrivate
extern BCodecKit::BPrivate::PluginManager gPluginManager;
extern PluginManager gPluginManager;
#endif // _PLUGIN_MANAGER_H