Coder Social home page Coder Social logo

mpd's People

Contributors

aleksi avatar bikbah avatar kaey avatar maxkur avatar upovod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpd's Issues

The type Descriptor is too specific

There are many elements in the MPD which have DescriptorType such as Role, Reporting, Scope etc.

A DescriptorType element have three members

@schemeIdUri mandatory
@value optional
@id optional

but is somewhat more complex according to the xsd (ISO/IEC 23009-1 Section 5.8.3).

<!-- Descriptor -->
<xs:complexType name="DescriptorType">
  <xs:sequence>
    <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
<xs:attribute name="schemeIdUri" type="xs:anyURI" use="required"/> <xs:attribute name="value" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
Licensed to: Einarsson, Torbjörn Mr
Downloaded: 2019-09-18
 114
Single user licence only, copying and networking prohibited
􏰅 ISO􏰆IE􏰇 2019 􏰈 All rights reserved
</xs:complexType>

However, the code currently defines Descriptor to be a DRM-specific descriptor with Cenc and ppsh entries.
It would be good to rename that to DrmDescriptor or something similar and have a generic Descriptor type that
can be used for other values in the DRM.

Enhancements and typo

There are a few values that can be added for completeness.

  1. SegmentTemplate - can be part of AdaptationSet and should be added to the struct.
    <AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" bitstreamSwitching="false" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
      <SegmentTemplate timescale="90000" duration="180180" startNumber="1"/>
  1. Duration - should be added to SegmentTemplate.
Duration. *string `xml:"duration,attr"`
<SegmentTemplate timescale="44100" media="aac_$Number%09d$.mp4" initialization="aacinit.mp4" duration="88288" startNumber="1"/>
  1. AudioChannelConfiguration - should be added to Representation.
AudioChannelConfiguration *AudioChannelConfiguration `xml:"AudioChannelConfiguration,omitempty"`

type AudioChannelConfiguration struct {
    SchemeIDURI *string `xml:"schemeIdUri,attr"`
    Value       *string `xml:"value,attr,omitempty"`
}
<Representation id="6" bandwidth="192000" audioSamplingRate="48000" codecs="ec-3">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="6"/>
</Representation>

How to add optional attributes?

This looks like a nice library for manipulating DASH MPDs.

I'm considering using this library for a project similar to https://github.com/dash-Industry-Forum/dash-live-source-simulator in Go, but there are very many MPD nodes and attributes missing before I can use it.

I can make some PRs for the elements I'm missing, but would like to know to understand if you have a strong opinion on how to add optional attributes.

For example, I would like to add contentType to AdaptationSet, and I could either do it as

	ContentType             string           `xml:"contentType,attr,omitempty"`

or

ContentType             *string           `xml:"contentType,attr"`

In my view, the first approach should be more efficient since it avoids one level of pointers, and it is also more clear
(at least to me) that this is an optional attribute. However, I get the impression that you use the pointers like *string to signal that something is optional.

What is your recommendation?

Can you give example code

Based on timeline can can you give example to sync segment to wall clock time video and audio both. Dynamic and $number$ based template

Support multiple periods

The library seems to assume that the DASH file would only have one Period section, whereas it can have multiple, numbered periods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.