@ -296,13 +296,6 @@ export class AbstractSession extends Session {
* /
# logRedirectionStrategy ;
/ * *
* Creates a new abstract session .
* /
constructor ( ) {
super ( ) ;
}
/ * *
* Creates a new FFmpeg session .
*
@ -1605,12 +1598,12 @@ class FFmpegKitFactory {
if ( sessionMap !== undefined ) {
switch ( sessionMap . type ) {
case 2 :
return FFprobeSession . f romMap( sessionMap ) ;
return AbstractSession . createFFprobeSessionF romMap( sessionMap ) ;
case 3 :
return MediaInformation Session. fromMap ( sessionMap ) ;
return Abstract Session. createMediaIn formationSessionF romMap( sessionMap ) ;
case 1 :
default :
return FFmpegSession . f romMap( sessionMap ) ;
return AbstractSession . createFFmpegSessionF romMap( sessionMap ) ;
}
} else {
return undefined ;
@ -1618,7 +1611,7 @@ class FFmpegKitFactory {
}
static getVersion ( ) {
return "4.5.2 " ;
return "5.1.0 " ;
}
static getLogRedirectionStrategy ( sessionId ) {
@ -1935,13 +1928,6 @@ class FFmpegKitInitializer {
* /
export class FFmpegSession extends AbstractSession {
/ * *
* Creates an empty FFmpeg session .
* /
constructor ( ) {
super ( ) ;
}
/ * *
* Creates a new FFmpeg session .
*
@ -1963,16 +1949,6 @@ export class FFmpegSession extends AbstractSession {
return session ;
}
/ * *
* Creates a new FFmpeg session from the given map .
*
* @ param sessionMap map that includes session fields as map keys
* @ returns FFmpeg session created
* /
static fromMap ( sessionMap ) {
return AbstractSession . createFFmpegSessionFromMap ( sessionMap ) ;
}
/ * *
* Returns the session specific statistics callback .
*
@ -2252,13 +2228,6 @@ export class FFprobeKit {
* /
export class FFprobeSession extends AbstractSession {
/ * *
* Creates an empty FFprobe session .
* /
constructor ( ) {
super ( ) ;
}
/ * *
* Creates a new FFprobe session .
*
@ -2278,16 +2247,6 @@ export class FFprobeSession extends AbstractSession {
return session ;
}
/ * *
* Creates a new FFprobe session from the given map .
*
* @ param sessionMap map that includes session fields as map keys
* @ returns FFprobe session created
* /
static fromMap ( sessionMap ) {
return AbstractSession . createFFprobeSessionFromMap ( sessionMap ) ;
}
/ * *
* Returns the session specific complete callback .
*
@ -2438,7 +2397,7 @@ export class Log {
* /
export class MediaInformation {
static KEY _MEDI A _PROPERTIES = "format" ;
static KEY _FOR MAT _PROPERTIES = "format" ;
static KEY _FILENAME = "filename" ;
static KEY _FORMAT = "format_name" ;
static KEY _FORMAT _LONG = "format_long_name" ;
@ -2460,7 +2419,7 @@ export class MediaInformation {
* @ return media file name
* /
getFilename ( ) {
return this . getStringProperty ( MediaInformation . KEY _FILENAME ) ;
return this . getStringFormat Property ( MediaInformation . KEY _FILENAME ) ;
}
/ * *
@ -2469,7 +2428,7 @@ export class MediaInformation {
* @ return media format
* /
getFormat ( ) {
return this . getStringProperty ( MediaInformation . KEY _FORMAT ) ;
return this . getStringFormat Property ( MediaInformation . KEY _FORMAT ) ;
}
/ * *
@ -2478,7 +2437,7 @@ export class MediaInformation {
* @ return media long format
* /
getLongFormat ( ) {
return this . getStringProperty ( MediaInformation . KEY _FORMAT _LONG ) ;
return this . getStringFormat Property ( MediaInformation . KEY _FORMAT _LONG ) ;
}
/ * *
@ -2487,7 +2446,7 @@ export class MediaInformation {
* @ return media duration in "seconds.microseconds" format
* /
getDuration ( ) {
return this . getStringProperty ( MediaInformation . KEY _DURATION ) ;
return this . getStringFormat Property ( MediaInformation . KEY _DURATION ) ;
}
/ * *
@ -2496,7 +2455,7 @@ export class MediaInformation {
* @ return media start time in milliseconds
* /
getStartTime ( ) {
return this . getStringProperty ( MediaInformation . KEY _START _TIME ) ;
return this . getStringFormat Property ( MediaInformation . KEY _START _TIME ) ;
}
/ * *
@ -2505,7 +2464,7 @@ export class MediaInformation {
* @ return media size in bytes
* /
getSize ( ) {
return this . getStringProperty ( MediaInformation . KEY _SIZE ) ;
return this . getStringFormat Property ( MediaInformation . KEY _SIZE ) ;
}
/ * *
@ -2514,7 +2473,7 @@ export class MediaInformation {
* @ return media bitrate in kb / s
* /
getBitrate ( ) {
return this . getStringProperty ( MediaInformation . KEY _BIT _RATE ) ;
return this . getStringFormat Property ( MediaInformation . KEY _BIT _RATE ) ;
}
/ * *
@ -2523,7 +2482,7 @@ export class MediaInformation {
* @ return tags dictionary
* /
getTags ( ) {
return this . getProperties ( MediaInformation . KEY _TAGS ) ;
return this . getFormatProperty ( MediaInformation . KEY _TAGS ) ;
}
/ * *
@ -2571,58 +2530,103 @@ export class MediaInformation {
}
/ * *
* Returns the media property associated with the key .
* Returns the property associated with the key .
*
* @ param key property key
* @ return media property as string or undefined if the key is not found
* @ return property as string or undefined if the key is not found
* /
getStringProperty ( key ) {
let medi aProperties = this . getMedia Properties ( ) ;
if ( medi aProperties !== undefined ) {
return medi aProperties[ key ] ;
let all Properties = this . getAll Properties ( ) ;
if ( all Properties !== undefined ) {
return all Properties [ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns the media property associated with the key .
* Returns the property associated with the key .
*
* @ param key property key
* @ return media property as number or undefined if the key is not found
* @ return property as number or undefined if the key is not found
* /
getNumberProperty ( key ) {
let mediaProperties = this . getMediaProperties ( ) ;
if ( mediaProperties !== undefined ) {
return mediaProperties [ key ] ;
let allProperties = this . getAllProperties ( ) ;
if ( allProperties !== undefined ) {
return allProperties [ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns the property associated with the key .
*
* @ param key property key
* @ return property as an object or undefined if the key is not found
* /
getProperty ( key ) {
let allProperties = this . getAllProperties ( ) ;
if ( allProperties !== undefined ) {
return allProperties [ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns the media properties associated with the key .
* Returns the format property associated with the key .
*
* @ param key properties key
* @ return media properties as an object or undefined if the key is not found
* @ param key property key
* @ return format property as string or undefined if the key is not found
* /
getProperties ( key ) {
let mediaProperties = this . getMediaProperties ( ) ;
if ( mediaProperties !== undefined ) {
return mediaProperties [ key ] ;
getStringFormatProperty ( key ) {
let for mat Properties = this . getFormat Properties ( ) ;
if ( for mat Properties !== undefined ) {
return for mat Properties[ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns all media properties .
* Returns the format property associated with the key .
*
* @ returns an object where media properties can be accessed by property names
* @ param key property key
* @ return format property as number or undefined if the key is not found
* /
getMediaProperties ( ) {
getNumberFormatProperty ( key ) {
let formatProperties = this . getFormatProperties ( ) ;
if ( formatProperties !== undefined ) {
return formatProperties [ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns the format property associated with the key .
*
* @ param key property key
* @ return format property as an object or undefined if the key is not found
* /
getFormatProperty ( key ) {
let formatProperties = this . getFormatProperties ( ) ;
if ( formatProperties !== undefined ) {
return formatProperties [ key ] ;
} else {
return undefined ;
}
}
/ * *
* Returns all format properties defined .
*
* @ returns an object where format properties can be accessed by property names
* /
getFormatProperties ( ) {
if ( this . # allProperties !== undefined ) {
return this . # allProperties . format ;
return this . # allProperties [ MediaInformation . KEY _FORMAT _PROPERTIES ] ;
} else {
return undefined ;
}
@ -2677,13 +2681,6 @@ export class MediaInformationJsonParser {
export class MediaInformationSession extends AbstractSession {
# mediaInformation ;
/ * *
* Creates an empty MediaInformationSession .
* /
constructor ( ) {
super ( ) ;
}
/ * *
* Creates a new MediaInformationSession session .
*
@ -2702,16 +2699,6 @@ export class MediaInformationSession extends AbstractSession {
return session ;
}
/ * *
* Creates a new MediaInformationSession from the given map .
*
* @ param sessionMap map that includes session fields as map keys
* @ returns MediaInformationSession created
* /
static fromMap ( sessionMap ) {
return AbstractSession . createMediaInformationSessionFromMap ( sessionMap ) ;
}
/ * *
* Returns the media information extracted in this session .
*
@ -3104,7 +3091,7 @@ export class StreamInformation {
* @ return tags object
* /
getTags ( ) {
return this . getProperties ( StreamInformation . KEY _TAGS ) ;
return this . getProperty ( StreamInformation . KEY _TAGS ) ;
}
/ * *
@ -3136,12 +3123,12 @@ export class StreamInformation {
}
/ * *
* Returns the stream properties associated with the key .
* Returns the stream property associated with the key .
*
* @ param key properties key
* @ return stream properties as an object or undefined if the key is not found
* @ param key property key
* @ return stream property as an object or undefined if the key is not found
* /
getProperties ( key ) {
getProperty ( key ) {
if ( this . # allProperties !== undefined ) {
return this . # allProperties [ key ] ;
} else {
@ -3238,7 +3225,7 @@ export class Chapter {
* @ return tags object
* /
getTags ( ) {
return this . getProperties ( StreamInformation . KEY _TAGS ) ;
return this . getProperty ( StreamInformation . KEY _TAGS ) ;
}
/ * *
@ -3270,12 +3257,12 @@ export class Chapter {
}
/ * *
* Returns the chapter properties associated with the key .
* Returns the chapter property associated with the key .
*
* @ param key properties key
* @ return chapter properties as an object or undefined if the key is not found
* @ param key property key
* @ return chapter property as an object or undefined if the key is not found
* /
getProperties ( key ) {
getProperty ( key ) {
if ( this . # allProperties !== undefined ) {
return this . # allProperties [ key ] ;
} else {