From 0a0c13670a4e4e08d1f21ebf5ca03e810491e991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Wed, 23 May 2007 22:44:12 +0000 Subject: docs/plugins/gst-plugins-bad-plugins.args: Remove directsoundsink property doc as this sink use the mixer interface now. Original commit message from CVS: * docs/plugins/gst-plugins-bad-plugins.args: Remove directsoundsink property doc as this sink use the mixer interface now. * docs/plugins/gst-plugins-bad-plugins.interfaces: Add interfaces implemented by Windows sinks. * sys/directsound/gstdirectsoundsink.c: * sys/directsound/gstdirectsoundsink.h: Remove directsoundsink property and implement the mixer interface. * win32/vs6/gst_plugins_bad.dsw: * win32/vs6/libgstdirectsound.dsp: Update project files. * gst-libs/gst/dshow/gstdshow.cpp: * gst-libs/gst/dshow/gstdshow.h: * gst-libs/gst/dshow/gstdshowfakesink.cpp: * gst-libs/gst/dshow/gstdshowfakesink.h: * gst-libs/gst/dshow/gstdshowfakesrc.cpp: * gst-libs/gst/dshow/gstdshowfakesrc.h: * gst-libs/gst/dshow/gstdshowinterface.cpp: * gst-libs/gst/dshow/gstdshowinterface.h: * win32/common/libgstdshow.def: * win32/vs6/libgstdshow.dsp: Add a new gst library which allow to create internal Direct Show graph (pipelines) to wrap Windows sources, decoders or encoders. It includes a DirectShow fake source and sink and utility functions. * sys/dshowsrcwrapper/gstdshowaudiosrc.c: * sys/dshowsrcwrapper/gstdshowaudiosrc.h: * sys/dshowsrcwrapper/gstdshowsrcwrapper.c: * sys/dshowsrcwrapper/gstdshowsrcwrapper.h: * sys/dshowsrcwrapper/gstdshowvideosrc.c: * sys/dshowsrcwrapper/gstdshowvideosrc.h: * win32/vs6/libdshowsrcwrapper.dsp: Add a new plugin to wrap DirectShow sources on Windows. It gets data from any webcam, dv cam, micro. We could add tv tunner card later. --- gst-libs/gst/dshow/gstdshowfakesrc.h | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gst-libs/gst/dshow/gstdshowfakesrc.h (limited to 'gst-libs/gst/dshow/gstdshowfakesrc.h') diff --git a/gst-libs/gst/dshow/gstdshowfakesrc.h b/gst-libs/gst/dshow/gstdshowfakesrc.h new file mode 100644 index 00000000..06884313 --- /dev/null +++ b/gst-libs/gst/dshow/gstdshowfakesrc.h @@ -0,0 +1,72 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowfakesrc.h: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstdshowinterface.h" +#include + +class CDshowFakeOutputPin : public CBaseOutputPin +{ +protected: +/* members */ + HRESULT m_hres; + CMediaType m_MediaType; + unsigned int m_SampleSize; + +public: +/* methods */ + CDshowFakeOutputPin (CBaseFilter *pFilter, CCritSec *sec); + ~CDshowFakeOutputPin (); + + virtual HRESULT CheckMediaType(const CMediaType *pmt); + HRESULT GetMediaType(int iPosition, CMediaType *pMediaType); + virtual HRESULT DecideBufferSize (IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); + STDMETHOD (SetMediaType) (AM_MEDIA_TYPE *pmt); + STDMETHOD (PushBuffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); + STDMETHOD (Flush) (); + STDMETHOD (SetSampleSize) (unsigned int size); +}; + +class CDshowFakeSrc : public CBaseFilter, + public IGstDshowInterface +{ +public: +/* members */ + CDshowFakeOutputPin *m_pOutputPin; + +/* methods */ + CDshowFakeSrc (); + virtual ~CDshowFakeSrc (); + + static CUnknown * WINAPI CreateInstance (LPUNKNOWN pUnk, HRESULT *pHr); + + virtual int GetPinCount(); + virtual CBasePin *GetPin(int n); + + STDMETHOD (QueryInterface)(REFIID riid, void **ppvObject); + ULONG STDMETHODCALLTYPE AddRef(); + ULONG STDMETHODCALLTYPE Release(); + + STDMETHOD (gst_set_media_type) (AM_MEDIA_TYPE *pmt); + STDMETHOD (gst_set_buffer_callback) (push_buffer_func push, byte *data); + STDMETHOD (gst_push_buffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); + STDMETHOD (gst_flush) (); + STDMETHOD (gst_set_sample_size) (unsigned int size); +}; \ No newline at end of file -- cgit v1.2.1