Commit 8990bdd4 authored by Oskar Rajang's avatar Oskar Rajang Committed by Brendan Long

Updated seeking query with seeking_not_possible response, instead of impossible_to_handle response.

parent 805e7e28
......@@ -834,9 +834,14 @@ dlna_src_handle_query_seeking (GstDlnaSrc * dlna_src, GstQuery * query)
G_GUINT64_FORMAT ", end %" G_GUINT64_FORMAT,
dlna_src->byte_start, dlna_src->byte_end);
} else
} else {
GST_INFO_OBJECT (dlna_src,
"Seeking in bytes not available for content item");
gst_query_set_seeking (query, GST_FORMAT_BYTES, FALSE, seek_start, seek_end);
ret = TRUE;
}
} else if (format == GST_FORMAT_TIME) {
if (dlna_src->time_seek_supported) {
gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE,
......@@ -848,9 +853,14 @@ dlna_src_handle_query_seeking (GstDlnaSrc * dlna_src, GstQuery * query)
GST_TIME_FORMAT ", end %" GST_TIME_FORMAT,
GST_TIME_ARGS (dlna_src->npt_start_nanos),
GST_TIME_ARGS (dlna_src->npt_end_nanos));
} else
} else {
GST_DEBUG_OBJECT (dlna_src,
"Seeking in media time not available for content item");
gst_query_set_seeking (query, GST_FORMAT_TIME, FALSE, seek_start, seek_end);
ret = TRUE;
}
} else {
GST_DEBUG_OBJECT (dlna_src,
"Got seeking query with non-supported format type: %s, passing to default handler",
......@@ -1028,17 +1038,18 @@ dlna_src_handle_event_seek (GstDlnaSrc * dlna_src, GstPad * pad,
if (dlna_src->handled_time_seek_seqnum) {
GST_INFO_OBJECT (dlna_src, "Already processed seek event %d", new_seqnum);
return FALSE;
} else
} else {
/* *TODO* - see dlnasrc issue #63
Got same event now byte based since some element converted it to bytes
Convert here if time seek is supported since it is more accurate */
if (dlna_src->time_seek_supported) {
convert_start = TRUE;
GST_INFO_OBJECT (dlna_src,
"Set flag to convert time based seek to byte since server does support time seeks");
} else
GST_INFO_OBJECT (dlna_src,
"Unable to convert time based seek to byte since server does not support time seeks");
if (dlna_src->time_seek_supported) {
convert_start = TRUE;
GST_INFO_OBJECT (dlna_src,
"Set flag to convert time based seek to byte since server does support time seeks");
} else
GST_INFO_OBJECT (dlna_src,
"Unable to convert time based seek to byte since server does not support time seeks");
}
} else {
dlna_src->handled_time_seek_seqnum = FALSE;
dlna_src->time_seek_seqnum = new_seqnum;
......@@ -2024,6 +2035,10 @@ dlna_src_head_response_free_struct (GstDlnaSrc * dlna_src,
g_free (dlna_src->npt_end_str);
g_free (dlna_src->npt_duration_str);
dlna_src->npt_start_str = NULL;
dlna_src->npt_end_str = NULL;
dlna_src->npt_duration_str = NULL;
int i = 0;
if (head_response) {
if (head_response->content_features) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment