Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Slowmotion
On 03 Jun 2004 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> Christian Gmeiner wrote:
>> > > i have here a question again :) If i press pause in replay mode and
>> press then forward or backward this function is called:
>> > >
>> > > virtual void TrickSpeed(int Speed);
>> > > ///< Sets the device into a mode where replay is done slower.
>> > > ///< Every single frame shall then be displayed the given number
>> of
>> > > ///< times.
>> > >
>> > > I am correct?
>> > >
>> > > Now i want to know what values Speed can have.
>> >
>> > int cDvbPlayer::Speeds[] = { 0, -2, -4, -8, 1, 2, 4, 12, 0 };
[...]
>>
>> TrickSpeed is only called for slowmotion or is it also called for fast
>> forward. I think it is not only for
>> slowmotion, because of the high numbers in Speeds (-8, 12).
>
> From the comment:
>
> ///< Sets the device into a mode where replay is done slower.
> ///< Every single frame shall then be displayed the given number of
> ///< times.
>
> This means that it will only be called for slow motion ("Sets the device
> into a mode where replay is done _slower_") and that higher numbers mean
> slower replay (ok, maybe the name "Speed" is badly chosen...).
The argument of cDevice::TrickSpeed and cDvbPlayer::Speeds[] are not
directly related.
The argument for cDevice::TrickSpeed (which AFAIK can be 0-63) is
calculated inside cDvbPlayer::TrickSpeed. In the Speeds[] array
mit middle 1 is for normal replay, negatives for slowmotion and
positives for fast forward (as a real speed indicator).
For calculating the real calling argument for cDevice::TrickSpeed
you have to take into account that in fast forward, fast rewind
and rewind slow motion only I-frames are played. Assuming that
there is an I-frame every 12th frame, the calling argument is
-value*12 for negative values (slowmotion) and 12/value for
positive values (fast forward/rewind).
Regards.
--
Stefan Huelswitt
s.huelswitt@gmx.de | http://www.muempf.de/
Home |
Main Index |
Thread Index