• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 2011 Andoni Morales Alastruey <ylatuya@gmail.com>
3  *
4  * gsturidownloader.h:
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  * Youshould have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef __GSTURI_DOWNLOADER_H__
23 #define __GSTURI_DOWNLOADER_H__
24 
25 #ifndef OHOS_EXT_FUNC
26 // ohos.ext.func.0013
27 #ifndef GST_USE_UNSTABLE_API
28 #warning "The UriDownloaded library from gst-plugins-bad is unstable API and may change in future."
29 #warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
30 #endif
31 #endif
32 
33 #include <glib-object.h>
34 #include <gst/gst.h>
35 #include "gstfragment.h"
36 
37 G_BEGIN_DECLS
38 
39 #define GST_TYPE_URI_DOWNLOADER (gst_uri_downloader_get_type())
40 #define GST_URI_DOWNLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_URI_DOWNLOADER,GstUriDownloader))
41 #define GST_URI_DOWNLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_URI_DOWNLOADER,GstUriDownloaderClass))
42 #define GST_IS_URI_DOWNLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_URI_DOWNLOADER))
43 #define GST_IS_URI_DOWNLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_URI_DOWNLOADER))
44 
45 typedef struct _GstUriDownloader GstUriDownloader;
46 typedef struct _GstUriDownloaderPrivate GstUriDownloaderPrivate;
47 typedef struct _GstUriDownloaderClass GstUriDownloaderClass;
48 
49 struct _GstUriDownloader
50 {
51   GstObject parent;
52 
53   GstUriDownloaderPrivate *priv;
54 };
55 
56 struct _GstUriDownloaderClass
57 {
58   GstObjectClass parent_class;
59 
60   /*< private >*/
61   gpointer _gst_reserved[GST_PADDING];
62 };
63 
64 GST_URI_DOWNLOADER_API
65 GType gst_uri_downloader_get_type (void);
66 
67 GST_URI_DOWNLOADER_API
68 GstUriDownloader * gst_uri_downloader_new (void);
69 
70 GST_URI_DOWNLOADER_API
71 void gst_uri_downloader_set_parent (GstUriDownloader * downloader, GstElement * parent);
72 
73 GST_URI_DOWNLOADER_API
74 GstFragment * gst_uri_downloader_fetch_uri (GstUriDownloader * downloader, const gchar * uri, const gchar * referer, gboolean compress, gboolean refresh, gboolean allow_cache, GError ** err);
75 
76 GST_URI_DOWNLOADER_API
77 GstFragment * gst_uri_downloader_fetch_uri_with_range (GstUriDownloader * downloader, const gchar * uri, const gchar * referer, gboolean compress, gboolean refresh, gboolean allow_cache, gint64 range_start, gint64 range_end, GError ** err);
78 
79 GST_URI_DOWNLOADER_API
80 void gst_uri_downloader_reset (GstUriDownloader *downloader);
81 
82 GST_URI_DOWNLOADER_API
83 void gst_uri_downloader_cancel (GstUriDownloader *downloader);
84 
85 G_END_DECLS
86 #endif /* __GSTURIDOWNLOADER_H__ */
87