I have been incorporating the new libvlc_media_tracks_get() API into my bindings. I am trying to find the most reliable instant at which to invoke this libvlc method in order to get fully populated data.
If I wait for a "playing" event from the media player, I see nothing returned.
If I wait until I get a "vout" event from the media player, I see this information returned:
Code: Select all
VideoTrackInfo[
codecName=mpgv,
id=1,
bitRate=0,
language=null,
description=null
width=0,
height=0,
sampleAspectRatio=9216,
sampleAspectRatioBase=6480,
frameRate=0,
frameRateBase=0
]
AudioTrackInfo[
codecName=a52,
id=2,
bitRate=0,
language=en,
description=null
channels=0
rate=0
]
If after I receive the "vout" event I wait a little while longer, e.g. sleep for 500ms, and invoke the libvlc_media_tracks_get again, this time I get those 'extra' fields populated:
Code: Select all
VideoTrackInfo[
codecName=mpgv,
id=1,
bitRate=0,
language=null,
description=null
width=720,
height=576,
sampleAspectRatio=9216,
sampleAspectRatioBase=6480,
frameRate=50,
frameRateBase=2
]
AudioTrackInfo[
codecName=a52,
id=2,
bitRate=384000,
language=null,
description=null
channels=6
rate=48000
]
Any hints?