Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddContentProtection functions don't set AdaptationSet field in created object #30

Open
juliancooper opened this issue Apr 7, 2016 · 7 comments

Comments

@juliancooper
Copy link
Contributor

No description provided.

@kaihendry
Copy link

I think I've hit this issue whereby ContentProtection tags get stripped.

https://static.spuul.com/devops/2017-11-08/content-protection-stripped.txt

We are Brightcove customers, so we would appreciate some prioritisation here to get this addressed.

@thomshutt
Copy link
Contributor

Thanks for the example @kaihendry, I'll take a look today

@kaihendry
Copy link

In retrospect, I noticed https://github.com/zencoder/go-dash/blob/master/mpd/mpd.go#L90 where you omit empty ContentProtection lines. Tbh perhaps these lines have no value, though I don't understand the mpd/dash very well. Esp when it comes to DRM.

@thomshutt
Copy link
Contributor

Nope, this is definitely a bug - it seems that we always lose the ContentProtection block on read.

I'll try to get a PR in with a fix by the end of the day.

@thomshutt
Copy link
Contributor

thomshutt commented Nov 9, 2017

@kaihendry I've got a fix lined up, but there's an underlying Go bug golang/go#9519 with Unmarshalling namespaced XML attributes that's stopping it from working correctly. It's allegedly going to be fixed in the next version of Go, which should be released towards the end of 2017.

@kaihendry
Copy link

There is no workaround? Thought you get quite firm control if you override the unmarshalling functions. 😅

@Cawb07
Copy link
Contributor

Cawb07 commented Nov 14, 2018

Hey folks, have you considered stephen-fox's approach? I found it referencing that same golang/go issue. I'm gonna fork go-dash and give it a shot.

Watered down it pretty much consists of having separate structs for marshal & unmarshal:

type StructForUnmarshal struct {
    XMLName  xml.Name `xml:"Inform"`
    DeviceId DeviceId
}

type StructForMarshall struct {
    XMLName  xml.Name `xml:"cwmp:Inform"`
    DeviceId DeviceId
}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants