VDR LiveBuffer Patch

Message ID 4304A867.1040503@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M Aug. 18, 2005, 3:25 p.m. UTC
  Thomas Bergwinkl wrote:
> Philippe Gramoulle wrote:
> 
> 
>>Hello,
>>
>>On Thu, 18 Aug 2005 14:07:49 +0200 (CEST)
>>vdr@helmutauer.de wrote:
>>
>>  | With this Patch VDR can do permanent timeshift, so you
>>can see the last scene again whenever you want :-)
>>
>>Sorry, i'm not sure to fully understand what new
>>functionality this patch brings. Can you elaborate what you
>>mean by "permanent timeshift" ?
>>
>>How does it differ from current behavior ?
> 
> 
> The patch does following:
> - it always records the channel you are watching, when you switch
> channel a new recording starts and the old will be deleted
> - so you are able to repeat a scene if for example you didn't understand
> something
> - or when you are watching a film, and you decide during the film, that
> you want to record it, you can do so, if the beginning is in the
> livebuffer (new timer -> LiveBuffer: yes)
> - you can turn on/off this functionality in menu -> setup ->
> recording -> LiveBuffer
>   there you can also set the size for the livebuffer (in MB)
> 
> But I want to WARN you:
> This patch is not yet really stable! (Of course, it would nice if some
> of you test it and report bugs)
> 

Thanks for the great additional patch!  Of course modifications are required to
the patch if you use enAIO and the jumpplay patches.  But, besides vdr, I found
5 common plugins that also required changes when using this LiveBuffer patch.

Best Regards.
  

Comments

Klaus Schmidinger Aug. 18, 2005, 3:29 p.m. UTC | #1
C.Y.M wrote:
> Thomas Bergwinkl wrote:
> 
>>Philippe Gramoulle wrote:
>>
>>
>>
>>>Hello,
>>>
>>>On Thu, 18 Aug 2005 14:07:49 +0200 (CEST)
>>>vdr@helmutauer.de wrote:
>>>
>>> | With this Patch VDR can do permanent timeshift, so you
>>>can see the last scene again whenever you want :-)
>>>
>>>Sorry, i'm not sure to fully understand what new
>>>functionality this patch brings. Can you elaborate what you
>>>mean by "permanent timeshift" ?
>>>
>>>How does it differ from current behavior ?
>>
>>
>>The patch does following:
>>- it always records the channel you are watching, when you switch
>>channel a new recording starts and the old will be deleted
>>- so you are able to repeat a scene if for example you didn't understand
>>something
>>- or when you are watching a film, and you decide during the film, that
>>you want to record it, you can do so, if the beginning is in the
>>livebuffer (new timer -> LiveBuffer: yes)
>>- you can turn on/off this functionality in menu -> setup ->
>>recording -> LiveBuffer
>>  there you can also set the size for the livebuffer (in MB)
>>
>>But I want to WARN you:
>>This patch is not yet really stable! (Of course, it would nice if some
>>of you test it and report bugs)
>>
> 
> 
> Thanks for the great additional patch!  Of course modifications are required to
> the patch if you use enAIO and the jumpplay patches.  But, besides vdr, I found
> 5 common plugins that also required changes when using this LiveBuffer patch.

I find it very bad if a patch modifies interfaces that require plugins
to be specially adapted to that patch. Plugins should _always_ run with
plain vanilla VDR and never require a "specially patched" version of VDR!

Klaus
  
Thomas Bergwinkl Aug. 18, 2005, 3:31 p.m. UTC | #2
C.Y.M wrote:

> Thomas Bergwinkl wrote:
> > Philippe Gramoulle wrote:
> > 
> > 
> >>Hello,
> >>
> >>On Thu, 18 Aug 2005 14:07:49 +0200 (CEST)
> >>vdr@helmutauer.de wrote:
> >>
> >>  | With this Patch VDR can do permanent timeshift, so you
> >>can see the last scene again whenever you want :-)
> >>
> >>Sorry, i'm not sure to fully understand what new
> >>functionality this patch brings. Can you elaborate what you
> >>mean by "permanent timeshift" ?
> >>
> >>How does it differ from current behavior ?
> > 
> > 
> > The patch does following:
> > - it always records the channel you are watching, when you switch
> > channel a new recording starts and the old will be deleted
> > - so you are able to repeat a scene if for example you 
> didn't understand
> > something
> > - or when you are watching a film, and you decide during 
> the film, that
> > you want to record it, you can do so, if the beginning is in the
> > livebuffer (new timer -> LiveBuffer: yes)
> > - you can turn on/off this functionality in menu -> setup ->
> > recording -> LiveBuffer
> >   there you can also set the size for the livebuffer (in MB)
> > 
> > But I want to WARN you:
> > This patch is not yet really stable! (Of course, it would 
> nice if some
> > of you test it and report bugs)
> > 
> 
> Thanks for the great additional patch!  Of course 
> modifications are required to
> the patch if you use enAIO and the jumpplay patches.  But, 
> besides vdr, I found
> 5 common plugins that also required changes when using this 
> LiveBuffer patch.
> 
> Best Regards.

Which plugins are these 5?
  
Thomas Bergwinkl Aug. 18, 2005, 3:33 p.m. UTC | #3
Klaus Schmidinger wrote:

> C.Y.M wrote:
> > Thomas Bergwinkl wrote:
> >
> >>Philippe Gramoulle wrote:
> >>
> >>
> >>
> >>>Hello,
> >>>
> >>>On Thu, 18 Aug 2005 14:07:49 +0200 (CEST)
> >>>vdr@helmutauer.de wrote:
> >>>
> >>> | With this Patch VDR can do permanent timeshift, so you
> >>>can see the last scene again whenever you want :-)
> >>>
> >>>Sorry, i'm not sure to fully understand what new
> >>>functionality this patch brings. Can you elaborate what you
> >>>mean by "permanent timeshift" ?
> >>>
> >>>How does it differ from current behavior ?
> >>
> >>
> >>The patch does following:
> >>- it always records the channel you are watching, when you switch
> >>channel a new recording starts and the old will be deleted
> >>- so you are able to repeat a scene if for example you
> didn't understand
> >>something
> >>- or when you are watching a film, and you decide during
> the film, that
> >>you want to record it, you can do so, if the beginning is in the
> >>livebuffer (new timer -> LiveBuffer: yes)
> >>- you can turn on/off this functionality in menu -> setup ->
> >>recording -> LiveBuffer
> >>  there you can also set the size for the livebuffer (in MB)
> >>
> >>But I want to WARN you:
> >>This patch is not yet really stable! (Of course, it would
> nice if some
> >>of you test it and report bugs)
> >>
> >
> >
> > Thanks for the great additional patch!  Of course
> modifications are required to
> > the patch if you use enAIO and the jumpplay patches.  But,
> besides vdr, I found
> > 5 common plugins that also required changes when using this
> LiveBuffer patch.
>
> I find it very bad if a patch modifies interfaces that require plugins
> to be specially adapted to that patch. Plugins should
> _always_ run with
> plain vanilla VDR and never require a "specially patched"
> version of VDR!

You are right Klaus. It wasn't my intention to modify any interface that
require plugins.
  
C.Y.M Aug. 18, 2005, 3:53 p.m. UTC | #4
> Which plugins are these 5?  
> 

dvd (cvs)
mp3
streamdev
sky
vcd

The patches in my previous post should provide more info.  But, after these few
modifications, it seems to be working really well :)

Also, merging the jumpplay changes into the LiveBuffer patch was also required
since jumpplay makes the following change:

-cDvbPlayer::cDvbPlayer(const char *FileName)
+cDvbPlayer::cDvbPlayer(const char *FileName, cMarks *Marks)

so, we finally have

-cDvbPlayer::cDvbPlayer(const char *FileName)
+cDvbPlayerControl(const char *FileName, cMarks *Marks, bool IsLiveRec = false);

Of course there are several other changes needed if you want to integrate enAIO
as well.  Overall though, I would have to say you did a great job.  Thanks again.


Regards.
  
Thomas Bergwinkl Aug. 18, 2005, 4:07 p.m. UTC | #5
C.Y.M wrote:
 
> > Which plugins are these 5?  
> > 
> 
> dvd (cvs)
> mp3
> streamdev
> sky
> vcd
> 
> The patches in my previous post should provide more info.  
> But, after these few
> modifications, it seems to be working really well :)

I didn't see that you attached the diff-files :-)
Now I know that it was no good idea to change virtual functions ;-)
I will think about how to avoid changing these virtual functions.


Thomas
  
Lauri Tischler Aug. 19, 2005, 8:16 a.m. UTC | #6
Klaus Schmidinger wrote:

> Plugins should _always_ run with
> plain vanilla VDR and never require a "specially patched" version of VDR!

subtitles and ttxtsub _need_ patched VDR.
  
Klaus Schmidinger Aug. 19, 2005, 8:21 a.m. UTC | #7
Lauri Tischler wrote:
> Klaus Schmidinger wrote:
> 
>> Plugins should _always_ run with
>> plain vanilla VDR and never require a "specially patched" version of VDR!
> 
> 
> subtitles and ttxtsub _need_ patched VDR.

I was referring to a patch that changed VDR in a way that (other)
plugins don't work any more _without_ that patch. If a plugin
thinks it has to patch VDR, and that patch has no implications
for other plugins, that's not the problem.

Klaus
  

Patch

Only in src: vcd
diff -ru src.orig/vcd-0.7/player.c src/vcd-0.7/player.c
--- src.orig/vcd-0.7/player.c	2005-01-28 10:36:45.000000000 -0800
+++ src/vcd-0.7/player.c	2005-08-18 07:53:28.000000000 -0700
@@ -88,7 +88,7 @@ 
   void Goto(int Position, bool Still = false);
   void GotoTrack(int Track);
   void GotoEntry(int Entry);
-  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false);
+  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false);
   virtual bool GetReplayMode(bool &Play, bool &Forward, int &Sped);
   virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId);
   const char *DeviceName(void) { return vcd->DeviceName(); }
@@ -467,7 +467,7 @@ 
   return 0;
 }
 
-bool cVcdPlayer::GetIndex(int &Current, int &Total, bool SnapToIFrame)
+bool cVcdPlayer::GetIndex(int &Current, int &Total, bool SnapToIFrame, bool onlyExisting)
 {
   Current = max((writeLba - trackOffset - CD_MSF_OFFSET) / 3, 0);
   Total = trackLast/3;