This answers the call for a VLC launcher.. In fact thats what I used
to make this..
I'll add an actual pkg file for it in a bit here.
--John
Cool, I'll check this out. I've posted my EyeTV plugin on google code
at http://code.google.com/p/pyetv/,
with due credit, of course, and the SVN for PyeTV uses PyFR as an
external repository.
I made some changes to the MenuController class so that it will
optionally display text at the right side of the menu, which I use
to display the count of recordings for a given series. One of the
outstanding issues with this is that if a recording is deleted, the
count text doesn't change since Front Row doesn't call the function to
request the item text again. Perhaps some technique you
have developed for your DynamicMenu class will help with this.
I've still been pounding my head against the problem of getting Front
Row to go back to where I started after launching an app.
I want this so badly b/c the main "play a recording" option dialog has
options like:
Play
Restart
Delete
and the most natural thing in the world after playing a TV recording
is to want to delete it. Pressing "pause" while a recording is
playing *should* return you to this dialog.
I've tried several variations, but I run into the problem of not being
able to find a valid controller stack when in the FRWasShown
callback in a subclass of WaitController. Before hiding FR,
WaitController.stack() is valid, but after hiding FR,
WaitController.stack()
is none.
Any ideas?
Cheers,
Jon
with the EyeTV plugin is that when a recording is deleted
Cool, I'll add a reference on the front page for ya.
> I made some changes to the MenuController class so that it will
> optionally display text at the right side of the menu, which I use
> to display the count of recordings for a given series. One of the
> outstanding issues with this is that if a recording is deleted, the
> count text doesn't change since Front Row doesn't call the function to
> request the item text again. Perhaps some technique you
> have developed for your DynamicMenu class will help with this.
Yeah, its a bit easier to do dynamic stuff.. More or less, I just
added a flag onto the MenuItem that says its a 'folder'.. And when we
get the selectedItem, I check that to see how I want to handle it..
the other nice thing I do is that I pass the MenuItem selected,
instead of just some data. This way, you can store whatever you want/
need in the MenuItem, and it'll all get passed along..
>
>
> I've still been pounding my head against the problem of getting Front
> Row to go back to where I started after launching an app.
I haven't tried anything yet.. I've been thinking about improving the
FrontVLC stuff, so that it has more menus (settings, multiple
directories, etc.), so something like this might be useful..
>
>
> I want this so badly b/c the main "play a recording" option dialog has
> options like:
>
> Play
> Restart
> Delete
>
> and the most natural thing in the world after playing a TV recording
> is to want to delete it. Pressing "pause" while a recording is
> playing *should* return you to this dialog.
>
> I've tried several variations, but I run into the problem of not being
> able to find a valid controller stack when in the FRWasShown
> callback in a subclass of WaitController. Before hiding FR,
> WaitController.stack() is valid, but after hiding FR,
> WaitController.stack()
> is none.
>
>
> Any ideas?
The only think I can think of right now is to save a copy of the stack
before we hide FR, and then "replay the stack", pushing each
controller once we come back.. But we might lose the state of the
controller or something inbetween, so I'm not sure how that would work.
--John
The only think I can think of right now is to save a copy of the stack
before we hide FR, and then "replay the stack", pushing each
controller once we come back.. But we might lose the state of the
controller or something inbetween, so I'm not sure how that would work.
Instead of using the hide/unhide functions, I switched to something
else I stumbled on:
displayManager = BRDisplayManager.singleton()
displayManager.releaseAllDisplays()
displayManager.fadeOutDisplay()
and
displayManager = BRDisplayManager.singleton()
displayManager.captureAllDisplays()
displayManager.fadeInDisplay()
This -almost- works... I happen to run 2 screens (MBP w/ external
monitor).. What normally happens is that FR takes over both
displays... With this code in place, when I launch the app, it
releases my non-primary display, but keeps my WaitController active on
the primary.. And it puts the VLC app in focus, but *behind* the
WaitController... I can press keys that are active in VLC, and they
take affect.. I just can't see it.. When I exit VLC with apple-Q, it
returns back to taking over both screens, and sits at the
WaitController, until I hit exit..
So this means, if we can figure out how to hide that WaitController, I
think we'll have it licked.. It'll come back right to where you left
off..
I'll try to do some more experimenting tonight, and over the next few
days.. The wif is out of town, so I have some extra time :)
--John
On Jan 21, 2008, at 12:50 AM, Jon Christopher wrote:
> I've tried that. At first, I thought the stack items I had saved
> were no longer valid.
> I'm not sure if _hideFrontRow actually pops them off the stack, and
> if it does if
> that means that they get garbage collected/otherwise freed. (I
> don't really grok objc yet,
> so I'm fumbling around in the dark quite a bit).
>
> Now I'm not so sure that was the problem at all, as I've realized
> that I can't figure out how
> to get a valid BRControllerStack to push controllers on to.
> Apparently _hideFrontRow is
> not only popping the stack, but also deleting the stack itself.
>
> WaitController is itself a controller, and the FRWasShown function
> is defined in this controller,
> so you'd think self.stack() would return a stack. It does before
> hiding front row, but not after
> it's shown again.
>
> So when the FRWasShown function is called, I don't know which
> controller is currently at the top of
> the current controller stack, or how to get a valid stack to operate
> on. If I had a stack, I could
> push the appropriate controllers onto it.
--John
def enableObjCCapture(self):
objc.loadBundleFunctions(Foundation.__bundle__, globals(),
[('instrumentObjcMessageSends', objc._C_VOID + objc._C_NSBOOL)])
instrumentObjcMessageSends(True)
def disableObjCCapture(self):
objc.loadBundleFunctions(Foundation.__bundle__, globals(),
[('instrumentObjcMessageSends', objc._C_VOID + objc._C_NSBOOL)])
instrumentObjcMessageSends(False)
It brought the capture down to about 1000 lines or so, which isn't
overly bad to parse through.
--John
--John