2 * DASH demux plugin for GStreamer
6 * Copyright (C) 2012 Orange
8 * David Corvoysier <david.corvoysier@orange.com>
9 * Hamid Zakari <hamid.zakari@gmail.com>
11 * Copyright (C) 2013 Smart TV Alliance
12 * Author: Thiago Sousa Santos <thiago.sousa.santos@collabora.com>, Collabora Ltd.
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with this library (COPYING); if not, write to the
26 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27 * Boston, MA 02111-1307, USA.
30 #ifndef __GST_DASH_DEMUX_H__
31 #define __GST_DASH_DEMUX_H__
34 #include <gst/adaptivedemux/gstadaptivedemux.h>
35 #include <gst/base/gstadapter.h>
36 #include <gst/base/gstdataqueue.h>
37 #include "gstmpdparser.h"
39 #include <gst/uridownloader/gsturidownloader.h>
42 #define GST_TYPE_DASH_DEMUX \
43 (gst_dash_demux_get_type())
44 #define GST_DASH_DEMUX(obj) \
45 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DASH_DEMUX,GstDashDemux))
46 #define GST_DASH_DEMUX_CLASS(klass) \
47 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DASH_DEMUX,GstDashDemuxClass))
48 #define GST_IS_DASH_DEMUX(obj) \
49 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DASH_DEMUX))
50 #define GST_IS_DASH_DEMUX_CLASS(klass) \
51 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DASH_DEMUX))
52 #define GST_DASH_DEMUX_CAST(obj) \
55 typedef struct _GstDashDemuxClockDrift GstDashDemuxClockDrift;
56 typedef struct _GstDashDemuxStream GstDashDemuxStream;
57 typedef struct _GstDashDemux GstDashDemux;
58 typedef struct _GstDashDemuxClass GstDashDemuxClass;
60 struct _GstDashDemuxStream
62 GstAdaptiveDemuxStream parent;
65 GstActiveStream *active_stream;
67 GstMediaFragmentInfo current_fragment;
70 GstAdapter *sidx_adapter;
71 GstSidxParser sidx_parser;
72 gsize sidx_current_remaining;
74 gint64 sidx_base_offset;
75 GstClockTime pending_seek_ts;
81 * Opaque #GstDashDemux data structure.
85 GstAdaptiveDemux parent;
89 GstMpdClient *client; /* MPD client */
92 GstDashDemuxClockDrift *clock_drift;
94 gboolean end_of_period;
95 gboolean end_of_manifest;
98 GstClockTime max_buffering_time; /* Maximum buffering time accumulated during playback */
99 guint64 max_bitrate; /* max of bitrate supported by target decoder */
100 gchar* default_presentation_delay; /* presentation time delay if MPD@suggestedPresentationDelay is not present */
102 gint n_audio_streams;
103 gint n_video_streams;
104 gint n_subtitle_streams;
107 struct _GstDashDemuxClass
109 GstAdaptiveDemuxClass parent_class;
112 GType gst_dash_demux_get_type (void);
115 #endif /* __GST_DASH_DEMUX_H__ */