| 1 |
/* GStreamer |
| 2 |
Copyright (C) 2022 Jan Schmidt <[email protected]> |
| 3 |
* |
| 4 |
* gsthlsdemux-preloader.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 |
* You should 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 |
#ifndef __GST_HLS_DEMUX_PRELOADER_H__ |
| 22 |
#define __GST_HLS_DEMUX_PRELOADER_H__ |
| 23 |
|
| 24 |
#include <glib.h> |
| 25 |
|
| 26 |
#include "m3u8.h" |
| 27 |
|
| 28 |
#include "downloadrequest.h" |
| 29 |
#include "downloadhelper.h" |
| 30 |
|
| 31 |
G_BEGIN_DECLS |
| 32 |
|
| 33 |
typedef struct _GstHLSDemuxPreloader GstHLSDemuxPreloader; |
| 34 |
|
| 35 |
struct _GstHLSDemuxPreloader { |
| 36 |
DownloadHelper *download_helper; /* Owned by the demuxer */ |
| 37 |
GPtrArray *active_preloads; |
| 38 |
}; |
| 39 |
|
| 40 |
GstHLSDemuxPreloader *gst_hls_demux_preloader_new (DownloadHelper *download_helper); |
| 41 |
void gst_hls_demux_preloader_free (GstHLSDemuxPreloader *preloader); |
| 42 |
void gst_hls_demux_preloader_load (GstHLSDemuxPreloader *preloader, GstM3U8PreloadHint *hint, const gchar *referrer_uri); |
| 43 |
void gst_hls_demux_preloader_cancel (GstHLSDemuxPreloader *preloader, GstM3U8PreloadHintType hint_types); |
| 44 |
|
| 45 |
gboolean gst_hls_demux_preloader_provide_request (GstHLSDemuxPreloader *preloader, DownloadRequest *target_req); |
| 46 |
|
| 47 |
G_END_DECLS |
| 48 |
#endif /* __GST_HLS_DEMUX_PRELOADER_H__ */ |