Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / sys / winks / ksvideohelpers.h
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., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, 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 };
53
54 GList * ks_video_device_list_sort_cameras_first (GList * devices);
55
56 KsVideoMediaType * ks_video_media_type_dup (KsVideoMediaType * media_type);
57 void ks_video_media_type_free (KsVideoMediaType * media_type);
58 GList * ks_video_probe_filter_for_caps (HANDLE filter_handle);
59 KSPIN_CONNECT * ks_video_create_pin_conn_from_media_type (KsVideoMediaType * media_type);
60 gboolean ks_video_fixate_media_type (const KSDATARANGE * range, guint8 * format, gint width, gint height, gint fps_n, gint fps_d);
61
62 GstCaps * ks_video_get_all_caps (void);
63
64 G_END_DECLS
65
66 #endif /* __KSVIDEOHELPERS_H__ */