NHNTStream

### Overview

The `NHNTStream` element describes stream properties applying throughout the stream.

### Defined Attributes
*   `streamType` : identifies the media streamType as specified in MPEG-4, either the integer value or [GPAC name](filters_properties#stream-types).
*   `mediaType` : indicates the 4CC media type (handler) as used in IsoMedia. Not needed if streamType is specified. Value Type: 4 byte string. Officially supported handler types are listed [here](http://www.mp4ra.org/handler.html).
*   `mediaSubType` : indicates the 4CC media subtype (codec) to use in IsoMedia. This subtype will identify the sample description used (stsd table). Not needed if streamType is specified. Value Type: 4 byte string. Officially supported codec types are listed [here](http://www.mp4ra.org/codecs.html).
*   `objectTypeIndication` : identifies the media type as specified in MPEG-4. For example, 0x40 for MPEG-4 AAC. Officially supported object types are listed [here](http://www.mp4ra.org/object.html).
*   `codecID` : codec identifier (needed if neither `mediaSubType` nor `objectTypeIndication` is set). Can be a 4CC or [GPAC codec name](filters_properties#codecs).
*   `timeScale` : indicates the time scale in which the time stamps are given. Value type: unsigned integer. Default Value: 1000 or sample rate if specified.
*   `width`, `height` : indicates the dimension of a visual media. Ignored if the media is not video (streamType 0x04 or mediaType "vide"). Value Type: unsigned integer.
*   `parNum`, `parDen` : indicates the pixel aspect ratio of a visual media. Ignored if the media is not video (streamType 0x04 or mediaType "vide"). Value Type: unsigned integer.
*   `sampleRate` : indicates the sample rate of an audio media. Ignored if the media is not audio (streamType 0x05 or mediaType "soun"). Value Type: unsigned integer.
*   `numChannels` : indicates the number of channels of an audio media. Ignored if the media is not audio (streamType 0x05 or mediaType "soun"). Value Type: unsigned integer.
*   `baseMediaFile` : indicates the default location of the stream data. If not set, the file with the same name and extension `.media` is assumed to be the source.
*   `specificInfoFile` : indicates the location of the decoder configuration data if any.
*   `trackID` : indicates a desired trackID for this media when importing to IsoMedia. Value type: unsigned integer. Default Value: 0.
*   `inRootOD` : indicates if the imported stream is present in the InitialObjectDescriptor. Value type: "yes", "no". Default Value: "no".
*   `DTS_increment` : indicates a default time increment between two consecutive samples. Value type: unsigned integer. Default Value: 0.
*   `headerEnd` : Number of bytes to copy from specificInfoFile (if not set, use the entire file). Value type: unsigned integer. Default Value: 0.
*   `gzipSamples` : compress samples using `gzip`, `deflate` or `none`. Default Value: `none`.
*   `gzipDictionary` : gzip dictionary to use, either `self` or path to dict file. Value type: string. Default Value: null.

The following attributes are used when creating custom sample description in IsoMedia (i.e. not natively supported by GPAC). Their semantics are given in the QT (and IsoMedia) file format specification.

*   `compressorName` : compressor name. Value type: string. Default Value: null.
*   `codecVersion` : codec version. Value type: unsigned integer. Default Value: 0.
*   `codecRevision` : codec revision. Value type: unsigned integer. Default Value: 0.
*   `codecVendor` : 4CC of codec vendor. Value type: 4 byte string. Default Value: null.
*   `temporalQuality` : temporal quality. Value type: unsigned integer. Default Value: 0.
*   `spatialQuality` : spatial quality. Value type: unsigned integer. Default Value: 0.
*   `horizontalResolution` : horizontal resolution. Value type: unsigned integer. Default Value: 0.
*   `verticalResolution` : vertical resolution. Value type: unsigned integer. Default Value: 0.
*   `bitDepth` : vertical resolution. Value type: unsigned integer. Default Value: 0.
*   `bitsPerSample` : indicates the number of bits per audio sample for an audio media. Ignored if the media is not audio (streamType 0x05 or mediaType "soun"). Value Type: unsigned integer.

The following attributes are used when creating custom XML-base sample descriptions:

* `xml_namespace`: XML namespace to advertise for XML-base sample entries. Type: string. Default Value: unspecified.
* `xml_schema_location`: XML schema location to advertise for XML-base sample entries. Type: string. Default Value: unspecified.
* `xmlHeaderEnd`:  Name of element at the end of the header. The XML source will be copied from first byte to end of this element to create the decoder specific info. Type: string. Default Value: unspecified.
* `text_encoding`, `encoding`: text encoding. Type: string. Default Value: null.
* `content_encoding`: content encoding (`gzip`, `deflate` or `none` accepted). This indicates the compression of the source (no compression is done by importer). Type: string. Default Value: null.
*   `auxiliaryMimeTypes` : auxiliary data mime types (for TTML images). Value type: string. Default Value: null.

The following attributes are used when creating 3GPP DIMS sample descriptions:

*   `profile` : DIMS profile. Type: unsigned integer. Default Value: 0.
*   `level` : DIMS level. Type: unsigned integer. Default Value: 0.
*   `pathComponents` : DIMS/LASeR path components. Type: unsigned integer. Default Value: 0.
* `useFullRequestHost`: DIMS full request host flag. Type: boolean. Default Value: no.
* `contains_redundant`: DIMS redundant, either `main` , `redundant`  or `main+redundant`. Default Value: unspecified.
* `content_script_types`: DIMS mime type for scripts. Type: string. Default Value: unspecified.
* `text_encoding`, `encoding`: text encoding. Type: string. Default Value: null.
* `content_encoding`: content encoding (`gzip`, `deflate` or `none` accepted). This indicates the compression of the source (no compression is done by importer). Type: string. Default Value: null.


The decoder config of an `NHNTStream` can be specified using [XML bitstream constructors](XML-Binary). To do this, the BS elements shall be encapsulated in a `DecoderSpecificInfo` element present in the children of the `NHNTStream` element. The content of the `DecoderSpecificInfo` element is then inserted:

- in the ESD (MPEG-4 Systems)
- or after the base sampleDescription (ISOBMFF generic), in which case the data should likely be formatted as a box (4 byte size, 4 byte type then payload).