1 /* 2 * Copyright (C) 2007 Haakon Sporsheim <hakon.sporsheim@tandberg.com> 3 * 2008 Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __KSVIDEOHELPERS_H__ 22 #define __KSVIDEOHELPERS_H__ 23 24 #include <gst/gst.h> 25 #include <windows.h> 26 #include <ks.h> 27 #include <ksmedia.h> 28 29 G_BEGIN_DECLS 30 31 DEFINE_GUID(MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); 32 33 typedef struct _KsVideoMediaType KsVideoMediaType; 34 35 /** 36 * A structure that contain metadata about capabilities 37 * for both KS and GStreamer for video only. 38 */ 39 struct _KsVideoMediaType 40 { 41 guint pin_id; 42 43 const KSDATARANGE * range; 44 const KS_VIDEO_STREAM_CONFIG_CAPS vscc; 45 46 guint8 * format; 47 guint format_size; 48 49 guint sample_size; 50 51 GstCaps * translated_caps; 52 gboolean is_rgb; 53 }; 54 55 typedef struct DVINFO { 56 DWORD dwDVAAuxSrc; 57 DWORD dwDVAAuxCtl; 58 DWORD dwDVAAuxSrc1; 59 DWORD dwDVAAuxCtl1; 60 DWORD dwDVVAuxSrc; 61 DWORD dwDVVAuxCtl; 62 DWORD dwDVReserved[2]; 63 } DVINFO; 64 65 typedef struct KS_DATARANGE_DVVIDEO { 66 KSDATARANGE DataRange; 67 DVINFO DVVideoInfo; 68 } KS_DATARANGE_DVVIDEO,*PKS_DATARANGE_DVVIDEO; 69 70 71 GList * ks_video_device_list_sort_cameras_first (GList * devices); 72 73 KsVideoMediaType * ks_video_media_type_dup (KsVideoMediaType * media_type); 74 void ks_video_media_type_free (KsVideoMediaType * media_type); 75 GList * ks_video_probe_filter_for_caps (HANDLE filter_handle); 76 KSPIN_CONNECT * ks_video_create_pin_conn_from_media_type (KsVideoMediaType * media_type); 77 gboolean ks_video_fixate_media_type (const KSDATARANGE * range, guint8 * format, gint width, gint height, gint fps_n, gint fps_d); 78 79 GstCaps * ks_video_get_all_caps (void); 80 81 G_END_DECLS 82 83 #endif /* __KSVIDEOHELPERS_H__ */ 84