tizen 2.3 release
[framework/multimedia/gst-plugins-ext0.10.git] / dashdemux / src / gstmpdparser.h
similarity index 88%
rename from wearable/dashdemux/src/gstmpdparser.h
rename to dashdemux/src/gstmpdparser.h
index b270a3e..3231d62 100755 (executable)
@@ -193,6 +193,7 @@ struct _GstRepresentationBaseType
   gchar *profiles;
   guint width;
   guint height;
+  guint bandwidth;
   GstRatio *sar;
   GstFrameRate *frameRate;
   gchar *audioSamplingRate;
@@ -219,7 +220,7 @@ struct _GstSubRepresentationNode
   guint level;
   guint *dependencyLevel;            /* UIntVectorType */
   guint size;                        /* size of "dependencyLevel" array */
-  guint bandwidth;
+  guint64 bandwidth;
   gchar **contentComponent;          /* StringVectorType */
 };
 
@@ -428,7 +429,11 @@ struct _GstActiveStream
 {
   GstStreamMimeType mimeType;                 /* video/audio/application */
 
-  guint baseURL_idx;                          /* index of the baseURL used for last request */
+  guint mpd_baseURL_idx;                      /* MPD baseURL index */
+  guint period_baseURL_idx;                   /* Period baseURL index */
+  guint adaptset_baseURL_idx;                 /* AdaptationSet baseURL index */
+  guint repr_baseURL_idx;                     /* Representation baseURL index */
+
   gchar *baseURL;                             /* active baseURL used for last request */
   guint max_bandwidth;                        /* max bandwidth allowed for this mimeType */
 
@@ -452,7 +457,7 @@ struct _GstMpdClient
   GList *active_streams;                      /* list of GstActiveStream */
   guint stream_idx;                           /* currently active stream */
 
-  guint update_failed_count;
+  guint download_failed_count;
   gchar *mpd_uri;                             /* manifest file URI */
   GMutex *lock;
 };
@@ -469,40 +474,54 @@ gboolean gst_mpd_parse (GstMpdClient *client, const gchar *data, gint size);
 gboolean gst_mpd_client_setup_media_presentation (GstMpdClient *client);
 gboolean gst_mpd_client_setup_streaming (GstMpdClient *client, GstStreamMimeType mimeType, gchar* lang);
 gboolean gst_mpd_client_setup_representation (GstMpdClient *client, GstActiveStream *stream, GstRepresentationNode *representation);
-GstClockTime gst_mpd_client_get_current_position (GstMpdClient *client);
+gboolean gst_mpd_client_get_stream_current_position (GstMpdClient * client, guint stream_idx, GstClockTime *ts);
 GstClockTime gst_mpd_client_get_next_fragment_duration (GstMpdClient * client);
 GstClockTime gst_mpd_client_get_media_presentation_duration (GstMpdClient *client);
 gboolean gst_mpd_client_get_next_fragment (GstMpdClient *client, guint indexStream, gboolean *discontinuity, gchar **uri, GstClockTime *duration, GstClockTime *timestamp);
+gboolean gst_mpd_client_get_last_fragment_timestamp (GstMpdClient * client, guint stream_idx, GstClockTime * ts);
+gboolean gst_mpd_client_get_next_fragment_timestamp (GstMpdClient * client, guint stream_idx, GstClockTime * ts);
 gboolean gst_mpd_client_get_next_header (GstMpdClient *client, const gchar **uri, guint stream_idx);
 gboolean gst_mpd_client_is_live (GstMpdClient * client);
 
 /* Period selection */
 gboolean gst_mpd_client_set_period_index (GstMpdClient *client, guint period_idx);
 guint gst_mpd_client_get_period_index (GstMpdClient *client);
+const gchar* gst_mpd_client_get_period_id (GstMpdClient * client);
+gboolean gst_mpd_client_set_period_id (GstMpdClient * client, const gchar * period_id);
+gboolean gst_mpd_client_has_next_period (GstMpdClient * client);
 
 /* Representation selection */
-gint gst_mpdparser_get_rep_idx_with_max_bandwidth (GList *Representations, gint max_bandwidth);
+gint gst_mpdparser_get_rep_idx_with_max_bandwidth (GList *Representations, guint64 max_bandwidth);
 
 /* URL management */
 const gchar *gst_mpdparser_get_baseURL (GstMpdClient *client);
-GstMediaSegment *gst_mpdparser_get_chunk_by_index (GstMpdClient *client, guint indexStream, guint indexChunk);
+gboolean gst_mpdparser_get_chunk_by_index (GstMpdClient * client, guint indexStream, guint indexChunk, GstMediaSegment *segment);
+gboolean gst_mpd_client_set_next_baseURL_for_stream (GstMpdClient * client);
 
 /* Active stream */
 guint gst_mpdparser_get_nb_active_stream (GstMpdClient *client);
 GstActiveStream *gst_mpdparser_get_active_stream_by_index (GstMpdClient *client, guint stream_idx);
+gint gst_mpd_client_get_video_active_stream_id(GstMpdClient *client);
+gboolean gst_mpd_client_stream_seek (GstMpdClient * client, gint stream_idx, GstClockTime ts);
+gboolean gst_mpd_client_seek_to_time (GstMpdClient * client, GDateTime * time);
+gint gst_mpd_client_check_time_position (GstMpdClient * client, GstActiveStream * stream, GstClockTime ts, gint64 * diff);
+GstClockTime gst_mpd_client_stream_find_segment(GstMpdClient *client, guint stream_idx, GstClockTime seek_pos, guint *seg_num);
 
 /* AdaptationSet */
 guint gst_mpdparser_get_nb_adaptationSet (GstMpdClient *client);
 
 /* Segment */
 void gst_mpd_client_set_segment_index_for_all_streams (GstMpdClient * client, guint segment_idx);
+void gst_mpd_client_set_segment_index (GstActiveStream * stream, guint segment_idx);
 guint gst_mpd_client_get_segment_index (GstActiveStream * stream);
 
 /* Get audio/video stream parameters (mimeType, width, height, rate, number of channels) */
 const gchar *gst_mpd_client_get_stream_mimeType (GstActiveStream * stream);
 const gboolean gst_mpd_client_get_bitstream_switching_flag (GstActiveStream * stream);
+gboolean gst_mpd_client_get_max_video_dimensions(GstMpdClient *client, gint *max_width, gint *max_height);
 guint gst_mpd_client_get_video_stream_width (GstActiveStream * stream);
 guint gst_mpd_client_get_video_stream_height (GstActiveStream * stream);
+guint gst_mpd_client_get_video_stream_bandwidth (GstActiveStream * stream);
 guint gst_mpd_client_get_audio_stream_rate (GstActiveStream * stream);
 guint gst_mpd_client_get_audio_stream_num_channels (GstActiveStream * stream);