Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpeg2] Re: Setting Audio, Video, and PCR PIDs



Hi Andrew,

I found some time for testing your patch.

The PAT and PMT are broken because of a typo:
+       /* compute PMT */
+       memcpy(localPMT, PMT, sizeof(PMT));
+       localPAT[3] = 0x40 | ((cachedParams->pmt_pid >> 8) & 0x0f);
+       localPAT[4] = cachedParams->pmt_pid & 0xff;
should be
+       /* compute PMT */
+       memcpy(localPMT, PMT, sizeof(PMT));
+       localPMT[3] = 0x40 | ((cachedParams->pmt_pid >> 8) & 0x0f);
+       localPMT[4] = cachedParams->pmt_pid & 0xff;

After this change, things are working, but I still have a little
problem: in my setup, I first run a program that opens /dev/video1, does
some ioctl() to configure the stream, and exits; then I run a different
program that opens /dev/video1 for reading. With your patch, this does
not work because when the second program starts to read from /dev/video1
saa6752hs_init() is called with params == NULL, hence it restores all
the parameters to the default. I think that adding a
i2c_set_clientdata(client, cachedParams);
at the end of saa6752hs_init() fixes this problem (at least, it works
for me, but I don't know if it is the correct thing to do -- I do not
know the i2c stuff well).

Unfortunately, I am currently using the mpex board for testing my
streaming application, hence I have not much time for testing the
patch... I hope to be able to send you an updated patch tomorrow.


			Thanks,
				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !





Home | Main Index | Thread Index