diff options
author | methodus <methodus@web.de> | 2012-10-13 22:58:00 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-13 22:58:00 +0200 |
commit | 5ddef2b47d987323419a5411169dbb8a855f2e70 (patch) | |
tree | 6f07f31f337d6ab9693176c036c8898ef8ebc210 /include/tools | |
parent | b450015b9a6c0d35c264e93fbc9bcdf92538f47a (diff) | |
download | vdr-plugin-upnp-5ddef2b47d987323419a5411169dbb8a855f2e70.tar.gz vdr-plugin-upnp-5ddef2b47d987323419a5411169dbb8a855f2e70.tar.bz2 |
Added codec toolkit for getting detailed media information
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/codec.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/tools/codec.h b/include/tools/codec.h new file mode 100644 index 0000000..768fa15 --- /dev/null +++ b/include/tools/codec.h @@ -0,0 +1,53 @@ +/* + * codec.h + * + * Created on: 12.10.2012 + * Author: savop + */ + +#ifndef CODEC_H_ +#define CODEC_H_ + +#ifdef __cplusplus + #define __STDC_CONSTANT_MACROS + #ifdef _STDINT_H + #undef _STDINT_H + #endif + #include <stdint.h> +#endif + +extern "C" { +#include <libavcodec/avcodec.h> +#include <libavformat/avformat.h> +} + +#include <string> + +using namespace std; + +namespace upnp { + +namespace codec { + +class cFormatContext { +public: + cFormatContext(); + virtual ~cFormatContext(); + + bool Open(const string& file); + + const AVCodec* GetCodec(AVMediaType Type) const; + const AVCodecContext* GetCodecContext(AVMediaType Type) const; + const AVStream* GetStream(AVMediaType Type) const; + + AVFormatContext* operator*() const; +private: + AVFormatContext* formatCtx; +}; + +} + +} + + +#endif /* CODEC_H_ */ |