summaryrefslogtreecommitdiffstats
path: root/loader/dshow/DS_VideoDecoder.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-21 23:42:06 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-21 23:42:06 +0000
commit937a031d525545f8cc39d2f968343450dd731c23 (patch)
tree4387ef37cd5d1f7c68901d1024c3f2c293c76282 /loader/dshow/DS_VideoDecoder.h
parentbcdb01b14369a8554ab9f01e011ff0ce81d8a91f (diff)
downloadmpv-937a031d525545f8cc39d2f968343450dd731c23.tar.bz2
mpv-937a031d525545f8cc39d2f968343450dd731c23.tar.xz
imported from xine
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3060 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/DS_VideoDecoder.h')
-rw-r--r--loader/dshow/DS_VideoDecoder.h68
1 files changed, 43 insertions, 25 deletions
diff --git a/loader/dshow/DS_VideoDecoder.h b/loader/dshow/DS_VideoDecoder.h
index 6acd820162..ba97162da4 100644
--- a/loader/dshow/DS_VideoDecoder.h
+++ b/loader/dshow/DS_VideoDecoder.h
@@ -1,37 +1,55 @@
#ifndef AVIFILE_DS_VIDEODECODER_H
#define AVIFILE_DS_VIDEODECODER_H
-#include <libwin32.h>
-#include <DS_Filter.h>
+#ifndef NOAVIFILE_HEADERS
+#include "videodecoder.h"
+#else
+#include "../libwin32.h"
+#endif
+#include "DS_Filter.h"
-class DS_VideoDecoder: public IVideoDecoder, public IRtConfig
+typedef struct _DS_VideoDecoder
{
-public:
- DS_VideoDecoder(const CodecInfo& info, const BITMAPINFOHEADER& format, int flip);
- ~DS_VideoDecoder();
- int SetDestFmt(int bits = 24, fourcc_t csp = 0);
- CAPS GetCapabilities() const {return m_Caps;}
- int DecodeInternal(void* src, size_t size, int is_keyframe, CImage* pImage);
- void StartInternal();
- void StopInternal();
- //void Restart();
- int SetDirection(int d)
- {
- m_obh.biHeight = d ? m_bh->biHeight : -m_bh->biHeight;
- m_sVhdr2->bmiHeader.biHeight = m_obh.biHeight;
- return 0;
- }
- // IRtConfig interface
- virtual HRESULT GetValue(const char*, int&);
- virtual HRESULT SetValue(const char*, int);
-protected:
+ IVideoDecoder iv;
+
DS_Filter* m_pDS_Filter;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
VIDEOINFOHEADER* m_sVhdr;
VIDEOINFOHEADER* m_sVhdr2;
- CAPS m_Caps; // capabilities of DirectShow decoder
+ int m_Caps;//CAPS m_Caps; // capabilities of DirectShow decoder
int m_iLastQuality; // remember last quality as integer
- bool m_bIsDivX; // for speed
-};
+ int m_iMinBuffers;
+ int m_iMaxAuto;
+ int m_bIsDivX; // for speed
+ int m_bIsDivX4; // for speed
+}DS_VideoDecoder;
+
+
+
+int DS_VideoDecoder_GetCapabilities(DS_VideoDecoder *this);
+
+DS_VideoDecoder * DS_VideoDecoder_Create(CodecInfo * info, BITMAPINFOHEADER * format, int flip, int maxauto);
+
+void DS_VideoDecoder_Destroy(DS_VideoDecoder *this);
+
+void DS_VideoDecoder_StartInternal(DS_VideoDecoder *this);
+
+void DS_VideoDecoder_StopInternal(DS_VideoDecoder *this);
+
+int DS_VideoDecoder_DecodeInternal(DS_VideoDecoder *this, const void* src, int size, int is_keyframe, CImage* pImage);
+
+/*
+ * bits == 0 - leave unchanged
+ */
+//int SetDestFmt(DS_VideoDecoder * this, int bits = 24, fourcc_t csp = 0);
+int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, fourcc_t csp);
+
+
+int DS_VideoDecoder_SetDirection(DS_VideoDecoder *this, int d);
+
+HRESULT DS_VideoDecoder_GetValue(DS_VideoDecoder *this, const char* name, int* value);
+
+HRESULT DS_VideoDecoder_SetValue(DS_VideoDecoder *this, const char* name, int value);
+
#endif /* AVIFILE_DS_VIDEODECODER_H */