Debian Codegraph @

gstreamer/src/videochroma.ccg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008-2015 The gstreamermm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <gstreamermm/videoformat.h>
21
22 namespace Gst
23 {
24
25 namespace Enums
26 {
27
28 Glib::ustring get_name(VideoChromaSite site)
29 {
30 return gst_video_chroma_to_string(static_cast<GstVideoChromaSite>(site));
31 }
32
33 VideoChromaSite video_chroma_site_from_string(const Glib::ustring& s)
34 {
35 return static_cast<VideoChromaSite>(gst_video_chroma_from_string(s.c_str()));
36 }
37
38 }
39
40 VideoChromaResample::VideoChromaResample(Gst::VideoChromaMethod method, Gst::VideoChromaSite site,
41 Gst::VideoChromaFlags flags, Gst::VideoFormat format, gint h_factor, gint v_factor)
42 {
43 gobject_ = gst_video_chroma_resample_new (static_cast<GstVideoChromaMethod>(method),
44 static_cast<GstVideoChromaSite>(site), static_cast<GstVideoChromaFlags>(flags),
45 static_cast<GstVideoFormat>(format), h_factor, v_factor);
46 }
47
48 VideoChromaResample::VideoChromaResample(GstVideoChromaResample* castitem)
49 {
50 gobject_ = castitem;
51 }
52
53 VideoChromaResample::~VideoChromaResample()
54 {
55 gst_video_chroma_resample_free(gobject_);
56 }
57 }