Mailing List archive

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

[vdr] Re: Playing DVD ?



On Tuesday 26 August 2003 17:01, Dr. Werner Fink wrote:
> On Tue, Aug 26, 2003 at 03:10:00PM +0200, Oliver Endriss wrote:
> > > 
> > > ... you may also enable the define VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES
> > > within dvbdevice.c of VDR.
> > > 
> > > IMHO it is a long standing problem.  Without this patch you get a
> > > really smooth still picture the first time ... but e.g. moving cut
> > > marks is sometime anoying.  With this patch the still picture is always
> > > uptodate but you may see the picture a bit wobbling at sharp lines.
> > 
> > Apparently Michael Hunold has fixed this problem recently in DVB CVS:
> > 
> > |2003-08-22 10:32  hunold
> > |   * driver/av7110/av7110.c: - play_iframe may be used to play
> > |   stillpicture frames, that can either   by complete i-frames or
> > |   partial p-frames. In any case, the av7110 needs   about 400kB of
> > |   video data, before the internal video decoder starts   displaying
> > |   anything. for stillframes, this is bad, so we  *always*   loop
> > |   writing the frame until the magic amount is reached. stupid, but
> > |   works...
> > 
> > The only functional difference is that dvb_filter_ipack_flush() is
> > called outside of the loop. Does this make a difference?
> 
> Together with the trick that n is always greater than 1 it
> works, this is (highly) experimental ;^)
> 
> Without this patch and disabled VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES
> in dvbdevice.c it is _sometimes_ a nightmare to move cut marks with key
> `4' and `6' because the new mark isn't shown but the old is visible.
> You see this if you press the `play' key ... or check the result of
> the cutter thread.

Can you confirm that VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES enabled
and the following patch against DVB CVS gives perfect results?

---------------------------------------------------------------------
--- av7110.c.org	Sat Aug 23 17:35:11 2003
+++ av7110.c	Tue Aug 26 20:01:17 2003
@@ -4237,29 +4237,23 @@ dvb_audio_write(struct file *file, const
         return dvb_aplay(av7110, buf, count, file->f_flags&O_NONBLOCK, 0);
 }
 
-u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };
-
 #define MIN_IFRAME 400000
 
 static int
 play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock)
 {
-        int i, n=1;
+        int i, n;
        
         if (!(av7110->playing&RP_VIDEO)) {
                 if (AV_StartPlay(av7110, RP_VIDEO) < 0) {
 			return -EBUSY;
 		}
-                n=MIN_IFRAME/len+1;
         }
 
 	/* setting n always > 1, fixes problems when playing stillframes
 	   consisting of I- and P-Frames */
 	n=MIN_IFRAME/len+1;
 
-	/* FIXME: nonblock? */
-	dvb_play(av7110, iframe_header, sizeof(iframe_header), 0, 1, 0);
-
 	for (i=0; i<n; i++)
                 dvb_play(av7110, buf, len, 0, 1, 1);
 
---------------------------------------------------------------------

Removing the iframe stuff did the trick.
(I cannot see why one should insert a iframe header here.)

Oliver


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index