[vlc-devel] [vlc-commits] TS demux: Enhance TS demuxer to support duration and current time

Naohiro KORIYAMA nkoriyama at gmail.com
Mon Oct 10 20:00:00 CEST 2011


2011/10/11 Jean-Paul Saman <jpsaman at gmail.com>:
> This commit breaks VOD playback for HTTP Live Streaming in
> modules/stream_filters/httplive.c
> It makes HTTP Live Streaming download almost the entire movie, while
> 1-3 segments should be more then enough.
>
> I guess the cause is that the semantics changed of STREAM_GET_SIZE,
> STREAM_GET_POSITION and STREAM_SET_POSITION.
> What are the semantics for there now? I thought they were in bytes,
> but seems to be no longer true.

I changed STREAM_GET_POSITION, STREAM_GET_POSITION, STREAM_GET_LENGTH.
As you said, they are not in bytes, but in times.
To get the duration (STREAM_GET_LENGTH), seek last part of the video.
And to seek at exact time position, seek about ten points.
I think it is why it makes HTTP Live Streaming almost the entire movie.

I prepare the option that you can change STREAM_GET/SET_POSITION in
byte position just like before.
Even the option is on, seeking whole the part of the file still runs.
So it's necessary to modify not to seek if the option is on.

I have never thought that live streaming used this module. I just
thought how I can get the duration and current time from the TS movie
file.
It's completely my fault.

If we need current time only, it's not necessary to seek many part of
the file, but only first part of the file.
If we do not need current time, revert this patch.

Best regards,

-- 
KORIYAMA, Naohiro
nkoriyama at gmail.com



More information about the vlc-devel mailing list