| 1 |
/* gstreamermm - a C++ wrapper for gstreamer |
| 2 |
* |
| 3 |
* Copyright 2008 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 <gst/gst.h> |
| 21 |
#include <gstreamermm/element.h> |
| 22 |
|
| 23 |
namespace Gst |
| 24 |
{ |
| 25 |
|
| 26 |
Glib::RefPtr<Gst::Element> Parse::launch(const Glib::ustring& pipeline_description) |
| 27 |
{ |
| 28 |
GError* gerror = nullptr; |
| 29 |
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_launch(pipeline_description.c_str(), &gerror)); |
| 30 |
|
| 31 |
if(gerror) |
| 32 |
::Glib::Error::throw_exception(gerror); |
| 33 |
|
| 34 |
return retvalue; |
| 35 |
} |
| 36 |
|
| 37 |
Glib::RefPtr<Gst::Element> Parse::launchv(const gchar *argv[]) |
| 38 |
{ |
| 39 |
GError* gerror = nullptr; |
| 40 |
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_launchv(argv, &gerror)); |
| 41 |
|
| 42 |
if(gerror) |
| 43 |
::Glib::Error::throw_exception(gerror); |
| 44 |
|
| 45 |
return retvalue; |
| 46 |
} |
| 47 |
|
| 48 |
Glib::RefPtr<Gst::Element> Parse::create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads) |
| 49 |
{ |
| 50 |
GError* gerror = nullptr; |
| 51 |
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_bin_from_description(bin_description.c_str(), ghost_unconnected_pads, &gerror)); |
| 52 |
|
| 53 |
if(gerror) |
| 54 |
::Glib::Error::throw_exception(gerror); |
| 55 |
|
| 56 |
return retvalue; |
| 57 |
} |
| 58 |
|
| 59 |
} //namespace Gst |