[Bug 752413] dashdemux: add support for parsing UTCTiming elements

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Aug 13 07:49:45 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=752413

--- Comment #20 from A Ashley <bugzilla at ashley-family.net> ---
(In reply to Sebastian Dröge (slomo) from comment #19)

> ::: ext/dash/gstdashdemux.c
> @@ +194,3 @@
> +#define FAST_CLOCK_UPDATE_INTERVAL  (1000000 * 30)      /* 30 seconds */
> +#define SUPPORTED_CLOCK_FORMATS (GST_MPD_UTCTIMING_TYPE_NTP |
> GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE | GST_MPD_UTCTIMING_TYPE_HTTP_ISO |
> GST_MPD_UTCTIMING_TYPE_HTTP_NTP)
> +#define NTP_TO_UNIX_EPOCH 2208988800LL  /* difference (in seconds) between
> NTP epoch and Unix epoch */
> 
> G_GUINT64_CONSTANT(), LL is unfortunately not portable
>

Ok, good to know. I stole that from gstrtpsession.c so I guess that also needs
fixing.

> @@ +1577,3 @@
> +        urls[clock_drift->selected_url]);
> +    inet_addrs = g_resolver_lookup_by_name (resolver,
> +        urls[clock_drift->selected_url], NULL, &err);
> 
> How does the NTP stuff work? I see that there's an http:// URL in the
> manifest, and behind that there's some non-ASCII data. E.g.
> http://dash-live-streams.appspot.com/time/ntp
> 
There are two forms of NTP.

1. urn:mpeg:dash:utc:ntp:2014
2. urn:mpeg:dash:utc:http-ntp:2014

In case 1, the value is a list of NTP servers to contact using standard NTP
protocol.
In case 2, the value is a list of HTTP URLs. A GET to one of these URLs will
return an 8 byte packet in NTP Timestamp format.

> Also if the manifest specifies an IP
> string instead of a hostname, I think GResolver doesn't do that right thing.
> IIRC code usually first tries to create a GInetAddress from the string, and
> only if that fails goes through GResolver

According to the gio documentation:
hostname may be an ASCII-only or UTF-8 hostname, or the textual form of an IP
address (in which case this just becomes a wrapper around
g_inet_address_new_from_string()).


I wonder if a better solution would be for gst_ntp_clock_new() to support both
hostnames and IP address strings?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list