On Fri, June 26, 2009 11:16 am, Adam Charrett wrote:
> On Thu, June 25, 2009 8:11 pm, Michel Hoogervorst wrote:
>>>
>>> The dialog.x11_overlay_display replaces the default mplayer display to
>>> display a pretty pause and play icon instead of the text messages.
>>
>>
>> Ok, I understand. This should indeed be better looking... but without a
>> progress-bar when seeking, and some info about the selected subtitle
>> when
>> pressing the subtitle-button this is pretty useless... especially when
>> playing a dvd with lots of subtitles it can be an anoyance when you're
>> not
>> able to see which one you just selected...
>
> The overlay display stuff is still pretty much in development and needs
> someone with some artistic ability (ie. not me :-)) to design a nicer
> display for the seeking/pause display. Fancy a go, it should be reasonable
> easy as there is a GUI design tool for the dialogs (freevo osddesigner).
> As for the subtitles, I hold my hands up I didn't think of this as I don't
> use it in video, I'm not even sure mplayer supports outputing this
> information to freevo via the console. I'll have to see if it is possible
> to turn on the mplayer osd just for subtitle selection.
>
Duncan, Michel could you try the attached patch (with the x11_osd_display
enabled) to see if mplayer now displays the subtitles being selected?
The patch was against the latest 1_9_1 tip.
Cheers
Adam
diff -ur freevo-1.9.1/src/video/plugins/mplayer.py freevo-tmp/src/video/plugins/mplayer.py
--- freevo-1.9.1/src/video/plugins/mplayer.py 2009-06-26 12:34:06.000000000 +0100
+++ freevo-tmp/src/video/plugins/mplayer.py 2009-06-26 12:33:45.000000000 +0100
@@ -447,7 +447,9 @@
return self.item.eventhandler(event)
if event == VIDEO_SEND_MPLAYER_CMD:
+ self.enable_osd(True)
self.app.write('%s\n' % event.arg)
+ self.enable_osd(False)
return True
if event == TOGGLE_OSD:
@@ -461,17 +463,19 @@
return True
if event == PAUSE or event == PLAY:
- self.paused = not self.paused
- # We have to store the current time before displaying the dialog
- # otherwise the act of requesting the current position resumes playback!
- if self.paused:
- self.stored_time_info = self.get_time_info()
- dialog.show_play_state(dialog.PLAY_STATE_PAUSE, self.get_time_info)
- self.app.write('pause\n')
+ if dialog.is_dialog_supported():
+ self.paused = not self.paused
+ # We have to store the current time before displaying the dialog
+ # otherwise the act of requesting the current position resumes playback!
+ if self.paused:
+ self.stored_time_info = self.get_time_info()
+ dialog.show_play_state(dialog.PLAY_STATE_PAUSE, self.get_stored_time_info)
+ self.app.write('pause\n')
+ else:
+ self.app.write('pause\n')
+ dialog.show_play_state(dialog.PLAY_STATE_PLAY, self.get_time_info)
else:
- self.app.write('speed_set 1.0\n')
- dialog.show_play_state(dialog.PLAY_STATE_PLAY, self.get_time_info)
-
+ self.app.write('pause\n')
return True
if event == SEEK:
@@ -501,25 +505,32 @@
dialog.show_message(_('Seeking not possible'))
return False
-
- if event.arg > 0:
- dialog.show_play_state(dialog.PLAY_STATE_SEEK_FORWARD, self.get_time_info)
- else:
- dialog.show_play_state(dialog.PLAY_STATE_SEEK_BACK, self.get_time_info)
+ if dialog.is_dialog_supported():
+ if event.arg > 0:
+ dialog.show_play_state(dialog.PLAY_STATE_SEEK_FORWARD, self.get_time_info)
+ else:
+ dialog.show_play_state(dialog.PLAY_STATE_SEEK_BACK, self.get_time_info)
+ self.paused = False
self.app.write('seek %s\n' % event.arg)
return True
if event == VIDEO_AVSYNC:
- self.app.write('audio_delay %g\n' % event.arg);
+ self.enable_osd(True)
+ self.app.write('pausing_keep audio_delay %g\n' % event.arg);
+ self.enable_osd(False)
return True
if event == VIDEO_NEXT_AUDIOLANG:
- self.app.write('switch_audio\n')
+ self.enable_osd(True)
+ self.app.write('pausing_keep switch_audio\n')
+ self.enable_osd(False)
return True
if event == VIDEO_NEXT_SUBTITLE:
- self.app.write('sub_select\n')
+ self.enable_osd(True)
+ self.app.write('pausing_keep sub_select\n')
+ self.enable_osd(False)
return True
if event == OSD_MESSAGE:
@@ -529,6 +540,15 @@
# nothing found? Try the eventhandler of the object who called us
return self.item.eventhandler(event)
+ def enable_osd(self, enable):
+ # Only need to do this if we have an overlay display as otherwise the
+ # mplayer osd will already be enabled.
+ if dialog.is_dialog_supported():
+ if enable:
+ self.app.write('pausing_keep set_property osdlevel 1\n')
+ else:
+ self.app.write('pausing_keep set_property osdlevel 0\n')
+
def show_message(self, message):
self.app.write('osd_show_text "%s"\n' % message);
------------------------------------------------------------------------------
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users