• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  *
3  * Copyright (C) 2007 Rene Stadler <mail@renestadler.de>
4  * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
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 Free
18  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __GST_GIO_ELEMENTS_H__
22 #define __GST_GIO_ELEMENTS_H__
23 
24 
25 #include <gio/gio.h>
26 #include <gst/gst.h>
27 
28 #include "gstgiobasesink.h"
29 
30 G_BEGIN_DECLS
31 
32 G_GNUC_INTERNAL void gio_element_init (GstPlugin * plugin);
33 
34 GST_ELEMENT_REGISTER_DECLARE (giosink);
35 GST_ELEMENT_REGISTER_DECLARE (giosrc);
36 GST_ELEMENT_REGISTER_DECLARE (giostreamsink);
37 GST_ELEMENT_REGISTER_DECLARE (giostreamsrc);
38 
39 #define GST_GIO_ERROR_MATCHES(err, code) g_error_matches (err, G_IO_ERROR, G_IO_ERROR_##code)
40 
41 #define GST_GIO_STREAM_IS_SEEKABLE(stream) (G_IS_SEEKABLE (stream) && g_seekable_can_seek (G_SEEKABLE (stream)))
42 
43 gboolean gst_gio_error (gpointer element, const gchar *func_name,
44     GError **err, GstFlowReturn *ret);
45 GstFlowReturn gst_gio_seek (gpointer element, GSeekable *stream, guint64 offset,
46     GCancellable *cancel);
47 void gst_gio_uri_handler_do_init (GType type);
48 
49 G_END_DECLS
50 
51 #endif /* __GST_GIO_ELEMENTS_H__ */
52