1 /* GStreamer 2 * Copyright (C) 2007 Sebastien Moutte <sebastien@moutte.net> 3 * 4 * gstdshowfakesink.h: 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GST_DHOW_FAKESINK_H__ 23 #define __GST_DHOW_FAKESINK_H__ 24 25 #include "gstdshow.h" 26 27 //{6A780808-9725-4d0b-8695-A4DD8D210773} 28 static const GUID CLSID_DshowFakeSink = 29 { 0x6a780808, 0x9725, 0x4d0b, {0x86, 0x95, 0xa4, 0xdd, 0x8d, 0x21, 0x7, 30 0x73} 31 }; 32 33 typedef bool (*push_buffer_func) (guint8 * buffer, guint size, gpointer src_object, 34 GstClockTime duration); 35 36 class CDshowFakeSink:public CBaseRenderer 37 { 38 public: 39 CDshowFakeSink (); ~CDshowFakeSink()40 virtual ~ CDshowFakeSink () 41 { 42 } 43 44 virtual HRESULT CheckMediaType (const CMediaType * pmt); 45 virtual HRESULT DoRenderSample (IMediaSample * pMediaSample); 46 47 STDMETHOD (gst_set_media_type) (AM_MEDIA_TYPE * pmt); 48 STDMETHOD (gst_set_buffer_callback) (push_buffer_func push, gpointer data); 49 50 protected: 51 HRESULT m_hres; 52 CMediaType m_MediaType; 53 push_buffer_func m_callback; 54 gpointer m_data; 55 }; 56 57 #endif /* __GST_DSHOW_FAKESINK_H__ */ 58