[mythtv] PATCH: More deinterlacing support.
Richard Jones
richard at earthmen.com
Tue Mar 25 22:56:26 EST 2003
On Tue, 2003-03-25 at 08:03, Isaac Richards wrote:
> On Monday 24 March 2003 03:14 pm, Richard Jones wrote:
> > I can see how you'd think that ;-) Just to clarify, your referring to
> > the way the player doesn't retrieve the current deinterlacing state from
> > the backend so that next time it starts it appears that the starting
> > state is different from the state you last set? Or is there a deeper
> > level of brokenness? If thats it I'll add some code to query the state
> > tonight and submit it with the thread safe area based deinterlacer.
>
> TVRec::ChangeDeinterlacer(), mainly, and how TV::ChangeDeinterlacer() doesn't
> really lock its rbuffer at all (see the channel changing code for what might
> work, though it still wouldn't reinitialize the display enough to change
> live) -- really can't see how what you had in there didn't crash pretty much
> immediately =)
Ok I think some cruft I left in the patch may have confused issues here.
The ChangeDeinterlacer() method in the patch looks like this:
+void TVRec::ChangeDeinterlacer(int deint_mode)
+{
+
+ deinterlace_mode = deint_mode;
+ return;
+
+ TVState originalState = internalState;
+ nextState = kState_None;
+ HandleStateChange();
+ deinterlace_mode = deint_mode;
+ nextState = originalState;
+
+ QString path = "";
+ long long filesize = 0;
+ long long fillamount = 0;
+ bool pip = false;
+
+ SetupRingBuffer(path,filesize,fillamount,pip);
+
+ HandleStateChange();
}
I think that useless code after the return may have been what you've read here.
Basically this method just sets the deinterlacer_mode, it doesn't propagate this
into the recorder until
void TVRec::SetupRecorder(RecordingProfile& profile)
{
nvr = new NuppelVideoRecorder();
nvr->ChangeDeinterlacer(deinterlace_mode);
.....
Is called which creates a new nvr and sets the deinterlacer before calling
initialize on it. This is why I mentioned the need to restart the player
after changing the deinterlacing mode, this is what triggers the starting
of the new nvr with the new deinterlacing mode. This looks relatively safe to
me. Now its still likely I'm completely missing the point in which case feel
free to call me an idiot :-)
In any case I've attached another patch which cleans out the rubbish above (
bringing back the 'x' key binding in the player to move through modes) and
adds a thread safe areaDeinterlacer.
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deinterlace2.diff
Type: text/x-patch
Size: 17752 bytes
Desc: not available
Url : /pipermail/attachments/20030325/bc7c27eb/deinterlace2.bin
More information about the mythtv-dev
mailing list