Debian Codegraph @

ext/adaptivedemux2/mss/gstmssmanifest.h

raw
1 /* GStreamer
2 * Copyright (C) 2012 Smart TV Alliance
3 * Author: Thiago Sousa Santos <[email protected]>, Collabora Ltd.
4 *
5 * gstmssmanifest.h:
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23 #ifndef __GST_MSS_MANIFEST_H__
24 #define __GST_MSS_MANIFEST_H__
25
26 #include <glib.h>
27 #include <gio/gio.h>
28 #include <gst/gst.h>
29 #include <gst/base/gstadapter.h>
30 #include "gstmss-prelude.h"
31
32 G_BEGIN_DECLS
33
34 typedef struct _GstMssManifest GstMssManifest;
35 typedef struct _GstMssStream GstMssStream;
36
37 typedef enum _GstMssStreamType {
38 MSS_STREAM_TYPE_UNKNOWN = 0,
39 MSS_STREAM_TYPE_VIDEO = 1,
40 MSS_STREAM_TYPE_AUDIO = 2
41 } GstMssStreamType;
42
43 GstMssManifest * gst_mss_manifest_new (GstBuffer * data);
44 void gst_mss_manifest_free (GstMssManifest * manifest);
45 GSList * gst_mss_manifest_get_streams (GstMssManifest * manifest);
46 guint64 gst_mss_manifest_get_timescale (GstMssManifest * manifest);
47 guint64 gst_mss_manifest_get_duration (GstMssManifest * manifest);
48 GstClockTime gst_mss_manifest_get_gst_duration (GstMssManifest * manifest);
49 void gst_mss_manifest_seek (GstMssManifest * manifest, gboolean forward, gint64 time);
50 gboolean gst_mss_manifest_change_bitrate (GstMssManifest *manifest, guint64 bitrate);
51 guint64 gst_mss_manifest_get_current_bitrate (GstMssManifest * manifest);
52 gboolean gst_mss_manifest_is_live (GstMssManifest * manifest);
53 gint64 gst_mss_manifest_get_dvr_window_length (GstMssManifest * manifest);
54 gint gst_mss_manifest_get_look_ahead_fragments_count (GstMssManifest * manifest);
55 void gst_mss_manifest_reload_fragments (GstMssManifest * manifest, GstBuffer * data);
56 GstClockTime gst_mss_manifest_get_min_fragment_duration (GstMssManifest * manifest);
57 const gchar * gst_mss_manifest_get_protection_system_id (GstMssManifest * manifest);
58 const gchar * gst_mss_manifest_get_protection_data (GstMssManifest * manifest);
59 gboolean gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start, gint64 * stop);
60
61 GstMssStreamType gst_mss_stream_get_type (GstMssStream *stream);
62 GstCaps * gst_mss_stream_get_caps (GstMssStream * stream);
63 gboolean gst_mss_stream_select_bitrate (GstMssStream * stream, guint64 bitrate);
64 guint64 gst_mss_stream_get_current_bitrate (GstMssStream * stream);
65 void gst_mss_stream_set_active (GstMssStream * stream, gboolean active);
66 guint64 gst_mss_stream_get_timescale (GstMssStream * stream);
67 GstFlowReturn gst_mss_stream_get_fragment_url (GstMssStream * stream, gchar ** url);
68 GstClockTime gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream);
69 GstClockTime gst_mss_stream_get_fragment_gst_duration (GstMssStream * stream);
70 gboolean gst_mss_stream_has_next_fragment (GstMssStream * stream);
71 GstFlowReturn gst_mss_stream_advance_fragment (GstMssStream * stream);
72 GstFlowReturn gst_mss_stream_regress_fragment (GstMssStream * stream);
73 void gst_mss_stream_seek (GstMssStream * stream, gboolean forward, GstSeekFlags flags, gint64 time, gint64 * final_time);
74 const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
75 const gchar * gst_mss_stream_get_name (GstMssStream * stream);
76
77 const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);
78
79 void gst_mss_manifest_live_adapter_push(GstMssStream * stream, GstBuffer * buffer);
80 gsize gst_mss_manifest_live_adapter_available(GstMssStream * stream);
81 GstBuffer * gst_mss_manifest_live_adapter_take_buffer(GstMssStream * stream, gsize nbytes);
82 void gst_mss_manifest_live_adapter_clear (GstMssStream * stream);
83 gboolean gst_mss_stream_fragment_parsing_needed(GstMssStream * stream);
84 void gst_mss_stream_parse_fragment(GstMssStream * stream, GstBuffer * buffer);
85
86 G_END_DECLS
87 #endif /* __GST_MSS_MANIFEST_H__ */