zencoder / go-dash

A Go library for generating MPEG-DASH manifests.
Other
217 stars 60 forks source link

Implement to unmarshal PT duration #37

Closed miyukki closed 6 years ago

miyukki commented 6 years ago

Refer to #23

go-dash output the MPD with PT duration, but could not parse its notation. This PR resolve an above issue. However, It might be including the mistake due to I can not read the full specification of MPEG-DASH.

philcluff commented 6 years ago

Thanks for the PR! I'll take a look today.

thomshutt commented 6 years ago

Hey @miyukki - sorry it's taken us a while to look at this!

Overall it looks good, but I noticed a few things:

miyukki commented 6 years ago

Thanks your review, and I saw the good examples about xsd:duration.

I changed the parsing code, but I got an issue about duration. xsd:duration can be represent the duration with Years and Months, but it couldn't convert to golang time.Duration because Years and Months are not fixed length of days. So I calculate the duration with beginning of unix time. Please let me know if you have any specifications about it.

thomshutt commented 6 years ago

@miyukki Good point - I can't find anything in the spec about this, so I guess we should just reject durations that contain Years/Months

miyukki commented 6 years ago

@thomshutt Sorry, it took so long. I fixed PR. Please review.

thomshutt commented 6 years ago

Thanks @miyukki, looks great!