Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: User space: ioctl DMX_GET_STC values arn't 64 bit
On Tue, Dec 16, 2003 at 07:13:38PM +0100, Johannes Stezenbach wrote:
> Hi,
>
> Dr. Werner Fink wrote:
> > the STC values return by the ioctl DMX_GET_STC seems not
> > to be 64 bit save on a normal INTEL box. If the PTS value of the
> > current replay (played by VDR) crosses the boundary
> >
> > ~0U aka 0xffffffff aka UINT_MAX
> >
> > the value of the STC is decreased by UINT_MAX. Maybe it is not
> > possible to copy a uint64_t into the users space without stripping
> > a few bits. It works as long as the PTS value is smaller than
> > UINT_MAX ... if not one have to check the current PTS value and
> > add UINT_MAX to STC to get correct results.
> >
> > For tests without VDR you may use test_stc and a recording with
> > very large PTS values. The test_stc program returns the same
> > results as the GetSTC() VDR routine.
>
> Actually this is a limitiation of the av7110 firmware (RTSL)
> and/or the hardware, which just drops the 33rd bit (msb) from
> the PTS/STC. I think there isn't much we can do about it.
Ah ... OK, that means that the workaround (values in ms)
// The DVB card/driver seems to have trouble
// with large values (> ~0U)
if (pts > STC_STATERR && stc < STC_STATERR+10000)
off = pts - (stc+STC_STATERR);
else
off = pts - stc;
is required in the offset caluclation of the bitstreamout plugin ;^)
>
> I think (i.e. I must test again ;) DMX_GET_STC works fine on
> the MIPS based platform I'm working on.
Hmm ... if av7110 firmware/hardware drops the 33rd bit (msb)
the this shouls also happen under MIPS ... or does the
firmware/hardware do an endian check?
Werner
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index