| 1 |
/* GStreamer |
| 2 |
* |
| 3 |
* Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 4 |
* Author: Thiago Santos <[email protected]> |
| 5 |
* |
| 6 |
* Copyright (C) 2021-2022 Centricular Ltd |
| 7 |
* Author: Edward Hervey <[email protected]> |
| 8 |
* Author: Jan Schmidt <[email protected]> |
| 9 |
* |
| 10 |
* This library is free software; you can redistribute it and/or |
| 11 |
* modify it under the terms of the GNU Library General Public |
| 12 |
* License as published by the Free Software Foundation; either |
| 13 |
* version 2 of the License, or (at your option) any later version. |
| 14 |
* |
| 15 |
* This library is distributed in the hope that it will be useful, |
| 16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 |
* Library General Public License for more details. |
| 19 |
* |
| 20 |
* You should have received a copy of the GNU Library General Public |
| 21 |
* License along with this library; if not, write to the |
| 22 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 23 |
* Boston, MA 02110-1301, USA. |
| 24 |
*/ |
| 25 |
#ifndef _GST_HLS_DEMUX_PLAYLIST_LOADER_H_ |
| 26 |
#define _GST_HLS_DEMUX_PLAYLIST_LOADER_H_ |
| 27 |
|
| 28 |
#include <gst/gst.h> |
| 29 |
#include "gstadaptivedemux.h" |
| 30 |
#include "gstadaptivedemuxutils.h" |
| 31 |
#include "downloadhelper.h" |
| 32 |
#include "downloadrequest.h" |
| 33 |
|
| 34 |
G_BEGIN_DECLS |
| 35 |
|
| 36 |
#define GST_TYPE_HLS_DEMUX_PLAYLIST_LOADER (gst_hls_demux_playlist_loader_get_type()) |
| 37 |
#define GST_HLS_DEMUX_PLAYLIST_LOADER(obj) \ |
| 38 |
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_HLS_DEMUX_PLAYLIST_LOADER,GstHLSDemuxPlaylistLoader)) |
| 39 |
#define GST_HLS_DEMUX_PLAYLIST_LOADER_CAST(obj) ((GstHLSDemuxPlaylistLoader *)obj) |
| 40 |
|
| 41 |
typedef struct _GstHLSDemuxPlaylistLoader GstHLSDemuxPlaylistLoader; |
| 42 |
typedef struct _GstHLSDemuxPlaylistLoaderClass GstHLSDemuxPlaylistLoaderClass; |
| 43 |
typedef struct _GstHLSDemuxPlaylistLoaderPrivate GstHLSDemuxPlaylistLoaderPrivate; |
| 44 |
|
| 45 |
typedef void (*GstHLSDemuxPlaylistLoaderSuccessCallback) (GstHLSDemuxPlaylistLoader *pl, |
| 46 |
const gchar *playlist_uri, GstHLSMediaPlaylist *new_playlist, gpointer userdata); |
| 47 |
typedef void (*GstHLSDemuxPlaylistLoaderErrorCallback) (GstHLSDemuxPlaylistLoader *pl, |
| 48 |
const gchar *playlist_uri, gpointer userdata); |
| 49 |
|
| 50 |
struct _GstHLSDemuxPlaylistLoaderClass |
| 51 |
{ |
| 52 |
GstObjectClass parent_class; |
| 53 |
}; |
| 54 |
|
| 55 |
struct _GstHLSDemuxPlaylistLoader |
| 56 |
{ |
| 57 |
GstObject object; |
| 58 |
GstHLSDemuxPlaylistLoaderPrivate *priv; |
| 59 |
}; |
| 60 |
|
| 61 |
GType gst_hls_demux_playlist_loader_get_type(void); |
| 62 |
|
| 63 |
GstHLSDemuxPlaylistLoader *gst_hls_demux_playlist_loader_new(GstAdaptiveDemux *demux, |
| 64 |
DownloadHelper *download_helper); |
| 65 |
|
| 66 |
void gst_hls_demux_playlist_loader_set_callbacks (GstHLSDemuxPlaylistLoader *pl, |
| 67 |
GstHLSDemuxPlaylistLoaderSuccessCallback success_cb, |
| 68 |
GstHLSDemuxPlaylistLoaderErrorCallback error_cb, |
| 69 |
gpointer userdata); |
| 70 |
|
| 71 |
void gst_hls_demux_playlist_loader_start (GstHLSDemuxPlaylistLoader *pl); |
| 72 |
void gst_hls_demux_playlist_loader_stop (GstHLSDemuxPlaylistLoader *pl); |
| 73 |
|
| 74 |
void gst_hls_demux_playlist_loader_set_playlist_uri (GstHLSDemuxPlaylistLoader *pl, |
| 75 |
const gchar *base_uri, const gchar *current_playlist_uri); |
| 76 |
gboolean gst_hls_demux_playlist_loader_has_current_uri (GstHLSDemuxPlaylistLoader *pl, |
| 77 |
const gchar *target_playlist_uri); |
| 78 |
|
| 79 |
G_END_DECLS |
| 80 |
#endif |