node-taglib-sharp / Exports / Mpeg4IsoAudioSampleEntry
This class extends IsoSampleEntry and implements IAudioCodec to provide an implementation of a ISO/IEC 14496-12 AudioSampleEntry and support for reading MPEG-4 video properties.
-
↳
Mpeg4IsoAudioSampleEntry
- audioBitrate
- audioChannels
- audioSampleRate
- audioSampleSize
- boxType
- data
- dataPosition
- dataReferenceIndex
- dataSize
- description
- durationMilliseconds
- handlerType
- hasChildren
- header
- mediaTypes
- size
- addChild
- clearChildren
- getChild
- getChildRecursively
- getChildren
- increaseDataPosition
- initializeFromHeader
- initializeFromHeaderFileAndHandler
- initializeFromType
- loadData
- removeChildByBox
- removeChildByType
- removeChildrenByBox
- fromFile
• get
audioBitrate(): number
Gets the bitrate of the audio represented by the current instance.
number
• get
audioChannels(): number
Number of channels in the audio represented by the current instance.
number
• get
audioSampleRate(): number
Sample rate of the audio represented by the current instance.
number
• get
audioSampleSize(): number
Inherit Doc
number
• get
boxType(): ByteVector
Gets the MPEG-4 box type of the current instance.
IsoSampleEntry.boxType
• get
data(): ByteVector
Gets the data contained in the current instance.
IsoSampleEntry.data
• set
data(v
): void
Sets the data contained in the current instance.
Name | Type |
---|---|
v |
ByteVector |
void
IsoSampleEntry.data
• get
dataPosition(): number
Gets the position of the data contained in the current instance, after any box specific headers.
number
IsoSampleEntry.dataPosition
• get
dataReferenceIndex(): number
Gets the data reference index of the current instance.
number
IsoSampleEntry.dataReferenceIndex
• get
dataSize(): number
Gets the size of the data contained in the current instance, minus the size of any box specific headers.
number
IsoSampleEntry.dataSize
• get
description(): string
Gets a text description of the media represented by the current instance.
string
• get
durationMilliseconds(): number
Duration of the media in milliseconds represented by the current instance.
number
IAudioCodec.durationMilliseconds
• get
handlerType(): ByteVector
Gets the type of the handler box that applies to the current instance.
IsoSampleEntry.handlerType
• get
hasChildren(): boolean
Gets whether the current instance has children.
boolean
IsoSampleEntry.hasChildren
• get
header(): Mpeg4BoxHeader
Gets the header of the current instance.
IsoSampleEntry.header
• get
mediaTypes(): MediaTypes
Types of media represented by the current instance, bitwise combined.
• get
size(): number
Gets the total size of the current instance as it last appeared on disk.
number
IsoSampleEntry.size
▸ addChild(box
): void
Adds a specified box to the current instance.
See
Mpeg4Box object to add to the current instance.
Name | Type | Description |
---|---|---|
box |
Mpeg4Box |
A |
void
▸ clearChildren(): void
Removes all children from the current instance.
void
Mpeg4IsoSampleEntry.clearChildren
▸ getChild<TBox
>(type
, predicate?
): TBox
Gets a child box from the current instance by finding a matching box type.
See
ByteVector object containing the box type to match.
Name | Type |
---|---|
TBox |
extends Mpeg4Box <TBox > |
Name | Type | Description |
---|---|---|
type |
ByteVector |
A |
predicate? |
(b : TBox ) => boolean |
Optional predicate to filter boxes with the provided type. |
TBox
TBox Box containing the matched box, or undefined
if no match was found.
▸ getChildRecursively(type
): Mpeg4Box
Gets a child box from the current instance by finding a matching box type, searching recursively.
See
ByteVector object containing the box type to match.
Name | Type | Description |
---|---|---|
type |
ByteVector |
A |
Mpeg4Box Matching box, or undefined
if no matching box was found
Mpeg4IsoSampleEntry.getChildRecursively
▸ getChildren<TBox
>(type
, predicate?
): TBox
[]
Gets all child boxes from the current instance by finding a matching box type.
See
ByteVector object containing the box type to match.
Name | Type |
---|---|
TBox |
extends Mpeg4Box <TBox > |
Name | Type | Description |
---|---|---|
type |
ByteVector |
A |
predicate? |
(b : TBox ) => boolean |
Optional predicate to filter boxes with the provided type. |
TBox
[]
Mpeg4Box[] Array of matching boxes, or undefined
if no matching boxes was found.
Mpeg4IsoSampleEntry.getChildren
▸ increaseDataPosition(value
): number
Increases the data position by a given value. This function can be used by boxes which extend from
See
Mpeg4Box to increase the data position, because the data is located after their box specific headers.
Name | Type | Description |
---|---|---|
value |
number |
The value to add to the data position. |
number
number Data position before the increase.
Mpeg4IsoSampleEntry.increaseDataPosition
▸ Protected
initializeFromHeader(header
, handlerType?
): void
Initializes a new instance of
See
- Mpeg4Box with a specified header and handler.
- Mpeg4BoxHeader object describing the new instance.
Name | Type | Description |
---|---|---|
header |
Mpeg4BoxHeader |
A |
handlerType? |
ByteVector |
Type of the handler box object containing the handler that applies to the new instance, or undefined if no handler applies. |
void
Mpeg4IsoSampleEntry.initializeFromHeader
▸ initializeFromHeaderFileAndHandler(header
, file
, handlerType
): void
Constructs and initializes a new instance of IsoSampleEntry with a provided header and handler by reading the contents from a specified file.
Name | Type | Description |
---|---|---|
header |
Mpeg4BoxHeader |
A Mpeg4BoxHeader object containing the header to use for the new instance. |
file |
File |
A File object to read the contents of the box from. |
handlerType |
ByteVector |
Type of the handler box object containing the handler that applies to the new instance, or undefined if no handler applies. |
void
Mpeg4IsoSampleEntry.initializeFromHeaderFileAndHandler
▸ Protected
initializeFromType(type
): void
Initializes a new instance of
See
- Mpeg4Box with a specified box type.
- ByteVector object containing the box type to use for the new instance.
Name | Type | Description |
---|---|---|
type |
ByteVector |
A |
void
Mpeg4IsoSampleEntry.initializeFromType
▸ loadData(file
): ByteVector
Loads the data of the current instance from a specified file using the internal data position and size.
See
File from which the current instance was read and from which to read the data.
Name | Type | Description |
---|---|---|
file |
File |
The |
ByteVector Data read from the file.
▸ removeChildByBox(box
): void
Removes a specified box from the current instance.
Name | Type | Description |
---|---|---|
box |
Mpeg4Box |
Box to remove from the current instance. |
void
Mpeg4IsoSampleEntry.removeChildByBox
▸ removeChildByType(type
): void
Removes all children with a specified box type from the current instance.
Name | Type | Description |
---|---|---|
type |
ByteVector |
Type of box to remove |
void
Mpeg4IsoSampleEntry.removeChildByType
▸ removeChildrenByBox(boxes
): void
Removes all specified boxes from the current instance.
Name | Type | Description |
---|---|---|
boxes |
Mpeg4Box [] |
Collection of boxes to remove from the current instance. |
void
Mpeg4IsoSampleEntry.removeChildrenByBox
▸ Static
fromFile(file
, header
, handlerType
): Mpeg4IsoAudioSampleEntry
Constructs and initializes a new instance of IsoVisualSampleEntry with a provided header and handler by reading the contents from a specified file.
Name | Type | Description |
---|---|---|
file |
File |
A File to read the contents of the box from. new instance, or undefined if no handler applies. |
header |
Mpeg4BoxHeader |
A Mpeg4BoxHeader object containing the header to use for the new instance. |
handlerType |
ByteVector |
Type of the handler box object containing the handler that applies to the |