• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  *
3  * Copyright (C) 2019 Collabora Ltd.
4  *   Author: Stéphane Cerveau <scerveau@collabora.com>
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.1 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 (COPYING); if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 #ifndef __GST_MPDHELPER_H__
22 #define __GST_MPDHELPER_H__
23 
24 #include "gstxmlhelper.h"
25 #include "gstmpdnode.h"
26 #include "gstmpdurltypenode.h"
27 #include "gstmpddescriptortypenode.h"
28 #include "gstmpdsegmenttimelinenode.h"
29 #include "gstmpdsegmentbasenode.h"
30 
31 
32 G_BEGIN_DECLS
33 
34 typedef enum
35 {
36   GST_SAP_TYPE_0 = 0,
37   GST_SAP_TYPE_1,
38   GST_SAP_TYPE_2,
39   GST_SAP_TYPE_3,
40   GST_SAP_TYPE_4,
41   GST_SAP_TYPE_5,
42   GST_SAP_TYPE_6
43 } GstMPDSAPType;
44 
45 typedef enum
46 {
47   GST_MPD_FILE_TYPE_STATIC = 0,
48   GST_MPD_FILE_TYPE_DYNAMIC
49 } GstMPDFileType;
50 
51 #define GST_MPD_XLINK_ACTUATE_ON_LOAD_STR "onLoad"
52 
53 typedef enum
54 {
55   GST_MPD_XLINK_ACTUATE_ON_REQUEST,
56   GST_MPD_XLINK_ACTUATE_ON_LOAD
57 } GstMPDXLinkActuate;
58 
59 
60 gboolean gst_mpd_helper_get_mpd_type (xmlNode * a_node, const gchar * property_name, GstMPDFileType * property_value);
61 gboolean gst_mpd_helper_get_SAP_type (xmlNode * a_node, const gchar * property_name, GstMPDSAPType * property_value);
62 
63 const gchar * gst_mpd_helper_mimetype_to_caps (const gchar * mimeType);
64 const gchar * gst_mpd_helper_get_video_codec_from_mime (GstCaps * caps);
65 const gchar * gst_mpd_helper_get_audio_codec_from_mime (GstCaps * caps);
66 GstUri *gst_mpd_helper_combine_urls (GstUri * base, GList * list, gchar ** query, guint idx);
67 int gst_mpd_helper_strncmp_ext (const char *s1, const char *s2);
68 
69 G_END_DECLS
70 #endif /* __GST_MPDHELPER_H__ */
71