[pvrusb2] MPEG PTSs drifting away
Mike Isely
isely at isely.net
Sat Jul 26 15:44:27 CDT 2008
On Sat, 26 Jul 2008, Boris Dores wrote:
> On Fri, Jul 25, 2008 at 07:28:39PM (GMT-0500), Mike Isely wrote:
> > The code in question will be found in pvrusb2-encoder.c. Look at
> > pvr2_encoder_configure().
>
> I found the solution ! Thank you so much for pointing me in the right
> direction !
>
> I imported all the raw commands from the corresponding ivtv function
> (ivtv_start_v4l2_encode_stream in ivtv-streams.c) and proceeded by
> dichotomy. In the end, adding only one command is needed to correct the
> PTSs: it's one of the lines under the comment "Stuff from Windows, we
> don't know what it is" (if Hans is reading this, I guess we can say we
> just got some clues :) ).
>
> The corresponding patch follows (didn't bother to attach it instead of
> pasting it inline, as it is clearly trivial):
>
> --- pvrusb2-encoder.c.orig 2008-07-26 20:30:17.000000000 +0200
> +++ pvrusb2-encoder.c 2008-07-26 20:35:36.000000000 +0200
> @@ -545,6 +545,10 @@
>
> ret |= pvr2_encoder_prep_config(hdw);
>
> + /* prevent the PTSs from slowly drifting away in the generated MPEG
> + stream */
> + ret |= pvr2_encoder_vcmd( hdw, CX2341X_ENC_MISC, 2, 4, 1 );
> +
> /* saa7115: 0xf0 */
> val = 0xf0;
> if (hdw->hdw_desc->flag_has_cx25840) {
>
I'll get this integrated back into the driver. Thanks for figuring it
out.
-Mike
--
Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
More information about the pvrusb2
mailing list