forked from j62/ctbrec
1
0
Fork 0

Add JAXB domain classes for MPEG-DASH manifests

This commit is contained in:
0xboobface 2019-11-30 16:37:39 +01:00
parent f23c33d30a
commit 40c910bd5c
36 changed files with 8375 additions and 0 deletions

View File

@ -0,0 +1,58 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for actuateType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="actuateType">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token">
* &lt;enumeration value="onLoad"/>
* &lt;enumeration value="onRequest"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@XmlType(name = "actuateType", namespace = "http://www.w3.org/1999/xlink")
@XmlEnum
public enum ActuateType {
@XmlEnumValue("onLoad")
ON_LOAD("onLoad"),
@XmlEnumValue("onRequest")
ON_REQUEST("onRequest");
private final String value;
ActuateType(String v) {
value = v;
}
public String value() {
return value;
}
public static ActuateType fromValue(String v) {
for (ActuateType c: ActuateType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,904 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for AdaptationSetType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="AdaptationSetType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}RepresentationBaseType">
* &lt;sequence>
* &lt;element name="Accessibility" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Role" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Rating" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Viewpoint" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="ContentComponent" type="{urn:mpeg:dash:schema:mpd:2011}ContentComponentType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="BaseURL" type="{urn:mpeg:dash:schema:mpd:2011}BaseURLType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SegmentBase" type="{urn:mpeg:dash:schema:mpd:2011}SegmentBaseType" minOccurs="0"/>
* &lt;element name="SegmentList" type="{urn:mpeg:dash:schema:mpd:2011}SegmentListType" minOccurs="0"/>
* &lt;element name="SegmentTemplate" type="{urn:mpeg:dash:schema:mpd:2011}SegmentTemplateType" minOccurs="0"/>
* &lt;element name="Representation" type="{urn:mpeg:dash:schema:mpd:2011}RepresentationType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}href"/>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}actuate"/>
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="group" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}language" />
* &lt;attribute name="contentType" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="par" type="{urn:mpeg:dash:schema:mpd:2011}RatioType" />
* &lt;attribute name="minBandwidth" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="maxBandwidth" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="minWidth" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="maxWidth" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="minHeight" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="maxHeight" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="minFrameRate" type="{urn:mpeg:dash:schema:mpd:2011}FrameRateType" />
* &lt;attribute name="maxFrameRate" type="{urn:mpeg:dash:schema:mpd:2011}FrameRateType" />
* &lt;attribute name="segmentAlignment" type="{urn:mpeg:dash:schema:mpd:2011}ConditionalUintType" default="false" />
* &lt;attribute name="subsegmentAlignment" type="{urn:mpeg:dash:schema:mpd:2011}ConditionalUintType" default="false" />
* &lt;attribute name="subsegmentStartsWithSAP" type="{urn:mpeg:dash:schema:mpd:2011}SAPType" default="0" />
* &lt;attribute name="bitstreamSwitching" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AdaptationSetType", propOrder = {
"accessibility",
"role",
"rating",
"viewpoint",
"contentComponent",
"baseURL",
"segmentBase",
"segmentList",
"segmentTemplate",
"representation"
})
public class AdaptationSetType
extends RepresentationBaseType
{
@XmlElement(name = "Accessibility")
protected List<DescriptorType> accessibility;
@XmlElement(name = "Role")
protected List<DescriptorType> role;
@XmlElement(name = "Rating")
protected List<DescriptorType> rating;
@XmlElement(name = "Viewpoint")
protected List<DescriptorType> viewpoint;
@XmlElement(name = "ContentComponent")
protected List<ContentComponentType> contentComponent;
@XmlElement(name = "BaseURL")
protected List<BaseURLType> baseURL;
@XmlElement(name = "SegmentBase")
protected SegmentBaseType segmentBase;
@XmlElement(name = "SegmentList")
protected SegmentListType segmentList;
@XmlElement(name = "SegmentTemplate")
protected SegmentTemplateType segmentTemplate;
@XmlElement(name = "Representation")
protected List<RepresentationType> representation;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
@XmlAttribute(name = "id")
@XmlSchemaType(name = "unsignedInt")
protected Long id;
@XmlAttribute(name = "group")
@XmlSchemaType(name = "unsignedInt")
protected Long group;
@XmlAttribute(name = "lang")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "language")
protected String lang;
@XmlAttribute(name = "contentType")
protected String contentType;
@XmlAttribute(name = "par")
protected String par;
@XmlAttribute(name = "minBandwidth")
@XmlSchemaType(name = "unsignedInt")
protected Long minBandwidth;
@XmlAttribute(name = "maxBandwidth")
@XmlSchemaType(name = "unsignedInt")
protected Long maxBandwidth;
@XmlAttribute(name = "minWidth")
@XmlSchemaType(name = "unsignedInt")
protected Long minWidth;
@XmlAttribute(name = "maxWidth")
@XmlSchemaType(name = "unsignedInt")
protected Long maxWidth;
@XmlAttribute(name = "minHeight")
@XmlSchemaType(name = "unsignedInt")
protected Long minHeight;
@XmlAttribute(name = "maxHeight")
@XmlSchemaType(name = "unsignedInt")
protected Long maxHeight;
@XmlAttribute(name = "minFrameRate")
protected String minFrameRate;
@XmlAttribute(name = "maxFrameRate")
protected String maxFrameRate;
@XmlAttribute(name = "segmentAlignment")
protected String segmentAlignment;
@XmlAttribute(name = "subsegmentAlignment")
protected String subsegmentAlignment;
@XmlAttribute(name = "subsegmentStartsWithSAP")
protected Long subsegmentStartsWithSAP;
@XmlAttribute(name = "bitstreamSwitching")
protected Boolean bitstreamSwitching;
/**
* Gets the value of the accessibility property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the accessibility property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAccessibility().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getAccessibility() {
if (accessibility == null) {
accessibility = new ArrayList<DescriptorType>();
}
return this.accessibility;
}
/**
* Gets the value of the role property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the role property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRole().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getRole() {
if (role == null) {
role = new ArrayList<DescriptorType>();
}
return this.role;
}
/**
* Gets the value of the rating property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the rating property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRating().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getRating() {
if (rating == null) {
rating = new ArrayList<DescriptorType>();
}
return this.rating;
}
/**
* Gets the value of the viewpoint property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the viewpoint property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getViewpoint().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getViewpoint() {
if (viewpoint == null) {
viewpoint = new ArrayList<DescriptorType>();
}
return this.viewpoint;
}
/**
* Gets the value of the contentComponent property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the contentComponent property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContentComponent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ContentComponentType }
*
*
*/
public List<ContentComponentType> getContentComponent() {
if (contentComponent == null) {
contentComponent = new ArrayList<ContentComponentType>();
}
return this.contentComponent;
}
/**
* Gets the value of the baseURL property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the baseURL property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getBaseURL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link BaseURLType }
*
*
*/
public List<BaseURLType> getBaseURL() {
if (baseURL == null) {
baseURL = new ArrayList<BaseURLType>();
}
return this.baseURL;
}
/**
* Gets the value of the segmentBase property.
*
* @return
* possible object is
* {@link SegmentBaseType }
*
*/
public SegmentBaseType getSegmentBase() {
return segmentBase;
}
/**
* Sets the value of the segmentBase property.
*
* @param value
* allowed object is
* {@link SegmentBaseType }
*
*/
public void setSegmentBase(SegmentBaseType value) {
this.segmentBase = value;
}
/**
* Gets the value of the segmentList property.
*
* @return
* possible object is
* {@link SegmentListType }
*
*/
public SegmentListType getSegmentList() {
return segmentList;
}
/**
* Sets the value of the segmentList property.
*
* @param value
* allowed object is
* {@link SegmentListType }
*
*/
public void setSegmentList(SegmentListType value) {
this.segmentList = value;
}
/**
* Gets the value of the segmentTemplate property.
*
* @return
* possible object is
* {@link SegmentTemplateType }
*
*/
public SegmentTemplateType getSegmentTemplate() {
return segmentTemplate;
}
/**
* Sets the value of the segmentTemplate property.
*
* @param value
* allowed object is
* {@link SegmentTemplateType }
*
*/
public void setSegmentTemplate(SegmentTemplateType value) {
this.segmentTemplate = value;
}
/**
* Gets the value of the representation property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the representation property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRepresentation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RepresentationType }
*
*
*/
public List<RepresentationType> getRepresentation() {
if (representation == null) {
representation = new ArrayList<RepresentationType>();
}
return this.representation;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
if (actuate == null) {
return ActuateType.ON_REQUEST;
} else {
return actuate;
}
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setId(Long value) {
this.id = value;
}
/**
* Gets the value of the group property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getGroup() {
return group;
}
/**
* Sets the value of the group property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setGroup(Long value) {
this.group = value;
}
/**
* Gets the value of the lang property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
/**
* Gets the value of the contentType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContentType() {
return contentType;
}
/**
* Sets the value of the contentType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContentType(String value) {
this.contentType = value;
}
/**
* Gets the value of the par property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPar() {
return par;
}
/**
* Sets the value of the par property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPar(String value) {
this.par = value;
}
/**
* Gets the value of the minBandwidth property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMinBandwidth() {
return minBandwidth;
}
/**
* Sets the value of the minBandwidth property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMinBandwidth(Long value) {
this.minBandwidth = value;
}
/**
* Gets the value of the maxBandwidth property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMaxBandwidth() {
return maxBandwidth;
}
/**
* Sets the value of the maxBandwidth property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMaxBandwidth(Long value) {
this.maxBandwidth = value;
}
/**
* Gets the value of the minWidth property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMinWidth() {
return minWidth;
}
/**
* Sets the value of the minWidth property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMinWidth(Long value) {
this.minWidth = value;
}
/**
* Gets the value of the maxWidth property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMaxWidth() {
return maxWidth;
}
/**
* Sets the value of the maxWidth property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMaxWidth(Long value) {
this.maxWidth = value;
}
/**
* Gets the value of the minHeight property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMinHeight() {
return minHeight;
}
/**
* Sets the value of the minHeight property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMinHeight(Long value) {
this.minHeight = value;
}
/**
* Gets the value of the maxHeight property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMaxHeight() {
return maxHeight;
}
/**
* Sets the value of the maxHeight property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMaxHeight(Long value) {
this.maxHeight = value;
}
/**
* Gets the value of the minFrameRate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMinFrameRate() {
return minFrameRate;
}
/**
* Sets the value of the minFrameRate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMinFrameRate(String value) {
this.minFrameRate = value;
}
/**
* Gets the value of the maxFrameRate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMaxFrameRate() {
return maxFrameRate;
}
/**
* Sets the value of the maxFrameRate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMaxFrameRate(String value) {
this.maxFrameRate = value;
}
/**
* Gets the value of the segmentAlignment property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSegmentAlignment() {
if (segmentAlignment == null) {
return "false";
} else {
return segmentAlignment;
}
}
/**
* Sets the value of the segmentAlignment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSegmentAlignment(String value) {
this.segmentAlignment = value;
}
/**
* Gets the value of the subsegmentAlignment property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubsegmentAlignment() {
if (subsegmentAlignment == null) {
return "false";
} else {
return subsegmentAlignment;
}
}
/**
* Sets the value of the subsegmentAlignment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubsegmentAlignment(String value) {
this.subsegmentAlignment = value;
}
/**
* Gets the value of the subsegmentStartsWithSAP property.
*
* @return
* possible object is
* {@link Long }
*
*/
public long getSubsegmentStartsWithSAP() {
if (subsegmentStartsWithSAP == null) {
return 0L;
} else {
return subsegmentStartsWithSAP;
}
}
/**
* Sets the value of the subsegmentStartsWithSAP property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setSubsegmentStartsWithSAP(Long value) {
this.subsegmentStartsWithSAP = value;
}
/**
* Gets the value of the bitstreamSwitching property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isBitstreamSwitching() {
return bitstreamSwitching;
}
/**
* Sets the value of the bitstreamSwitching property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setBitstreamSwitching(Boolean value) {
this.bitstreamSwitching = value;
}
}

View File

@ -0,0 +1,202 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName;
/**
* <p>Java class for BaseURLType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="BaseURLType">
* &lt;simpleContent>
* &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>anyURI">
* &lt;attribute name="serviceLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="byteRange" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="availabilityTimeOffset" type="{http://www.w3.org/2001/XMLSchema}double" />
* &lt;attribute name="availabilityTimeComplete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/simpleContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BaseURLType", propOrder = {
"value"
})
public class BaseURLType {
@XmlValue
@XmlSchemaType(name = "anyURI")
protected String value;
@XmlAttribute(name = "serviceLocation")
protected String serviceLocation;
@XmlAttribute(name = "byteRange")
protected String byteRange;
@XmlAttribute(name = "availabilityTimeOffset")
protected Double availabilityTimeOffset;
@XmlAttribute(name = "availabilityTimeComplete")
protected Boolean availabilityTimeComplete;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the serviceLocation property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getServiceLocation() {
return serviceLocation;
}
/**
* Sets the value of the serviceLocation property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setServiceLocation(String value) {
this.serviceLocation = value;
}
/**
* Gets the value of the byteRange property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getByteRange() {
return byteRange;
}
/**
* Sets the value of the byteRange property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setByteRange(String value) {
this.byteRange = value;
}
/**
* Gets the value of the availabilityTimeOffset property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getAvailabilityTimeOffset() {
return availabilityTimeOffset;
}
/**
* Sets the value of the availabilityTimeOffset property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setAvailabilityTimeOffset(Double value) {
this.availabilityTimeOffset = value;
}
/**
* Gets the value of the availabilityTimeComplete property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAvailabilityTimeComplete() {
return availabilityTimeComplete;
}
/**
* Sets the value of the availabilityTimeComplete property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAvailabilityTimeComplete(Boolean value) {
this.availabilityTimeComplete = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,351 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for ContentComponentType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ContentComponentType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Accessibility" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Role" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Rating" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Viewpoint" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}language" />
* &lt;attribute name="contentType" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="par" type="{urn:mpeg:dash:schema:mpd:2011}RatioType" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContentComponentType", propOrder = {
"accessibility",
"role",
"rating",
"viewpoint",
"any"
})
public class ContentComponentType {
@XmlElement(name = "Accessibility")
protected List<DescriptorType> accessibility;
@XmlElement(name = "Role")
protected List<DescriptorType> role;
@XmlElement(name = "Rating")
protected List<DescriptorType> rating;
@XmlElement(name = "Viewpoint")
protected List<DescriptorType> viewpoint;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "id")
@XmlSchemaType(name = "unsignedInt")
protected Long id;
@XmlAttribute(name = "lang")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "language")
protected String lang;
@XmlAttribute(name = "contentType")
protected String contentType;
@XmlAttribute(name = "par")
protected String par;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the accessibility property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the accessibility property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAccessibility().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getAccessibility() {
if (accessibility == null) {
accessibility = new ArrayList<DescriptorType>();
}
return this.accessibility;
}
/**
* Gets the value of the role property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the role property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRole().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getRole() {
if (role == null) {
role = new ArrayList<DescriptorType>();
}
return this.role;
}
/**
* Gets the value of the rating property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the rating property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRating().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getRating() {
if (rating == null) {
rating = new ArrayList<DescriptorType>();
}
return this.rating;
}
/**
* Gets the value of the viewpoint property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the viewpoint property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getViewpoint().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getViewpoint() {
if (viewpoint == null) {
viewpoint = new ArrayList<DescriptorType>();
}
return this.viewpoint;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setId(Long value) {
this.id = value;
}
/**
* Gets the value of the lang property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
/**
* Gets the value of the contentType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContentType() {
return contentType;
}
/**
* Sets the value of the contentType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContentType(String value) {
this.contentType = value;
}
/**
* Gets the value of the par property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPar() {
return par;
}
/**
* Sets the value of the par property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPar(String value) {
this.par = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,334 @@
package ctbrec.recorder.download.dash;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.net.URL;
import java.nio.file.Path;
import java.text.DecimalFormat;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ctbrec.Config;
import ctbrec.Model;
import ctbrec.Recording;
import ctbrec.io.HttpClient;
import ctbrec.recorder.download.Download;
import ctbrec.recorder.download.dash.SegmentTimelineType.S;
import okhttp3.Request;
import okhttp3.Response;
public class DashDownload implements Download {
private static final Logger LOG = LoggerFactory.getLogger(DashDownload.class);
private int audioCounter = 0;
private int videoCounter = 0;
private DecimalFormat df = new DecimalFormat("00000");
private boolean videoInitLoaded = false;
private boolean audioInitLoaded = false;
private BigInteger lastAudioTimestamp = BigInteger.ZERO;
private BigInteger lastVideoTimestamp = BigInteger.ZERO;
private Object downloadFinished = new Object();
private HttpClient httpClient;
private Config config;
private Model model;
private Instant startTime;
private Instant endTime;
private Path downloadDir;
private String manifestUrl;
private boolean running = false;
private File targetFile;
public DashDownload(HttpClient httpClient, String manifestUrl) {
this.httpClient = httpClient;
this.manifestUrl = manifestUrl;
}
private String getManifest(String url) throws IOException {
// @formatter:off
Request request = new Request.Builder()
.url(url)
.header("Accept", "*/*")
.header("Accept-Language", "en-US,en;q=0.5")
.header("User-Agent", config.getSettings().httpUserAgent)
.header("Origin", model.getSite().getBaseUrl())
.header("Referer", model.getSite().getBaseUrl())
.header("Connection", "keep-alive")
.build(); // @formatter:on
LOG.trace("Loading manifest {}", url);
try (Response response = httpClient.execute(request)) {
return response.body().string();
}
}
private AdaptationSetType chooseBestVideo(List<AdaptationSetType> videoStreams) {
AdaptationSetType best = null;
long bestWidth = 0;
for (AdaptationSetType stream : videoStreams) {
if (stream.getWidth() > bestWidth) {
bestWidth = stream.getWidth();
best = stream;
}
}
return best;
}
private RepresentationType chooseBestRepresentation(List<RepresentationType> representations) {
RepresentationType best = null;
long bestBandwidth = 0;
for (RepresentationType rep : representations) {
if (rep.getBandwidth() > bestBandwidth) {
bestBandwidth = rep.getBandwidth();
best = rep;
}
}
return best;
}
private int downloadSegments(MPDtype mpd, AdaptationSetType adaptationSet, boolean isVideo) throws IOException {
if (adaptationSet == null) {
return 0;
}
SegmentTemplateType segmentTemplate = adaptationSet.getSegmentTemplate();
RepresentationType representation = chooseBestRepresentation(adaptationSet.getRepresentation());
int downloaded = downloadInitChunksForVideoAndAudio(isVideo, mpd, segmentTemplate, representation);
String media = segmentTemplate.getMedia();
media = media.replaceAll("\\$RepresentationID\\$", representation.getId()); // NOSONAR
List<S> segments = segmentTemplate.getSegmentTimeline().getS();
if (!segments.isEmpty()) {
BigInteger timestamp = segments.get(0).getT();
BigInteger duration = BigInteger.ZERO;
for (S s : segments) {
timestamp = timestamp.add(duration);
if (isVideo && timestamp.compareTo(lastVideoTimestamp) > 0 || !isVideo && timestamp.compareTo(lastAudioTimestamp) > 0) {
if (isVideo) {
lastVideoTimestamp = timestamp;
} else {
lastAudioTimestamp = timestamp;
}
String segmentUrl = media.replaceAll("\\$Time\\$", timestamp.toString());
duration = s.getD();
URL absUrl = new URL(new URL(mpd.getLocation().get(0)), segmentUrl);
download(downloadDir.toFile().getCanonicalPath(), absUrl, isVideo);
downloaded++;
}
}
}
return downloaded;
}
private int downloadInitChunksForVideoAndAudio(boolean isVideo, MPDtype mpd, SegmentTemplateType segmentTemplate, RepresentationType representation)
throws IOException {
if (isVideo && !videoInitLoaded || !isVideo && !audioInitLoaded) {
String initialization = segmentTemplate.getInitializationAttribute();
initialization = initialization.replaceAll("\\$RepresentationID\\$", representation.getId());
URL initUrl = new URL(new URL(mpd.getLocation().get(0)), initialization);
download(downloadDir.toFile().getCanonicalPath(), initUrl, isVideo);
if (isVideo) {
LOG.debug("Video init chunk loaded");
videoInitLoaded = true;
} else {
LOG.debug("Audio init chunk loaded");
audioInitLoaded = true;
}
return 1;
} else {
return 0;
}
}
private void download(String dir, URL url, boolean isVideo) throws IOException {
// @formatter:off
Request request = new Request.Builder()
.url(url)
.header("Accept", "*/*")
.header("Accept-Language", "en-US,en;q=0.5")
.header("User-Agent", config.getSettings().httpUserAgent)
.header("Origin", model.getSite().getBaseUrl())
.header("Referer", model.getSite().getBaseUrl())
.header("Connection", "keep-alive")
.build(); // @formatter:on
int tries = 1;
try (Response response = httpClient.execute(request)) {
InputStream in = response.body().byteStream();
String absFile = url.getFile();
String prefix = isVideo ? "video" : "audio";
int c = isVideo ? videoCounter++ : audioCounter++;
File targetFile = new File(dir, prefix + '_' + df.format(c) + '_' + new File(absFile).getName());
while(tries <= 10) {
if (!targetFile.exists() || targetFile.length() == 0) {
LOG.trace("Loading segment, try {}, {} {} {}", tries, response.code(), response.headers().values("Content-Length"), url);
try (FileOutputStream out = new FileOutputStream(targetFile)) {
byte[] b = new byte[1024];
int len = -1;
while ((len = in.read(b)) >= 0) {
out.write(b, 0, len);
}
out.flush();
}
} else {
break;
}
tries++;
}
}
}
@Override
public void init(Config config, Model model) {
this.config = config;
this.model = model;
startTime = Instant.now();
targetFile = Config.getInstance().getFileForRecording(model, "mp4");
downloadDir = targetFile.getParentFile().toPath();
}
@Override
public void start() throws IOException {
try {
running = true;
JAXBContext jc = JAXBContext.newInstance(MPDtype.class.getPackage().getName());
Unmarshaller u = jc.createUnmarshaller();
while (running && !Thread.currentThread().isInterrupted()) {
downloadManifestAndItsSegments(u);
}
} catch (Exception e) {
LOG.error("Error while downloading dash stream", e);
} finally {
running = false;
endTime = Instant.now();
synchronized (downloadFinished) {
downloadFinished.notifyAll();
}
}
}
private void downloadManifestAndItsSegments(Unmarshaller u) throws IOException, JAXBException {
String manifest = getManifest(manifestUrl);
LOG.trace("Manifest: {}", manifest);
@SuppressWarnings("unchecked")
JAXBElement<MPDtype> root = (JAXBElement<MPDtype>) u.unmarshal(new ByteArrayInputStream(manifest.getBytes()));
MPDtype mpd = root.getValue();
List<PeriodType> periods = mpd.getPeriod();
for (PeriodType period : periods) {
List<AdaptationSetType> videoStreams = new ArrayList<>();
List<AdaptationSetType> audioStreams = new ArrayList<>();
List<AdaptationSetType> adaptationSets = period.getAdaptationSet();
for (AdaptationSetType adaptationSet : adaptationSets) {
String mimeType = adaptationSet.getMimeType();
if (mimeType.equalsIgnoreCase("video/mp4")) {
videoStreams.add(adaptationSet);
} else if (mimeType.equalsIgnoreCase("audio/mp4")) {
audioStreams.add(adaptationSet);
}
}
downloadDir.toFile().mkdirs();
AdaptationSetType video = chooseBestVideo(videoStreams);
int downloaded = downloadSegments(mpd, video, true);
AdaptationSetType audio = audioStreams.isEmpty() ? null : audioStreams.get(0);
downloaded += downloadSegments(mpd, audio, false);
if (downloaded == 0) {
LOG.trace("No new segments - Sleeping a bit");
waitSomeTime();
}
}
}
@Override
public void stop() {
if (running) {
internalStop();
try {
while(running) {
synchronized (downloadFinished) {
downloadFinished.wait(TimeUnit.SECONDS.toMillis(1));
}
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.error("Couldn't wait for download to finish", e);
}
}
}
void internalStop() {
running = false;
}
@Override
public Model getModel() {
return model;
}
@Override
public Instant getStartTime() {
return startTime;
}
@Override
public Duration getLength() {
return Duration.between(startTime, Optional.ofNullable(endTime).orElse(Instant.now()));
}
@Override
public void postprocess(Recording recording) {
try {
new FfmpegMuxer(downloadDir.toFile(), targetFile.getName());
} catch (IOException e) {
LOG.error("Error while merging dash segments", e);
}
}
@Override
public File getTarget() {
return targetFile;
}
@Override
public String getPath(Model model) {
String absolutePath = targetFile.getAbsolutePath();
String recordingsDir = Config.getInstance().getSettings().recordingsDir;
String relativePath = absolutePath.replaceFirst(Pattern.quote(recordingsDir), "");
return relativePath;
}
/**
* Causes the current thread to sleep for a short amount of time. This is used to slow down retries, if something is wrong with the playlist. E.g. HTTP 403
* or 404
*/
private void waitSomeTime() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}

View File

@ -0,0 +1,187 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for DescriptorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="DescriptorType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="schemeIdUri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DescriptorType", propOrder = {
"any"
})
public class DescriptorType {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "schemeIdUri", required = true)
@XmlSchemaType(name = "anyURI")
protected String schemeIdUri;
@XmlAttribute(name = "value")
protected String value;
@XmlAttribute(name = "id")
protected String id;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the schemeIdUri property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSchemeIdUri() {
return schemeIdUri;
}
/**
* Sets the value of the schemeIdUri property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSchemeIdUri(String value) {
this.schemeIdUri = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,283 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for EventStreamType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="EventStreamType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Event" type="{urn:mpeg:dash:schema:mpd:2011}EventType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}href"/>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}actuate"/>
* &lt;attribute name="messageData" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="schemeIdUri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="timescale" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EventStreamType", propOrder = {
"event",
"any"
})
public class EventStreamType {
@XmlElement(name = "Event")
protected List<EventType> event;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
@XmlAttribute(name = "messageData")
@XmlSchemaType(name = "anyURI")
protected String messageData;
@XmlAttribute(name = "schemeIdUri", required = true)
@XmlSchemaType(name = "anyURI")
protected String schemeIdUri;
@XmlAttribute(name = "value")
protected String value;
@XmlAttribute(name = "timescale")
@XmlSchemaType(name = "unsignedInt")
protected Long timescale;
/**
* Gets the value of the event property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the event property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEvent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link EventType }
*
*
*/
public List<EventType> getEvent() {
if (event == null) {
event = new ArrayList<EventType>();
}
return this.event;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
if (actuate == null) {
return ActuateType.ON_REQUEST;
} else {
return actuate;
}
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
/**
* Gets the value of the messageData property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessageData() {
return messageData;
}
/**
* Sets the value of the messageData property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessageData(String value) {
this.messageData = value;
}
/**
* Gets the value of the schemeIdUri property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSchemeIdUri() {
return schemeIdUri;
}
/**
* Sets the value of the schemeIdUri property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSchemeIdUri(String value) {
this.schemeIdUri = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the timescale property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getTimescale() {
return timescale;
}
/**
* Sets the value of the timescale property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setTimescale(Long value) {
this.timescale = value;
}
}

View File

@ -0,0 +1,221 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for EventType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="EventType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="presentationTime" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" default="0" />
* &lt;attribute name="duration" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="messageData" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EventType", propOrder = {
"any"
})
public class EventType {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "presentationTime")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger presentationTime;
@XmlAttribute(name = "duration")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger duration;
@XmlAttribute(name = "id")
@XmlSchemaType(name = "unsignedInt")
protected Long id;
@XmlAttribute(name = "messageData")
protected String messageData;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the presentationTime property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getPresentationTime() {
if (presentationTime == null) {
return new BigInteger("0");
} else {
return presentationTime;
}
}
/**
* Sets the value of the presentationTime property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPresentationTime(BigInteger value) {
this.presentationTime = value;
}
/**
* Gets the value of the duration property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getDuration() {
return duration;
}
/**
* Sets the value of the duration property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setDuration(BigInteger value) {
this.duration = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setId(Long value) {
this.id = value;
}
/**
* Gets the value of the messageData property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessageData() {
return messageData;
}
/**
* Sets the value of the messageData property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessageData(String value) {
this.messageData = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,101 @@
package ctbrec.recorder.download.dash;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ctbrec.io.StreamRedirectThread;
public class FfmpegMuxer {
private static final Logger LOG = LoggerFactory.getLogger(FfmpegMuxer.class);
private static final int ALL_GOOD = 0;
File segmentDir;
public FfmpegMuxer(File segmentDir, String targetFileName) throws IOException {
this.segmentDir = segmentDir;
String[] videoSegments = segmentDir.list((dir, name) -> name.startsWith("video_"));
Arrays.sort(videoSegments);
String[] audioSegments = segmentDir.list((dir, name) -> name.startsWith("audio_"));
Arrays.sort(audioSegments);
File mp4VideoTrack = new File(segmentDir, "video.mp4");
mergeSegments(videoSegments, mp4VideoTrack);
File mp4AudioTrack = new File(segmentDir, "audio.mp4");
mergeSegments(audioSegments, mp4AudioTrack);
int exitCode = mergeTracks(mp4VideoTrack, mp4AudioTrack, new File(segmentDir, targetFileName));
if (exitCode == ALL_GOOD) {
LOG.debug("Deleting merged video and audio tracks");
Files.delete(mp4VideoTrack.toPath());
Files.delete(mp4AudioTrack.toPath());
LOG.debug("Deleting segments");
deleteFiles(segmentDir, videoSegments);
deleteFiles(segmentDir, audioSegments);
} else {
throw new ProcessExitedUncleanException("FFMPEG exited with " + exitCode);
}
}
private void deleteFiles(File dir, String[] files) {
for (String file : files) {
File absFile = new File(dir, file);
try {
Files.delete(absFile.toPath());
} catch(IOException e) {
LOG.info("Couldn't delete segment {}", absFile, e);
}
}
}
private void mergeSegments(String[] segments, File toFile) throws IOException {
try (FileOutputStream out = new FileOutputStream(toFile)) {
for (String segment : segments) {
try (FileInputStream in = new FileInputStream(new File(segmentDir, segment))) {
byte[] buffer = new byte[1024];
int len = -1;
while ((len = in.read(buffer)) >= 0) {
out.write(buffer, 0, len);
}
}
}
}
}
private int mergeTracks(File mp4VideoTrack, File mp4AudioTrack, File output) throws IOException {
try {
LOG.debug("Merging:\n{}\n{}\n{}", mp4VideoTrack, mp4AudioTrack, output);
// @formatter:off
String[] cmdline = new String[] {
"ffmpeg",
"-i", mp4VideoTrack.getCanonicalPath(),
"-i", mp4AudioTrack.getCanonicalPath(),
"-c:v", "copy",
"-c:a", "copy",
output.getCanonicalPath()
};
// @formatter:on
LOG.debug("Command line: {}", Arrays.toString(cmdline));
Process ffmpeg = Runtime.getRuntime().exec(cmdline);
new Thread(new StreamRedirectThread(ffmpeg.getInputStream(), System.out)).start(); // NOSONAR
new Thread(new StreamRedirectThread(ffmpeg.getErrorStream(), System.err)).start(); // NOSONAR
return ffmpeg.waitFor();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.error("Interrupted while waiting for FFMPEG", e);
return 1;
}
}
public static class ProcessExitedUncleanException extends RuntimeException {
public ProcessExitedUncleanException(String msg) {
super(msg);
}
}
}

View File

@ -0,0 +1,731 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for MPDtype complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="MPDtype">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="ProgramInformation" type="{urn:mpeg:dash:schema:mpd:2011}ProgramInformationType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="BaseURL" type="{urn:mpeg:dash:schema:mpd:2011}BaseURLType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Location" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Period" type="{urn:mpeg:dash:schema:mpd:2011}PeriodType" maxOccurs="unbounded"/>
* &lt;element name="Metrics" type="{urn:mpeg:dash:schema:mpd:2011}MetricsType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="EssentialProperty" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SupplementalProperty" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="UTCTiming" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="profiles" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="type" type="{urn:mpeg:dash:schema:mpd:2011}PresentationType" default="static" />
* &lt;attribute name="availabilityStartTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* &lt;attribute name="availabilityEndTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* &lt;attribute name="publishTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* &lt;attribute name="mediaPresentationDuration" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="minimumUpdatePeriod" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="minBufferTime" use="required" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="timeShiftBufferDepth" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="suggestedPresentationDelay" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="maxSegmentDuration" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="maxSubsegmentDuration" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MPDtype", propOrder = {
"programInformation",
"baseURL",
"location",
"period",
"metrics",
"essentialProperty",
"supplementalProperty",
"utcTiming",
"any"
})
public class MPDtype {
@XmlElement(name = "ProgramInformation")
protected List<ProgramInformationType> programInformation;
@XmlElement(name = "BaseURL")
protected List<BaseURLType> baseURL;
@XmlElement(name = "Location")
@XmlSchemaType(name = "anyURI")
protected List<String> location;
@XmlElement(name = "Period", required = true)
protected List<PeriodType> period;
@XmlElement(name = "Metrics")
protected List<MetricsType> metrics;
@XmlElement(name = "EssentialProperty")
protected List<DescriptorType> essentialProperty;
@XmlElement(name = "SupplementalProperty")
protected List<DescriptorType> supplementalProperty;
@XmlElement(name = "UTCTiming")
protected List<DescriptorType> utcTiming;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "id")
protected String id;
@XmlAttribute(name = "profiles", required = true)
protected String profiles;
@XmlAttribute(name = "type")
protected PresentationType type;
@XmlAttribute(name = "availabilityStartTime")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar availabilityStartTime;
@XmlAttribute(name = "availabilityEndTime")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar availabilityEndTime;
@XmlAttribute(name = "publishTime")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar publishTime;
@XmlAttribute(name = "mediaPresentationDuration")
protected Duration mediaPresentationDuration;
@XmlAttribute(name = "minimumUpdatePeriod")
protected Duration minimumUpdatePeriod;
@XmlAttribute(name = "minBufferTime", required = true)
protected Duration minBufferTime;
@XmlAttribute(name = "timeShiftBufferDepth")
protected Duration timeShiftBufferDepth;
@XmlAttribute(name = "suggestedPresentationDelay")
protected Duration suggestedPresentationDelay;
@XmlAttribute(name = "maxSegmentDuration")
protected Duration maxSegmentDuration;
@XmlAttribute(name = "maxSubsegmentDuration")
protected Duration maxSubsegmentDuration;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the programInformation property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the programInformation property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getProgramInformation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ProgramInformationType }
*
*
*/
public List<ProgramInformationType> getProgramInformation() {
if (programInformation == null) {
programInformation = new ArrayList<ProgramInformationType>();
}
return this.programInformation;
}
/**
* Gets the value of the baseURL property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the baseURL property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getBaseURL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link BaseURLType }
*
*
*/
public List<BaseURLType> getBaseURL() {
if (baseURL == null) {
baseURL = new ArrayList<BaseURLType>();
}
return this.baseURL;
}
/**
* Gets the value of the location property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the location property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLocation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getLocation() {
if (location == null) {
location = new ArrayList<String>();
}
return this.location;
}
/**
* Gets the value of the period property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the period property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPeriod().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link PeriodType }
*
*
*/
public List<PeriodType> getPeriod() {
if (period == null) {
period = new ArrayList<PeriodType>();
}
return this.period;
}
/**
* Gets the value of the metrics property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the metrics property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMetrics().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link MetricsType }
*
*
*/
public List<MetricsType> getMetrics() {
if (metrics == null) {
metrics = new ArrayList<MetricsType>();
}
return this.metrics;
}
/**
* Gets the value of the essentialProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the essentialProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEssentialProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getEssentialProperty() {
if (essentialProperty == null) {
essentialProperty = new ArrayList<DescriptorType>();
}
return this.essentialProperty;
}
/**
* Gets the value of the supplementalProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the supplementalProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSupplementalProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getSupplementalProperty() {
if (supplementalProperty == null) {
supplementalProperty = new ArrayList<DescriptorType>();
}
return this.supplementalProperty;
}
/**
* Gets the value of the utcTiming property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the utcTiming property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getUTCTiming().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getUTCTiming() {
if (utcTiming == null) {
utcTiming = new ArrayList<DescriptorType>();
}
return this.utcTiming;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the profiles property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfiles() {
return profiles;
}
/**
* Sets the value of the profiles property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfiles(String value) {
this.profiles = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link PresentationType }
*
*/
public PresentationType getType() {
if (type == null) {
return PresentationType.STATIC;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link PresentationType }
*
*/
public void setType(PresentationType value) {
this.type = value;
}
/**
* Gets the value of the availabilityStartTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getAvailabilityStartTime() {
return availabilityStartTime;
}
/**
* Sets the value of the availabilityStartTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setAvailabilityStartTime(XMLGregorianCalendar value) {
this.availabilityStartTime = value;
}
/**
* Gets the value of the availabilityEndTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getAvailabilityEndTime() {
return availabilityEndTime;
}
/**
* Sets the value of the availabilityEndTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setAvailabilityEndTime(XMLGregorianCalendar value) {
this.availabilityEndTime = value;
}
/**
* Gets the value of the publishTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getPublishTime() {
return publishTime;
}
/**
* Sets the value of the publishTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setPublishTime(XMLGregorianCalendar value) {
this.publishTime = value;
}
/**
* Gets the value of the mediaPresentationDuration property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getMediaPresentationDuration() {
return mediaPresentationDuration;
}
/**
* Sets the value of the mediaPresentationDuration property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setMediaPresentationDuration(Duration value) {
this.mediaPresentationDuration = value;
}
/**
* Gets the value of the minimumUpdatePeriod property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getMinimumUpdatePeriod() {
return minimumUpdatePeriod;
}
/**
* Sets the value of the minimumUpdatePeriod property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setMinimumUpdatePeriod(Duration value) {
this.minimumUpdatePeriod = value;
}
/**
* Gets the value of the minBufferTime property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getMinBufferTime() {
return minBufferTime;
}
/**
* Sets the value of the minBufferTime property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setMinBufferTime(Duration value) {
this.minBufferTime = value;
}
/**
* Gets the value of the timeShiftBufferDepth property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getTimeShiftBufferDepth() {
return timeShiftBufferDepth;
}
/**
* Sets the value of the timeShiftBufferDepth property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setTimeShiftBufferDepth(Duration value) {
this.timeShiftBufferDepth = value;
}
/**
* Gets the value of the suggestedPresentationDelay property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getSuggestedPresentationDelay() {
return suggestedPresentationDelay;
}
/**
* Sets the value of the suggestedPresentationDelay property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setSuggestedPresentationDelay(Duration value) {
this.suggestedPresentationDelay = value;
}
/**
* Gets the value of the maxSegmentDuration property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getMaxSegmentDuration() {
return maxSegmentDuration;
}
/**
* Sets the value of the maxSegmentDuration property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setMaxSegmentDuration(Duration value) {
this.maxSegmentDuration = value;
}
/**
* Gets the value of the maxSubsegmentDuration property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getMaxSubsegmentDuration() {
return maxSubsegmentDuration;
}
/**
* Sets the value of the maxSubsegmentDuration property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setMaxSubsegmentDuration(Duration value) {
this.maxSubsegmentDuration = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,66 @@
package ctbrec.recorder.download.dash;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Arrays;
import org.mp4parser.Container;
import org.mp4parser.muxer.Movie;
import org.mp4parser.muxer.Track;
import org.mp4parser.muxer.builder.DefaultMp4Builder;
import org.mp4parser.muxer.container.mp4.MovieCreator;
public class MergerMuxer {
File segmentDir;
public MergerMuxer(File segmentDir) throws IOException {
this.segmentDir = segmentDir;
String[] videoSegments = segmentDir.list((dir, name) -> name.startsWith("video_"));
Arrays.sort(videoSegments);
String[] audioSegments = segmentDir.list((dir, name) -> name.startsWith("audio_"));
Arrays.sort(audioSegments);
File mp4VideoTrack = new File(segmentDir, "video.mp4");
mergeSegments(videoSegments, mp4VideoTrack);
File mp4AudioTrack = new File(segmentDir, "audio.mp4");
mergeSegments(audioSegments, mp4AudioTrack);
mergeTracks(mp4VideoTrack, mp4AudioTrack, new File(segmentDir, "merged.mp4"));
Files.delete(mp4VideoTrack.toPath());
Files.delete(mp4AudioTrack.toPath());
}
private void mergeSegments(String[] segments, File toFile) throws IOException {
try (FileOutputStream out = new FileOutputStream(toFile)) {
for (String segment : segments) {
try (FileInputStream in = new FileInputStream(new File(segmentDir, segment))) {
byte[] buffer = new byte[1024];
int len = -1;
while ((len = in.read(buffer)) >= 0) {
out.write(buffer, 0, len);
}
}
}
}
}
private void mergeTracks(File mp4VideoTrack, File mp4AudioTrack, File output) throws IOException {
Movie videoMovie = MovieCreator.build(mp4VideoTrack.getCanonicalPath());
Track videoTrack = videoMovie.getTracks().get(0);
Movie audioMovie = MovieCreator.build(mp4AudioTrack.getCanonicalPath());
Track audioTrack = audioMovie.getTracks().get(0);
Movie merged = new Movie();
merged.addTrack(videoTrack);
merged.addTrack(audioTrack);
try (FileOutputStream out = new FileOutputStream(output)) {
DefaultMp4Builder builder = new DefaultMp4Builder();
Container stdMp4 = builder.build(merged);
stdMp4.writeContainer(out.getChannel());
}
}
}

View File

@ -0,0 +1,198 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for MetricsType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="MetricsType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Reporting" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded"/>
* &lt;element name="Range" type="{urn:mpeg:dash:schema:mpd:2011}RangeType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="metrics" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MetricsType", propOrder = {
"reporting",
"range",
"any"
})
public class MetricsType {
@XmlElement(name = "Reporting", required = true)
protected List<DescriptorType> reporting;
@XmlElement(name = "Range")
protected List<RangeType> range;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "metrics", required = true)
protected String metrics;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the reporting property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the reporting property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getReporting().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getReporting() {
if (reporting == null) {
reporting = new ArrayList<DescriptorType>();
}
return this.reporting;
}
/**
* Gets the value of the range property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the range property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRange().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RangeType }
*
*
*/
public List<RangeType> getRange() {
if (range == null) {
range = new ArrayList<RangeType>();
}
return this.range;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the metrics property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMetrics() {
return metrics;
}
/**
* Sets the value of the metrics property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMetrics(String value) {
this.metrics = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,163 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for MultipleSegmentBaseType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="MultipleSegmentBaseType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}SegmentBaseType">
* &lt;sequence>
* &lt;element name="SegmentTimeline" type="{urn:mpeg:dash:schema:mpd:2011}SegmentTimelineType" minOccurs="0"/>
* &lt;element name="BitstreamSwitching" type="{urn:mpeg:dash:schema:mpd:2011}URLType" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="duration" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="startNumber" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MultipleSegmentBaseType", propOrder = {
"segmentTimeline",
"bitstreamSwitching"
})
@XmlSeeAlso({
SegmentTemplateType.class,
SegmentListType.class
})
public class MultipleSegmentBaseType
extends SegmentBaseType
{
@XmlElement(name = "SegmentTimeline")
protected SegmentTimelineType segmentTimeline;
@XmlElement(name = "BitstreamSwitching")
protected URLType bitstreamSwitching;
@XmlAttribute(name = "duration")
@XmlSchemaType(name = "unsignedInt")
protected Long duration;
@XmlAttribute(name = "startNumber")
@XmlSchemaType(name = "unsignedInt")
protected Long startNumber;
/**
* Gets the value of the segmentTimeline property.
*
* @return
* possible object is
* {@link SegmentTimelineType }
*
*/
public SegmentTimelineType getSegmentTimeline() {
return segmentTimeline;
}
/**
* Sets the value of the segmentTimeline property.
*
* @param value
* allowed object is
* {@link SegmentTimelineType }
*
*/
public void setSegmentTimeline(SegmentTimelineType value) {
this.segmentTimeline = value;
}
/**
* Gets the value of the bitstreamSwitching property.
*
* @return
* possible object is
* {@link URLType }
*
*/
public URLType getBitstreamSwitching() {
return bitstreamSwitching;
}
/**
* Sets the value of the bitstreamSwitching property.
*
* @param value
* allowed object is
* {@link URLType }
*
*/
public void setBitstreamSwitching(URLType value) {
this.bitstreamSwitching = value;
}
/**
* Gets the value of the duration property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getDuration() {
return duration;
}
/**
* Sets the value of the duration property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setDuration(Long value) {
this.duration = value;
}
/**
* Gets the value of the startNumber property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getStartNumber() {
return startNumber;
}
/**
* Sets the value of the startNumber property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setStartNumber(Long value) {
this.startNumber = value;
}
}

View File

@ -0,0 +1,244 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the ctbrec.dash package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _MPD_QNAME = new QName("urn:mpeg:dash:schema:mpd:2011", "MPD");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: ctbrec.dash
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link SegmentTimelineType }
*
*/
public SegmentTimelineType createSegmentTimelineType() {
return new SegmentTimelineType();
}
/**
* Create an instance of {@link MPDtype }
*
*/
public MPDtype createMPDtype() {
return new MPDtype();
}
/**
* Create an instance of {@link PeriodType }
*
*/
public PeriodType createPeriodType() {
return new PeriodType();
}
/**
* Create an instance of {@link RepresentationBaseType }
*
*/
public RepresentationBaseType createRepresentationBaseType() {
return new RepresentationBaseType();
}
/**
* Create an instance of {@link EventType }
*
*/
public EventType createEventType() {
return new EventType();
}
/**
* Create an instance of {@link SubsetType }
*
*/
public SubsetType createSubsetType() {
return new SubsetType();
}
/**
* Create an instance of {@link ProgramInformationType }
*
*/
public ProgramInformationType createProgramInformationType() {
return new ProgramInformationType();
}
/**
* Create an instance of {@link BaseURLType }
*
*/
public BaseURLType createBaseURLType() {
return new BaseURLType();
}
/**
* Create an instance of {@link RepresentationType }
*
*/
public RepresentationType createRepresentationType() {
return new RepresentationType();
}
/**
* Create an instance of {@link RangeType }
*
*/
public RangeType createRangeType() {
return new RangeType();
}
/**
* Create an instance of {@link EventStreamType }
*
*/
public EventStreamType createEventStreamType() {
return new EventStreamType();
}
/**
* Create an instance of {@link SegmentBaseType }
*
*/
public SegmentBaseType createSegmentBaseType() {
return new SegmentBaseType();
}
/**
* Create an instance of {@link MetricsType }
*
*/
public MetricsType createMetricsType() {
return new MetricsType();
}
/**
* Create an instance of {@link SegmentTemplateType }
*
*/
public SegmentTemplateType createSegmentTemplateType() {
return new SegmentTemplateType();
}
/**
* Create an instance of {@link URLType }
*
*/
public URLType createURLType() {
return new URLType();
}
/**
* Create an instance of {@link SwitchingType }
*
*/
public SwitchingType createSwitchingType() {
return new SwitchingType();
}
/**
* Create an instance of {@link AdaptationSetType }
*
*/
public AdaptationSetType createAdaptationSetType() {
return new AdaptationSetType();
}
/**
* Create an instance of {@link SegmentURLType }
*
*/
public SegmentURLType createSegmentURLType() {
return new SegmentURLType();
}
/**
* Create an instance of {@link DescriptorType }
*
*/
public DescriptorType createDescriptorType() {
return new DescriptorType();
}
/**
* Create an instance of {@link SegmentListType }
*
*/
public SegmentListType createSegmentListType() {
return new SegmentListType();
}
/**
* Create an instance of {@link ContentComponentType }
*
*/
public ContentComponentType createContentComponentType() {
return new ContentComponentType();
}
/**
* Create an instance of {@link MultipleSegmentBaseType }
*
*/
public MultipleSegmentBaseType createMultipleSegmentBaseType() {
return new MultipleSegmentBaseType();
}
/**
* Create an instance of {@link SubRepresentationType }
*
*/
public SubRepresentationType createSubRepresentationType() {
return new SubRepresentationType();
}
/**
* Create an instance of {@link SegmentTimelineType.S }
*
*/
public SegmentTimelineType.S createSegmentTimelineTypeS() {
return new SegmentTimelineType.S();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link MPDtype }{@code >}}
*
*/
@XmlElementDecl(namespace = "urn:mpeg:dash:schema:mpd:2011", name = "MPD")
public JAXBElement<MPDtype> createMPD(MPDtype value) {
return new JAXBElement<MPDtype>(_MPD_QNAME, MPDtype.class, null, value);
}
}

View File

@ -0,0 +1,553 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.Duration;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for PeriodType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="PeriodType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="BaseURL" type="{urn:mpeg:dash:schema:mpd:2011}BaseURLType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SegmentBase" type="{urn:mpeg:dash:schema:mpd:2011}SegmentBaseType" minOccurs="0"/>
* &lt;element name="SegmentList" type="{urn:mpeg:dash:schema:mpd:2011}SegmentListType" minOccurs="0"/>
* &lt;element name="SegmentTemplate" type="{urn:mpeg:dash:schema:mpd:2011}SegmentTemplateType" minOccurs="0"/>
* &lt;element name="AssetIdentifier" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" minOccurs="0"/>
* &lt;element name="EventStream" type="{urn:mpeg:dash:schema:mpd:2011}EventStreamType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="AdaptationSet" type="{urn:mpeg:dash:schema:mpd:2011}AdaptationSetType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Subset" type="{urn:mpeg:dash:schema:mpd:2011}SubsetType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SupplementalProperty" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}href"/>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}actuate"/>
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="duration" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="bitstreamSwitching" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PeriodType", propOrder = {
"baseURL",
"segmentBase",
"segmentList",
"segmentTemplate",
"assetIdentifier",
"eventStream",
"adaptationSet",
"subset",
"supplementalProperty",
"any"
})
public class PeriodType {
@XmlElement(name = "BaseURL")
protected List<BaseURLType> baseURL;
@XmlElement(name = "SegmentBase")
protected SegmentBaseType segmentBase;
@XmlElement(name = "SegmentList")
protected SegmentListType segmentList;
@XmlElement(name = "SegmentTemplate")
protected SegmentTemplateType segmentTemplate;
@XmlElement(name = "AssetIdentifier")
protected DescriptorType assetIdentifier;
@XmlElement(name = "EventStream")
protected List<EventStreamType> eventStream;
@XmlElement(name = "AdaptationSet")
protected List<AdaptationSetType> adaptationSet;
@XmlElement(name = "Subset")
protected List<SubsetType> subset;
@XmlElement(name = "SupplementalProperty")
protected List<DescriptorType> supplementalProperty;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
@XmlAttribute(name = "id")
protected String id;
@XmlAttribute(name = "start")
protected Duration start;
@XmlAttribute(name = "duration")
protected Duration duration;
@XmlAttribute(name = "bitstreamSwitching")
protected Boolean bitstreamSwitching;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the baseURL property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the baseURL property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getBaseURL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link BaseURLType }
*
*
*/
public List<BaseURLType> getBaseURL() {
if (baseURL == null) {
baseURL = new ArrayList<BaseURLType>();
}
return this.baseURL;
}
/**
* Gets the value of the segmentBase property.
*
* @return
* possible object is
* {@link SegmentBaseType }
*
*/
public SegmentBaseType getSegmentBase() {
return segmentBase;
}
/**
* Sets the value of the segmentBase property.
*
* @param value
* allowed object is
* {@link SegmentBaseType }
*
*/
public void setSegmentBase(SegmentBaseType value) {
this.segmentBase = value;
}
/**
* Gets the value of the segmentList property.
*
* @return
* possible object is
* {@link SegmentListType }
*
*/
public SegmentListType getSegmentList() {
return segmentList;
}
/**
* Sets the value of the segmentList property.
*
* @param value
* allowed object is
* {@link SegmentListType }
*
*/
public void setSegmentList(SegmentListType value) {
this.segmentList = value;
}
/**
* Gets the value of the segmentTemplate property.
*
* @return
* possible object is
* {@link SegmentTemplateType }
*
*/
public SegmentTemplateType getSegmentTemplate() {
return segmentTemplate;
}
/**
* Sets the value of the segmentTemplate property.
*
* @param value
* allowed object is
* {@link SegmentTemplateType }
*
*/
public void setSegmentTemplate(SegmentTemplateType value) {
this.segmentTemplate = value;
}
/**
* Gets the value of the assetIdentifier property.
*
* @return
* possible object is
* {@link DescriptorType }
*
*/
public DescriptorType getAssetIdentifier() {
return assetIdentifier;
}
/**
* Sets the value of the assetIdentifier property.
*
* @param value
* allowed object is
* {@link DescriptorType }
*
*/
public void setAssetIdentifier(DescriptorType value) {
this.assetIdentifier = value;
}
/**
* Gets the value of the eventStream property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the eventStream property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEventStream().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link EventStreamType }
*
*
*/
public List<EventStreamType> getEventStream() {
if (eventStream == null) {
eventStream = new ArrayList<EventStreamType>();
}
return this.eventStream;
}
/**
* Gets the value of the adaptationSet property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the adaptationSet property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAdaptationSet().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link AdaptationSetType }
*
*
*/
public List<AdaptationSetType> getAdaptationSet() {
if (adaptationSet == null) {
adaptationSet = new ArrayList<AdaptationSetType>();
}
return this.adaptationSet;
}
/**
* Gets the value of the subset property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the subset property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSubset().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SubsetType }
*
*
*/
public List<SubsetType> getSubset() {
if (subset == null) {
subset = new ArrayList<SubsetType>();
}
return this.subset;
}
/**
* Gets the value of the supplementalProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the supplementalProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSupplementalProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getSupplementalProperty() {
if (supplementalProperty == null) {
supplementalProperty = new ArrayList<DescriptorType>();
}
return this.supplementalProperty;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
if (actuate == null) {
return ActuateType.ON_REQUEST;
} else {
return actuate;
}
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the start property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getStart() {
return start;
}
/**
* Sets the value of the start property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setStart(Duration value) {
this.start = value;
}
/**
* Gets the value of the duration property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getDuration() {
return duration;
}
/**
* Sets the value of the duration property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setDuration(Duration value) {
this.duration = value;
}
/**
* Gets the value of the bitstreamSwitching property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isBitstreamSwitching() {
if (bitstreamSwitching == null) {
return false;
} else {
return bitstreamSwitching;
}
}
/**
* Sets the value of the bitstreamSwitching property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setBitstreamSwitching(Boolean value) {
this.bitstreamSwitching = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,58 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PresentationType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="PresentationType">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="static"/>
* &lt;enumeration value="dynamic"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@XmlType(name = "PresentationType")
@XmlEnum
public enum PresentationType {
@XmlEnumValue("static")
STATIC("static"),
@XmlEnumValue("dynamic")
DYNAMIC("dynamic");
private final String value;
PresentationType(String v) {
value = v;
}
public String value() {
return value;
}
public static PresentationType fromValue(String v) {
for (PresentationType c: PresentationType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,249 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for ProgramInformationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ProgramInformationType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="Source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="Copyright" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}language" />
* &lt;attribute name="moreInformationURL" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProgramInformationType", propOrder = {
"title",
"source",
"copyright",
"any"
})
public class ProgramInformationType {
@XmlElement(name = "Title")
protected String title;
@XmlElement(name = "Source")
protected String source;
@XmlElement(name = "Copyright")
protected String copyright;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "lang")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "language")
protected String lang;
@XmlAttribute(name = "moreInformationURL")
@XmlSchemaType(name = "anyURI")
protected String moreInformationURL;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
/**
* Gets the value of the source property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSource() {
return source;
}
/**
* Sets the value of the source property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSource(String value) {
this.source = value;
}
/**
* Gets the value of the copyright property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCopyright() {
return copyright;
}
/**
* Sets the value of the copyright property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCopyright(String value) {
this.copyright = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the lang property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
/**
* Gets the value of the moreInformationURL property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMoreInformationURL() {
return moreInformationURL;
}
/**
* Sets the value of the moreInformationURL property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMoreInformationURL(String value) {
this.moreInformationURL = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,93 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.Duration;
/**
* <p>Java class for RangeType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RangeType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="starttime" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;attribute name="duration" type="{http://www.w3.org/2001/XMLSchema}duration" />
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RangeType")
public class RangeType {
@XmlAttribute(name = "starttime")
protected Duration starttime;
@XmlAttribute(name = "duration")
protected Duration duration;
/**
* Gets the value of the starttime property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getStarttime() {
return starttime;
}
/**
* Sets the value of the starttime property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setStarttime(Duration value) {
this.starttime = value;
}
/**
* Gets the value of the duration property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getDuration() {
return duration;
}
/**
* Sets the value of the duration property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setDuration(Duration value) {
this.duration = value;
}
}

View File

@ -0,0 +1,723 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for RepresentationBaseType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RepresentationBaseType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="FramePacking" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="AudioChannelConfiguration" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="ContentProtection" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="EssentialProperty" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SupplementalProperty" type="{urn:mpeg:dash:schema:mpd:2011}DescriptorType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="InbandEventStream" type="{urn:mpeg:dash:schema:mpd:2011}EventStreamType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="Switching" type="{urn:mpeg:dash:schema:mpd:2011}SwitchingType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="profiles" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="width" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="height" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="sar" type="{urn:mpeg:dash:schema:mpd:2011}RatioType" />
* &lt;attribute name="frameRate" type="{urn:mpeg:dash:schema:mpd:2011}FrameRateType" />
* &lt;attribute name="audioSamplingRate" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="mimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="segmentProfiles" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="codecs" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="maximumSAPPeriod" type="{http://www.w3.org/2001/XMLSchema}double" />
* &lt;attribute name="startWithSAP" type="{urn:mpeg:dash:schema:mpd:2011}SAPType" />
* &lt;attribute name="maxPlayoutRate" type="{http://www.w3.org/2001/XMLSchema}double" />
* &lt;attribute name="codingDependency" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;attribute name="scanType" type="{urn:mpeg:dash:schema:mpd:2011}VideoScanType" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RepresentationBaseType", propOrder = {
"framePacking",
"audioChannelConfiguration",
"contentProtection",
"essentialProperty",
"supplementalProperty",
"inbandEventStream",
"switching",
"any"
})
@XmlSeeAlso({
RepresentationType.class,
AdaptationSetType.class,
SubRepresentationType.class
})
public class RepresentationBaseType {
@XmlElement(name = "FramePacking")
protected List<DescriptorType> framePacking;
@XmlElement(name = "AudioChannelConfiguration")
protected List<DescriptorType> audioChannelConfiguration;
@XmlElement(name = "ContentProtection")
protected List<DescriptorType> contentProtection;
@XmlElement(name = "EssentialProperty")
protected List<DescriptorType> essentialProperty;
@XmlElement(name = "SupplementalProperty")
protected List<DescriptorType> supplementalProperty;
@XmlElement(name = "InbandEventStream")
protected List<EventStreamType> inbandEventStream;
@XmlElement(name = "Switching")
protected List<SwitchingType> switching;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "profiles")
protected String profiles;
@XmlAttribute(name = "width")
@XmlSchemaType(name = "unsignedInt")
protected Long width;
@XmlAttribute(name = "height")
@XmlSchemaType(name = "unsignedInt")
protected Long height;
@XmlAttribute(name = "sar")
protected String sar;
@XmlAttribute(name = "frameRate")
protected String frameRate;
@XmlAttribute(name = "audioSamplingRate")
protected String audioSamplingRate;
@XmlAttribute(name = "mimeType")
protected String mimeType;
@XmlAttribute(name = "segmentProfiles")
protected String segmentProfiles;
@XmlAttribute(name = "codecs")
protected String codecs;
@XmlAttribute(name = "maximumSAPPeriod")
protected Double maximumSAPPeriod;
@XmlAttribute(name = "startWithSAP")
protected Long startWithSAP;
@XmlAttribute(name = "maxPlayoutRate")
protected Double maxPlayoutRate;
@XmlAttribute(name = "codingDependency")
protected Boolean codingDependency;
@XmlAttribute(name = "scanType")
protected VideoScanType scanType;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the framePacking property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the framePacking property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getFramePacking().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getFramePacking() {
if (framePacking == null) {
framePacking = new ArrayList<DescriptorType>();
}
return this.framePacking;
}
/**
* Gets the value of the audioChannelConfiguration property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the audioChannelConfiguration property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAudioChannelConfiguration().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getAudioChannelConfiguration() {
if (audioChannelConfiguration == null) {
audioChannelConfiguration = new ArrayList<DescriptorType>();
}
return this.audioChannelConfiguration;
}
/**
* Gets the value of the contentProtection property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the contentProtection property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContentProtection().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getContentProtection() {
if (contentProtection == null) {
contentProtection = new ArrayList<DescriptorType>();
}
return this.contentProtection;
}
/**
* Gets the value of the essentialProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the essentialProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEssentialProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getEssentialProperty() {
if (essentialProperty == null) {
essentialProperty = new ArrayList<DescriptorType>();
}
return this.essentialProperty;
}
/**
* Gets the value of the supplementalProperty property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the supplementalProperty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSupplementalProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DescriptorType }
*
*
*/
public List<DescriptorType> getSupplementalProperty() {
if (supplementalProperty == null) {
supplementalProperty = new ArrayList<DescriptorType>();
}
return this.supplementalProperty;
}
/**
* Gets the value of the inbandEventStream property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the inbandEventStream property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getInbandEventStream().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link EventStreamType }
*
*
*/
public List<EventStreamType> getInbandEventStream() {
if (inbandEventStream == null) {
inbandEventStream = new ArrayList<EventStreamType>();
}
return this.inbandEventStream;
}
/**
* Gets the value of the switching property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the switching property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSwitching().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SwitchingType }
*
*
*/
public List<SwitchingType> getSwitching() {
if (switching == null) {
switching = new ArrayList<SwitchingType>();
}
return this.switching;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the profiles property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfiles() {
return profiles;
}
/**
* Sets the value of the profiles property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfiles(String value) {
this.profiles = value;
}
/**
* Gets the value of the width property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getWidth() {
return width;
}
/**
* Sets the value of the width property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setWidth(Long value) {
this.width = value;
}
/**
* Gets the value of the height property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getHeight() {
return height;
}
/**
* Sets the value of the height property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setHeight(Long value) {
this.height = value;
}
/**
* Gets the value of the sar property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSar() {
return sar;
}
/**
* Sets the value of the sar property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSar(String value) {
this.sar = value;
}
/**
* Gets the value of the frameRate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFrameRate() {
return frameRate;
}
/**
* Sets the value of the frameRate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFrameRate(String value) {
this.frameRate = value;
}
/**
* Gets the value of the audioSamplingRate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAudioSamplingRate() {
return audioSamplingRate;
}
/**
* Sets the value of the audioSamplingRate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAudioSamplingRate(String value) {
this.audioSamplingRate = value;
}
/**
* Gets the value of the mimeType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMimeType() {
return mimeType;
}
/**
* Sets the value of the mimeType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMimeType(String value) {
this.mimeType = value;
}
/**
* Gets the value of the segmentProfiles property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSegmentProfiles() {
return segmentProfiles;
}
/**
* Sets the value of the segmentProfiles property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSegmentProfiles(String value) {
this.segmentProfiles = value;
}
/**
* Gets the value of the codecs property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCodecs() {
return codecs;
}
/**
* Sets the value of the codecs property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCodecs(String value) {
this.codecs = value;
}
/**
* Gets the value of the maximumSAPPeriod property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaximumSAPPeriod() {
return maximumSAPPeriod;
}
/**
* Sets the value of the maximumSAPPeriod property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setMaximumSAPPeriod(Double value) {
this.maximumSAPPeriod = value;
}
/**
* Gets the value of the startWithSAP property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getStartWithSAP() {
return startWithSAP;
}
/**
* Sets the value of the startWithSAP property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setStartWithSAP(Long value) {
this.startWithSAP = value;
}
/**
* Gets the value of the maxPlayoutRate property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaxPlayoutRate() {
return maxPlayoutRate;
}
/**
* Sets the value of the maxPlayoutRate property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setMaxPlayoutRate(Double value) {
this.maxPlayoutRate = value;
}
/**
* Gets the value of the codingDependency property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isCodingDependency() {
return codingDependency;
}
/**
* Sets the value of the codingDependency property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setCodingDependency(Boolean value) {
this.codingDependency = value;
}
/**
* Gets the value of the scanType property.
*
* @return
* possible object is
* {@link VideoScanType }
*
*/
public VideoScanType getScanType() {
return scanType;
}
/**
* Sets the value of the scanType property.
*
* @param value
* allowed object is
* {@link VideoScanType }
*
*/
public void setScanType(VideoScanType value) {
this.scanType = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,337 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for RepresentationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RepresentationType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}RepresentationBaseType">
* &lt;sequence>
* &lt;element name="BaseURL" type="{urn:mpeg:dash:schema:mpd:2011}BaseURLType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SubRepresentation" type="{urn:mpeg:dash:schema:mpd:2011}SubRepresentationType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="SegmentBase" type="{urn:mpeg:dash:schema:mpd:2011}SegmentBaseType" minOccurs="0"/>
* &lt;element name="SegmentList" type="{urn:mpeg:dash:schema:mpd:2011}SegmentListType" minOccurs="0"/>
* &lt;element name="SegmentTemplate" type="{urn:mpeg:dash:schema:mpd:2011}SegmentTemplateType" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="id" use="required" type="{urn:mpeg:dash:schema:mpd:2011}StringNoWhitespaceType" />
* &lt;attribute name="bandwidth" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="qualityRanking" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="dependencyId" type="{urn:mpeg:dash:schema:mpd:2011}StringVectorType" />
* &lt;attribute name="mediaStreamStructureId" type="{urn:mpeg:dash:schema:mpd:2011}StringVectorType" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RepresentationType", propOrder = {
"baseURL",
"subRepresentation",
"segmentBase",
"segmentList",
"segmentTemplate"
})
public class RepresentationType
extends RepresentationBaseType
{
@XmlElement(name = "BaseURL")
protected List<BaseURLType> baseURL;
@XmlElement(name = "SubRepresentation")
protected List<SubRepresentationType> subRepresentation;
@XmlElement(name = "SegmentBase")
protected SegmentBaseType segmentBase;
@XmlElement(name = "SegmentList")
protected SegmentListType segmentList;
@XmlElement(name = "SegmentTemplate")
protected SegmentTemplateType segmentTemplate;
@XmlAttribute(name = "id", required = true)
protected String id;
@XmlAttribute(name = "bandwidth", required = true)
@XmlSchemaType(name = "unsignedInt")
protected long bandwidth;
@XmlAttribute(name = "qualityRanking")
@XmlSchemaType(name = "unsignedInt")
protected Long qualityRanking;
@XmlAttribute(name = "dependencyId")
protected List<String> dependencyId;
@XmlAttribute(name = "mediaStreamStructureId")
protected List<String> mediaStreamStructureId;
/**
* Gets the value of the baseURL property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the baseURL property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getBaseURL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link BaseURLType }
*
*
*/
public List<BaseURLType> getBaseURL() {
if (baseURL == null) {
baseURL = new ArrayList<BaseURLType>();
}
return this.baseURL;
}
/**
* Gets the value of the subRepresentation property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the subRepresentation property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSubRepresentation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SubRepresentationType }
*
*
*/
public List<SubRepresentationType> getSubRepresentation() {
if (subRepresentation == null) {
subRepresentation = new ArrayList<SubRepresentationType>();
}
return this.subRepresentation;
}
/**
* Gets the value of the segmentBase property.
*
* @return
* possible object is
* {@link SegmentBaseType }
*
*/
public SegmentBaseType getSegmentBase() {
return segmentBase;
}
/**
* Sets the value of the segmentBase property.
*
* @param value
* allowed object is
* {@link SegmentBaseType }
*
*/
public void setSegmentBase(SegmentBaseType value) {
this.segmentBase = value;
}
/**
* Gets the value of the segmentList property.
*
* @return
* possible object is
* {@link SegmentListType }
*
*/
public SegmentListType getSegmentList() {
return segmentList;
}
/**
* Sets the value of the segmentList property.
*
* @param value
* allowed object is
* {@link SegmentListType }
*
*/
public void setSegmentList(SegmentListType value) {
this.segmentList = value;
}
/**
* Gets the value of the segmentTemplate property.
*
* @return
* possible object is
* {@link SegmentTemplateType }
*
*/
public SegmentTemplateType getSegmentTemplate() {
return segmentTemplate;
}
/**
* Sets the value of the segmentTemplate property.
*
* @param value
* allowed object is
* {@link SegmentTemplateType }
*
*/
public void setSegmentTemplate(SegmentTemplateType value) {
this.segmentTemplate = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the bandwidth property.
*
*/
public long getBandwidth() {
return bandwidth;
}
/**
* Sets the value of the bandwidth property.
*
*/
public void setBandwidth(long value) {
this.bandwidth = value;
}
/**
* Gets the value of the qualityRanking property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getQualityRanking() {
return qualityRanking;
}
/**
* Sets the value of the qualityRanking property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setQualityRanking(Long value) {
this.qualityRanking = value;
}
/**
* Gets the value of the dependencyId property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the dependencyId property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getDependencyId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getDependencyId() {
if (dependencyId == null) {
dependencyId = new ArrayList<String>();
}
return this.dependencyId;
}
/**
* Gets the value of the mediaStreamStructureId property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the mediaStreamStructureId property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMediaStreamStructureId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getMediaStreamStructureId() {
if (mediaStreamStructureId == null) {
mediaStreamStructureId = new ArrayList<String>();
}
return this.mediaStreamStructureId;
}
}

View File

@ -0,0 +1,335 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for SegmentBaseType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SegmentBaseType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Initialization" type="{urn:mpeg:dash:schema:mpd:2011}URLType" minOccurs="0"/>
* &lt;element name="RepresentationIndex" type="{urn:mpeg:dash:schema:mpd:2011}URLType" minOccurs="0"/>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="timescale" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="presentationTimeOffset" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="indexRange" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="indexRangeExact" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* &lt;attribute name="availabilityTimeOffset" type="{http://www.w3.org/2001/XMLSchema}double" />
* &lt;attribute name="availabilityTimeComplete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SegmentBaseType", propOrder = {
"initialization",
"representationIndex",
"any"
})
@XmlSeeAlso({
MultipleSegmentBaseType.class
})
public class SegmentBaseType {
@XmlElement(name = "Initialization")
protected URLType initialization;
@XmlElement(name = "RepresentationIndex")
protected URLType representationIndex;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "timescale")
@XmlSchemaType(name = "unsignedInt")
protected Long timescale;
@XmlAttribute(name = "presentationTimeOffset")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger presentationTimeOffset;
@XmlAttribute(name = "indexRange")
protected String indexRange;
@XmlAttribute(name = "indexRangeExact")
protected Boolean indexRangeExact;
@XmlAttribute(name = "availabilityTimeOffset")
protected Double availabilityTimeOffset;
@XmlAttribute(name = "availabilityTimeComplete")
protected Boolean availabilityTimeComplete;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the initialization property.
*
* @return
* possible object is
* {@link URLType }
*
*/
public URLType getInitialization() {
return initialization;
}
/**
* Sets the value of the initialization property.
*
* @param value
* allowed object is
* {@link URLType }
*
*/
public void setInitialization(URLType value) {
this.initialization = value;
}
/**
* Gets the value of the representationIndex property.
*
* @return
* possible object is
* {@link URLType }
*
*/
public URLType getRepresentationIndex() {
return representationIndex;
}
/**
* Sets the value of the representationIndex property.
*
* @param value
* allowed object is
* {@link URLType }
*
*/
public void setRepresentationIndex(URLType value) {
this.representationIndex = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the timescale property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getTimescale() {
return timescale;
}
/**
* Sets the value of the timescale property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setTimescale(Long value) {
this.timescale = value;
}
/**
* Gets the value of the presentationTimeOffset property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getPresentationTimeOffset() {
return presentationTimeOffset;
}
/**
* Sets the value of the presentationTimeOffset property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPresentationTimeOffset(BigInteger value) {
this.presentationTimeOffset = value;
}
/**
* Gets the value of the indexRange property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndexRange() {
return indexRange;
}
/**
* Sets the value of the indexRange property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndexRange(String value) {
this.indexRange = value;
}
/**
* Gets the value of the indexRangeExact property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isIndexRangeExact() {
if (indexRangeExact == null) {
return false;
} else {
return indexRangeExact;
}
}
/**
* Sets the value of the indexRangeExact property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setIndexRangeExact(Boolean value) {
this.indexRangeExact = value;
}
/**
* Gets the value of the availabilityTimeOffset property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getAvailabilityTimeOffset() {
return availabilityTimeOffset;
}
/**
* Sets the value of the availabilityTimeOffset property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setAvailabilityTimeOffset(Double value) {
this.availabilityTimeOffset = value;
}
/**
* Gets the value of the availabilityTimeComplete property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAvailabilityTimeComplete() {
return availabilityTimeComplete;
}
/**
* Sets the value of the availabilityTimeComplete property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAvailabilityTimeComplete(Boolean value) {
this.availabilityTimeComplete = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,138 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SegmentListType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SegmentListType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}MultipleSegmentBaseType">
* &lt;sequence>
* &lt;element name="SegmentURL" type="{urn:mpeg:dash:schema:mpd:2011}SegmentURLType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}href"/>
* &lt;attribute ref="{http://www.w3.org/1999/xlink}actuate"/>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SegmentListType", propOrder = {
"segmentURL"
})
public class SegmentListType
extends MultipleSegmentBaseType
{
@XmlElement(name = "SegmentURL")
protected List<SegmentURLType> segmentURL;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the segmentURL property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the segmentURL property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSegmentURL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SegmentURLType }
*
*
*/
public List<SegmentURLType> getSegmentURL() {
if (segmentURL == null) {
segmentURL = new ArrayList<SegmentURLType>();
}
return this.segmentURL;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
if (actuate == null) {
return ActuateType.ON_REQUEST;
} else {
return actuate;
}
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
}

View File

@ -0,0 +1,149 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SegmentTemplateType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SegmentTemplateType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}MultipleSegmentBaseType">
* &lt;attribute name="media" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="index" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="initialization" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="bitstreamSwitching" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SegmentTemplateType")
public class SegmentTemplateType
extends MultipleSegmentBaseType
{
@XmlAttribute(name = "media")
protected String media;
@XmlAttribute(name = "index")
protected String index;
@XmlAttribute(name = "initialization")
protected String initializationAttribute;
@XmlAttribute(name = "bitstreamSwitching")
protected String bitstreamSwitchingAttribute;
/**
* Gets the value of the media property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMedia() {
return media;
}
/**
* Sets the value of the media property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMedia(String value) {
this.media = value;
}
/**
* Gets the value of the index property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndex() {
return index;
}
/**
* Sets the value of the index property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndex(String value) {
this.index = value;
}
/**
* Gets the value of the initializationAttribute property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInitializationAttribute() {
return initializationAttribute;
}
/**
* Sets the value of the initializationAttribute property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInitializationAttribute(String value) {
this.initializationAttribute = value;
}
/**
* Gets the value of the bitstreamSwitchingAttribute property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBitstreamSwitchingAttribute() {
return bitstreamSwitchingAttribute;
}
/**
* Sets the value of the bitstreamSwitchingAttribute property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBitstreamSwitchingAttribute(String value) {
this.bitstreamSwitchingAttribute = value;
}
}

View File

@ -0,0 +1,312 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for SegmentTimelineType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SegmentTimelineType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="S" maxOccurs="unbounded">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="t" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="n" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="d" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="r" type="{http://www.w3.org/2001/XMLSchema}integer" default="0" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SegmentTimelineType", propOrder = {
"s",
"any"
})
public class SegmentTimelineType {
@XmlElement(name = "S", required = true)
protected List<SegmentTimelineType.S> s;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the s property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the s property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getS().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SegmentTimelineType.S }
*
*
*/
public List<SegmentTimelineType.S> getS() {
if (s == null) {
s = new ArrayList<SegmentTimelineType.S>();
}
return this.s;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="t" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="n" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="d" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* &lt;attribute name="r" type="{http://www.w3.org/2001/XMLSchema}integer" default="0" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class S {
@XmlAttribute(name = "t")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger t;
@XmlAttribute(name = "n")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger n;
@XmlAttribute(name = "d", required = true)
@XmlSchemaType(name = "unsignedLong")
protected BigInteger d;
@XmlAttribute(name = "r")
protected BigInteger r;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the t property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getT() {
return t;
}
/**
* Sets the value of the t property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setT(BigInteger value) {
this.t = value;
}
/**
* Gets the value of the n property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getN() {
return n;
}
/**
* Sets the value of the n property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setN(BigInteger value) {
this.n = value;
}
/**
* Gets the value of the d property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getD() {
return d;
}
/**
* Sets the value of the d property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setD(BigInteger value) {
this.d = value;
}
/**
* Gets the value of the r property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getR() {
if (r == null) {
return new BigInteger("0");
} else {
return r;
}
}
/**
* Sets the value of the r property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setR(BigInteger value) {
this.r = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
}

View File

@ -0,0 +1,215 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for SegmentURLType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SegmentURLType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="media" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="mediaRange" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="index" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="indexRange" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SegmentURLType", propOrder = {
"any"
})
public class SegmentURLType {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "media")
@XmlSchemaType(name = "anyURI")
protected String media;
@XmlAttribute(name = "mediaRange")
protected String mediaRange;
@XmlAttribute(name = "index")
@XmlSchemaType(name = "anyURI")
protected String index;
@XmlAttribute(name = "indexRange")
protected String indexRange;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the media property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMedia() {
return media;
}
/**
* Sets the value of the media property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMedia(String value) {
this.media = value;
}
/**
* Gets the value of the mediaRange property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMediaRange() {
return mediaRange;
}
/**
* Sets the value of the mediaRange property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMediaRange(String value) {
this.mediaRange = value;
}
/**
* Gets the value of the index property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndex() {
return index;
}
/**
* Sets the value of the index property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndex(String value) {
this.index = value;
}
/**
* Gets the value of the indexRange property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndexRange() {
return indexRange;
}
/**
* Sets the value of the indexRange property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndexRange(String value) {
this.indexRange = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,164 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SubRepresentationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SubRepresentationType">
* &lt;complexContent>
* &lt;extension base="{urn:mpeg:dash:schema:mpd:2011}RepresentationBaseType">
* &lt;attribute name="level" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="dependencyLevel" type="{urn:mpeg:dash:schema:mpd:2011}UIntVectorType" />
* &lt;attribute name="bandwidth" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="contentComponent" type="{urn:mpeg:dash:schema:mpd:2011}StringVectorType" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SubRepresentationType")
public class SubRepresentationType
extends RepresentationBaseType
{
@XmlAttribute(name = "level")
@XmlSchemaType(name = "unsignedInt")
protected Long level;
@XmlAttribute(name = "dependencyLevel")
protected List<Long> dependencyLevel;
@XmlAttribute(name = "bandwidth")
@XmlSchemaType(name = "unsignedInt")
protected Long bandwidth;
@XmlAttribute(name = "contentComponent")
protected List<String> contentComponent;
/**
* Gets the value of the level property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getLevel() {
return level;
}
/**
* Sets the value of the level property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setLevel(Long value) {
this.level = value;
}
/**
* Gets the value of the dependencyLevel property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the dependencyLevel property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getDependencyLevel().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Long }
*
*
*/
public List<Long> getDependencyLevel() {
if (dependencyLevel == null) {
dependencyLevel = new ArrayList<Long>();
}
return this.dependencyLevel;
}
/**
* Gets the value of the bandwidth property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getBandwidth() {
return bandwidth;
}
/**
* Sets the value of the bandwidth property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setBandwidth(Long value) {
this.bandwidth = value;
}
/**
* Gets the value of the contentComponent property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the contentComponent property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContentComponent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getContentComponent() {
if (contentComponent == null) {
contentComponent = new ArrayList<String>();
}
return this.contentComponent;
}
}

View File

@ -0,0 +1,124 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
/**
* <p>Java class for SubsetType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SubsetType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="contains" use="required" type="{urn:mpeg:dash:schema:mpd:2011}UIntVectorType" />
* &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SubsetType")
public class SubsetType {
@XmlAttribute(name = "contains", required = true)
protected List<Long> contains;
@XmlAttribute(name = "id")
protected String id;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the contains property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the contains property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContains().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Long }
*
*
*/
public List<Long> getContains() {
if (contains == null) {
contains = new ArrayList<Long>();
}
return this.contains;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,111 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
/**
* <p>Java class for SwitchingType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SwitchingType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="interval" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
* &lt;attribute name="type" type="{urn:mpeg:dash:schema:mpd:2011}SwitchingTypeType" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SwitchingType")
public class SwitchingType {
@XmlAttribute(name = "interval", required = true)
@XmlSchemaType(name = "unsignedInt")
protected long interval;
@XmlAttribute(name = "type")
protected SwitchingTypeType type;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the interval property.
*
*/
public long getInterval() {
return interval;
}
/**
* Sets the value of the interval property.
*
*/
public void setInterval(long value) {
this.interval = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link SwitchingTypeType }
*
*/
public SwitchingTypeType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link SwitchingTypeType }
*
*/
public void setType(SwitchingTypeType value) {
this.type = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,58 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SwitchingTypeType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="SwitchingTypeType">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="media"/>
* &lt;enumeration value="bitstream"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@XmlType(name = "SwitchingTypeType")
@XmlEnum
public enum SwitchingTypeType {
@XmlEnumValue("media")
MEDIA("media"),
@XmlEnumValue("bitstream")
BITSTREAM("bitstream");
private final String value;
SwitchingTypeType(String v) {
value = v;
}
public String value() {
return value;
}
public static SwitchingTypeType fromValue(String v) {
for (SwitchingTypeType c: SwitchingTypeType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,160 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for URLType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="URLType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="sourceURL" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* &lt;attribute name="range" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "URLType", propOrder = {
"any"
})
public class URLType {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAttribute(name = "sourceURL")
@XmlSchemaType(name = "anyURI")
protected String sourceURL;
@XmlAttribute(name = "range")
protected String range;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the sourceURL property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSourceURL() {
return sourceURL;
}
/**
* Sets the value of the sourceURL property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSourceURL(String value) {
this.sourceURL = value;
}
/**
* Gets the value of the range property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRange() {
return range;
}
/**
* Sets the value of the range property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRange(String value) {
this.range = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,61 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
package ctbrec.recorder.download.dash;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for VideoScanType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="VideoScanType">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="progressive"/>
* &lt;enumeration value="interlaced"/>
* &lt;enumeration value="unknown"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@XmlType(name = "VideoScanType")
@XmlEnum
public enum VideoScanType {
@XmlEnumValue("progressive")
PROGRESSIVE("progressive"),
@XmlEnumValue("interlaced")
INTERLACED("interlaced"),
@XmlEnumValue("unknown")
UNKNOWN("unknown");
private final String value;
VideoScanType(String v) {
value = v;
}
public String value() {
return value;
}
public static VideoScanType fromValue(String v) {
for (VideoScanType c: VideoScanType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,9 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.24 at 05:06:14 PM CEST
//
@javax.xml.bind.annotation.XmlSchema(namespace = "urn:mpeg:dash:schema:mpd:2011", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package ctbrec.recorder.download.dash;

View File

@ -0,0 +1,445 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:mpeg:dash:schema:mpd:2011" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="urn:mpeg:dash:schema:mpd:2011">
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
<xs:annotation>
<xs:appinfo>Media Presentation Description</xs:appinfo>
<xs:documentation xml:lang="en">
This Schema defines the Media Presentation Description for MPEG-DASH.
</xs:documentation>
</xs:annotation>
<!-- MPD: main element -->
<xs:element name="MPD" type="MPDtype"/>
<!-- MPD Type -->
<xs:complexType name="MPDtype">
<xs:sequence>
<xs:element name="ProgramInformation" type="ProgramInformationType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="BaseURL" type="BaseURLType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Location" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Period" type="PeriodType" maxOccurs="unbounded"/>
<xs:element name="Metrics" type="MetricsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="EssentialProperty" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SupplementalProperty" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="UTCTiming" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="profiles" type="xs:string" use="required"/>
<xs:attribute name="type" type="PresentationType" default="static"/>
<xs:attribute name="availabilityStartTime" type="xs:dateTime"/>
<xs:attribute name="availabilityEndTime" type="xs:dateTime"/>
<xs:attribute name="publishTime" type="xs:dateTime"/>
<xs:attribute name="mediaPresentationDuration" type="xs:duration"/>
<xs:attribute name="minimumUpdatePeriod" type="xs:duration"/>
<xs:attribute name="minBufferTime" type="xs:duration" use="required"/>
<xs:attribute name="timeShiftBufferDepth" type="xs:duration"/>
<xs:attribute name="suggestedPresentationDelay" type="xs:duration"/>
<xs:attribute name="maxSegmentDuration" type="xs:duration"/>
<xs:attribute name="maxSubsegmentDuration" type="xs:duration"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Presentation Type enumeration -->
<xs:simpleType name="PresentationType">
<xs:restriction base="xs:string">
<xs:enumeration value="static"/>
<xs:enumeration value="dynamic"/>
</xs:restriction>
</xs:simpleType>
<!-- Period -->
<xs:complexType name="PeriodType">
<xs:sequence>
<xs:element name="BaseURL" type="BaseURLType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SegmentBase" type="SegmentBaseType" minOccurs="0"/>
<xs:element name="SegmentList" type="SegmentListType" minOccurs="0"/>
<xs:element name="SegmentTemplate" type="SegmentTemplateType" minOccurs="0"/>
<xs:element name="AssetIdentifier" type="DescriptorType" minOccurs="0"/>
<xs:element name="EventStream" type="EventStreamType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="AdaptationSet" type="AdaptationSetType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Subset" type="SubsetType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SupplementalProperty" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="xlink:href"/>
<xs:attribute ref="xlink:actuate" default="onRequest"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="start" type="xs:duration"/>
<xs:attribute name="duration" type="xs:duration"/>
<xs:attribute name="bitstreamSwitching" type="xs:boolean" default="false"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Event Stream -->
<xs:complexType name="EventStreamType">
<xs:sequence>
<xs:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="xlink:href"/>
<xs:attribute ref="xlink:actuate" default="onRequest"/>
<xs:attribute name="messageData" type="xs:anyURI"/>
<xs:attribute name="schemeIdUri" type="xs:anyURI" use="required"/>
<xs:attribute name="value" type="xs:string"/>
<xs:attribute name="timescale" type="xs:unsignedInt"/>
</xs:complexType>
<!-- Event -->
<xs:complexType name="EventType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="presentationTime" type="xs:unsignedLong" default="0"/>
<xs:attribute name="duration" type="xs:unsignedLong"/>
<xs:attribute name="id" type="xs:unsignedInt"/>
<xs:attribute name="messageData" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Adaptation Set -->
<xs:complexType name="AdaptationSetType">
<xs:complexContent>
<xs:extension base="RepresentationBaseType">
<xs:sequence>
<xs:element name="Accessibility" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Role" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Rating" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Viewpoint" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ContentComponent" type="ContentComponentType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="BaseURL" type="BaseURLType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SegmentBase" type="SegmentBaseType" minOccurs="0"/>
<xs:element name="SegmentList" type="SegmentListType" minOccurs="0"/>
<xs:element name="SegmentTemplate" type="SegmentTemplateType" minOccurs="0"/>
<xs:element name="Representation" type="RepresentationType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="xlink:href"/>
<xs:attribute ref="xlink:actuate" default="onRequest"/>
<xs:attribute name="id" type="xs:unsignedInt"/>
<xs:attribute name="group" type="xs:unsignedInt"/>
<xs:attribute name="lang" type="xs:language"/>
<xs:attribute name="contentType" type="xs:string"/>
<xs:attribute name="par" type="RatioType"/>
<xs:attribute name="minBandwidth" type="xs:unsignedInt"/>
<xs:attribute name="maxBandwidth" type="xs:unsignedInt"/>
<xs:attribute name="minWidth" type="xs:unsignedInt"/>
<xs:attribute name="maxWidth" type="xs:unsignedInt"/>
<xs:attribute name="minHeight" type="xs:unsignedInt"/>
<xs:attribute name="maxHeight" type="xs:unsignedInt"/>
<xs:attribute name="minFrameRate" type="FrameRateType"/>
<xs:attribute name="maxFrameRate" type="FrameRateType"/>
<xs:attribute name="segmentAlignment" type="ConditionalUintType" default="false"/>
<xs:attribute name="subsegmentAlignment" type="ConditionalUintType" default="false"/>
<xs:attribute name="subsegmentStartsWithSAP" type="SAPType" default="0"/>
<xs:attribute name="bitstreamSwitching" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Ratio Type for sar and par -->
<xs:simpleType name="RatioType">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]*:[0-9]*"/>
</xs:restriction>
</xs:simpleType>
<!-- Type for Frame Rate -->
<xs:simpleType name="FrameRateType">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]*[0-9](/[0-9]*[0-9])?"/>
</xs:restriction>
</xs:simpleType>
<!-- Conditional Unsigned Integer (unsignedInt or boolean) -->
<xs:simpleType name="ConditionalUintType">
<xs:union memberTypes="xs:unsignedInt xs:boolean"/>
</xs:simpleType>
<!-- Content Component -->
<xs:complexType name="ContentComponentType">
<xs:sequence>
<xs:element name="Accessibility" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Role" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Rating" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Viewpoint" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedInt"/>
<xs:attribute name="lang" type="xs:language"/>
<xs:attribute name="contentType" type="xs:string"/>
<xs:attribute name="par" type="RatioType"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Representation -->
<xs:complexType name="RepresentationType">
<xs:complexContent>
<xs:extension base="RepresentationBaseType">
<xs:sequence>
<xs:element name="BaseURL" type="BaseURLType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SubRepresentation" type="SubRepresentationType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SegmentBase" type="SegmentBaseType" minOccurs="0"/>
<xs:element name="SegmentList" type="SegmentListType" minOccurs="0"/>
<xs:element name="SegmentTemplate" type="SegmentTemplateType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="StringNoWhitespaceType" use="required"/>
<xs:attribute name="bandwidth" type="xs:unsignedInt" use="required"/>
<xs:attribute name="qualityRanking" type="xs:unsignedInt"/>
<xs:attribute name="dependencyId" type="StringVectorType"/>
<xs:attribute name="mediaStreamStructureId" type="StringVectorType"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- String without white spaces -->
<xs:simpleType name="StringNoWhitespaceType">
<xs:restriction base="xs:string">
<xs:pattern value="[^\r\n\t \p{Z}]*"/>
</xs:restriction>
</xs:simpleType>
<!-- SubRepresentation -->
<xs:complexType name="SubRepresentationType">
<xs:complexContent>
<xs:extension base="RepresentationBaseType">
<xs:attribute name="level" type="xs:unsignedInt"/>
<xs:attribute name="dependencyLevel" type="UIntVectorType"/>
<xs:attribute name="bandwidth" type="xs:unsignedInt"/>
<xs:attribute name="contentComponent" type="StringVectorType"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Representation base (common attributes and elements) -->
<xs:complexType name="RepresentationBaseType">
<xs:sequence>
<xs:element name="FramePacking" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="AudioChannelConfiguration" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ContentProtection" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="EssentialProperty" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SupplementalProperty" type="DescriptorType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="InbandEventStream" type="EventStreamType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Switching" type="SwitchingType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="profiles" type="xs:string"/>
<xs:attribute name="width" type="xs:unsignedInt"/>
<xs:attribute name="height" type="xs:unsignedInt"/>
<xs:attribute name="sar" type="RatioType"/>
<xs:attribute name="frameRate" type="FrameRateType"/>
<xs:attribute name="audioSamplingRate" type="xs:string"/>
<xs:attribute name="mimeType" type="xs:string"/>
<xs:attribute name="segmentProfiles" type="xs:string"/>
<xs:attribute name="codecs" type="xs:string"/>
<xs:attribute name="maximumSAPPeriod" type="xs:double"/>
<xs:attribute name="startWithSAP" type="SAPType"/>
<xs:attribute name="maxPlayoutRate" type="xs:double"/>
<xs:attribute name="codingDependency" type="xs:boolean"/>
<xs:attribute name="scanType" type="VideoScanType"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Stream Access Point type enumeration -->
<xs:simpleType name="SAPType">
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="6"/>
</xs:restriction>
</xs:simpleType>
<!-- Video Scan type enumeration -->
<xs:simpleType name="VideoScanType">
<xs:restriction base="xs:string">
<xs:enumeration value="progressive"/>
<xs:enumeration value="interlaced"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
<!-- Subset -->
<xs:complexType name="SubsetType">
<xs:attribute name="contains" type="UIntVectorType" use="required"/>
<xs:attribute name="id" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Switching -->
<xs:complexType name="SwitchingType">
<xs:attribute name="interval" type="xs:unsignedInt" use="required"/>
<xs:attribute name="type" type="SwitchingTypeType"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Switching Type type enumeration -->
<xs:simpleType name="SwitchingTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="media"/>
<xs:enumeration value="bitstream"/>
</xs:restriction>
</xs:simpleType>
<!-- Segment information base -->
<xs:complexType name="SegmentBaseType">
<xs:sequence>
<xs:element name="Initialization" type="URLType" minOccurs="0"/>
<xs:element name="RepresentationIndex" type="URLType" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="timescale" type="xs:unsignedInt"/>
<xs:attribute name="presentationTimeOffset" type="xs:unsignedLong"/>
<xs:attribute name="indexRange" type="xs:string"/>
<xs:attribute name="indexRangeExact" type="xs:boolean" default="false"/>
<xs:attribute name="availabilityTimeOffset" type="xs:double"/>
<xs:attribute name="availabilityTimeComplete" type="xs:boolean"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Multiple Segment information base -->
<xs:complexType name="MultipleSegmentBaseType">
<xs:complexContent>
<xs:extension base="SegmentBaseType">
<xs:sequence>
<xs:element name="SegmentTimeline" type="SegmentTimelineType" minOccurs="0"/>
<xs:element name="BitstreamSwitching" type="URLType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="duration" type="xs:unsignedInt"/>
<xs:attribute name="startNumber" type="xs:unsignedInt"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Segment Info item URL/range -->
<xs:complexType name="URLType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="sourceURL" type="xs:anyURI"/>
<xs:attribute name="range" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Segment List -->
<xs:complexType name="SegmentListType">
<xs:complexContent>
<xs:extension base="MultipleSegmentBaseType">
<xs:sequence>
<xs:element name="SegmentURL" type="SegmentURLType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="xlink:href"/>
<xs:attribute ref="xlink:actuate" default="onRequest"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Segment URL -->
<xs:complexType name="SegmentURLType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="media" type="xs:anyURI"/>
<xs:attribute name="mediaRange" type="xs:string"/>
<xs:attribute name="index" type="xs:anyURI"/>
<xs:attribute name="indexRange" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Segment Template -->
<xs:complexType name="SegmentTemplateType">
<xs:complexContent>
<xs:extension base="MultipleSegmentBaseType">
<xs:attribute name="media" type="xs:string"/>
<xs:attribute name="index" type="xs:string"/>
<xs:attribute name="initialization" type="xs:string"/>
<xs:attribute name="bitstreamSwitching" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Segment Timeline -->
<xs:complexType name="SegmentTimelineType">
<xs:sequence>
<xs:element name="S" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="t" type="xs:unsignedLong"/>
<xs:attribute name="n" type="xs:unsignedLong" use="optional"/>
<xs:attribute name="d" type="xs:unsignedLong" use="required"/>
<xs:attribute name="r" type="xs:integer" use="optional" default="0"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
</xs:element>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Whitespace-separated list of strings -->
<xs:simpleType name="StringVectorType">
<xs:list itemType="xs:string"/>
</xs:simpleType>
<!-- Whitespace-separated list of unsigned integers -->
<xs:simpleType name="UIntVectorType">
<xs:list itemType="xs:unsignedInt"/>
</xs:simpleType>
<!-- Base URL -->
<xs:complexType name="BaseURLType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="serviceLocation" type="xs:string"/>
<xs:attribute name="byteRange" type="xs:string"/>
<xs:attribute name="availabilityTimeOffset" type="xs:double"/>
<xs:attribute name="availabilityTimeComplete" type="xs:boolean"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Program Information -->
<xs:complexType name="ProgramInformationType">
<xs:sequence>
<xs:element name="Title" type="xs:string" minOccurs="0"/>
<xs:element name="Source" type="xs:string" minOccurs="0"/>
<xs:element name="Copyright" type="xs:string" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="lang" type="xs:language"/>
<xs:attribute name="moreInformationURL" type="xs:anyURI"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- 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"/>
</xs:complexType>
<!-- Metrics -->
<xs:complexType name="MetricsType">
<xs:sequence>
<xs:element name="Reporting" type="DescriptorType" maxOccurs="unbounded"/>
<xs:element name="Range" type="RangeType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="metrics" type="xs:string" use="required"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<!-- Metrics Range -->
<xs:complexType name="RangeType">
<xs:attribute name="starttime" type="xs:duration"/>
<xs:attribute name="duration" type="xs:duration"/>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1,19 @@
<bindings xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.1">
<bindings schemaLocation="DASH-MPD.xsd" version="1.0">
<schemaBindings>
<package name="ctbrec.dash"/>
</schemaBindings>
<bindings node="//xs:complexType[@name='SegmentTemplateType']">
<bindings node=".//xs:attribute[@name='initialization']">
<property name="initializationAttribute"/>
</bindings>
<bindings node=".//xs:attribute[@name='bitstreamSwitching']">
<property name="bitstreamSwitchingAttribute"/>
</bindings>
</bindings>
</bindings>
</bindings>

View File

@ -0,0 +1,3 @@
#!/bin/bash
xjc -encoding utf-8 -d src -p ctbrec.dash DASH-MPD.xsd -b bindings.xjb

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink">
<xs:attribute name="type" type="xs:token" fixed="simple"/>
<xs:attribute name="href" type="xlink:hrefType"/>
<xs:simpleType name="hrefType">
<xs:restriction base="xs:anyURI"/>
</xs:simpleType>
<xs:attribute name="show" type="xs:token" fixed="embed"/>
<xs:attribute name="actuate" type="xlink:actuateType" default="onRequest"/>
<xs:simpleType name="actuateType">
<xs:restriction base="xs:token">
<xs:enumeration value="onLoad"/>
<xs:enumeration value="onRequest"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>