diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/HISTORY vdr-plugin-xineliboutput-1.0.7+cvs20130303/HISTORY --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/HISTORY 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/HISTORY 2012-01-19 12:50:01.000000000 +0000 @@ -24,6 +24,25 @@ - Implemented build-time configuration script - Fixed aspect ratio problems when using ffmpeg mpeg2 decoder - H.264 updates +- Added support for .ass subtitles to media player (Thanks to zaverel) +- Added support for .smi subtitles to media player +- Added OpenGL HUD OSD support: HUD OSD without compositing / window manager + (thanks to grueni75) +- Added tearing-free OpenGL video output support with high-quality OSD (thanks to grueni75) + +2011-07-10: Version 1.0.7 (branch-1_0_x) +Backported bugfixes from CVS trunk: +- Accept short X11 display names (:0) +- Improved vdr server discovery when server is listening on all interfaces +Features: +- Updated Italian translations (Thanks to Diego Pierotto) +- Default to UDP transport. RTP is enabled only if requested on command line. +- Improved automatic BluRay subtitle selection +- React to X11 display size changes +- Do not show hidden files in media player file browser +- Added config entry to show hidden files in media player file browser +- Added --geometry and --window options to vdr plugin. +- Allow setting window position when starting in fullscreen mode. 2011-02-28: Version 1.0.6 (CVS branch-1_0_x for vdr.1.4.x and vdr-1.6.x) Backported bugfixes from CVS trunk: diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/Makefile vdr-plugin-xineliboutput-1.0.7+cvs20130303/Makefile --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/Makefile 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/Makefile 2012-07-29 08:55:00.000000000 +0000 @@ -4,7 +4,7 @@ # See the main source file 'xineliboutput.c' for copyright information and # how to reach the author. # -# $Id: Makefile,v 1.106 2011/01/23 19:42:08 phintuka Exp $ +# $Id: Makefile,v 1.110 2012/07/29 08:55:00 phintuka Exp $ # # The official name of this plugin. @@ -123,7 +123,7 @@ config.mak: Makefile configure @echo Running configure - @sh configure --cc=$(CC) --cxx=$(CXX) $(CONFIGURE_OPTS) $(XINELIBOUTPUT_CONFIGURE_OPTS) + @sh configure --cc="$(CC)" --cxx="$(CXX)" $(CONFIGURE_OPTS) $(XINELIBOUTPUT_CONFIGURE_OPTS) -include config.mak ### @@ -206,6 +206,7 @@ ### # VDR plugin +ifeq ($(XINELIBOUTPUT_VDRPLUGIN), yes) OBJS = $(PLUGIN).o device.o frontend.o osd.o config.o menu.o setup_menu.o \ menuitems.o media_player.o equalizer.o \ frontend_local.o frontend_svr.o \ @@ -214,10 +215,12 @@ tools/vdrdiscovery.o tools/time_pts.o tools.o \ tools/metainfo_menu.o logdefs.o tools/rle.o OBJS_MPG = black_720x576.o nosignal_720x576.o vdrlogo_720x576.o +endif # frontends OBJS_FE_SO = xine_frontend.o logdefs.o \ xine/post.o xine/vo_hook.o xine/vo_osdscaler.o xine/vo_osdreorder.o xine/vo_lastpts.o \ + xine/vo_frameoutput.o \ tools/rle.o OBJS_FE = $(OBJS_FE_SO) tools/vdrdiscovery.o xine_frontend_main.o xine_frontend_lirc.o xine_frontend_kbd.o @@ -281,10 +284,11 @@ # C code (xine plugins and frontends) $(sort $(OBJS_SXFE) $(OBJS_FBFE) $(OBJS_XINE)): - $(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $(CFLAGS_X11) $(OPTFLAGS) -o $@ $< + $(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $(CFLAGS_X11) $(CFLAGS_AVUTIL) $(OPTFLAGS) -o $@ $< ### Internationalization (I18N): ifeq ($(HAVE_I18N), yes) +ifeq ($(XINELIBOUTPUT_VDRPLUGIN), yes) PODIR = po LOCALEDIR ?= $(DESTDIR)$(VDRDIR)/locale I18Npo = $(wildcard $(PODIR)/*.po) @@ -305,6 +309,7 @@ @mkdir -p $(dir $@) cp $< $@ endif +endif .PHONY: i18n i18n: $(I18Nmsgs) diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/README vdr-plugin-xineliboutput-1.0.7+cvs20130303/README --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/README 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/README 2012-01-19 12:50:01.000000000 +0000 @@ -37,6 +37,8 @@ - X server with Composite and Xrender extensions, compositing window manager or composite manager (xcompmgr). (Required for HUD OSD to blend high-quality OSD using graphics hardware) + - X server with OpenGL support + (Required for OpenGL video output and OpenGL HUD OSD) - libextractor 0.5.20 or later (http://libextractor.sourceforge.net). (used for media file metadata extraction in media player) - libjpeg for grabbing in JPEG format @@ -244,20 +246,56 @@ OSD is scaled and blended using hardware, so it adds no extra CPU overhead. OSD is always blended to output (display) resolution, so it remains sharp and detailed even with low-resolution video. + It can also support transparency in the same way as full-featured + DVB cards. HUD OSD must be enabled with command-line option (--hud). Scaling options can be configured in xineliboutput plugin setup menu, OSD settings page. + There are three possible configurations for using HUD OSD. First one + is to use a X server with composite / Xrender extensions and a composite + manager. This is the default when the hud is enabled with --hud. The + second one is to use a X server with XShape support. This configuration + is enabled with the --hud=shape option. The third one is to use a + X server with OpenGL support. The option --hud=opengl enables this + configuration. + + The first configuration requires a composite manager to get transparency + support. The second configuration can be used if the composite manager + slows down the video play back. The HUD OSD has the same quality, but + does not support transparency. + + The third configuration does not require the composite/Xrender extension. + Hence, it can also be used with VDPAU NVIDIA graphic cards that produce + video tearing with enabled composite extension. OpenGL is only used if + the OSD is displayed. For video playback, the normal output to a window + via the xine-lib is used. Therefore, normal video playback is as smooth + as the xine-lib playback allows. OpenGL playback requires additional + computing power from the cpu and graphic card, and can result in + occasionally frame drops. If your hardware configuration is powerful + enough, you can also try to use the --opengl option. It does both pure + video playback and OSD drawing via OpenGL. The advantage is that there + are no frame drops if the OSD opens and closes, because there is no + switching between window-based and OpenGL-based playback. + Requirements: - - X server with Composite and Xrender extensions. - Composite extension must be enabled in Xorg config. - - Composite window manager (compiz, beryl, or properly configured xfce4, metacity, ...) - or separate composite manager (xcompmgr). + - First configuration (--hud): + - X server with Composite and Xrender extensions. + Composite extension must be enabled in Xorg config. + - Composite window manager (compiz, beryl, or properly configured xfce4, metacity, ...) + or separate composite manager (xcompmgr) for transparency support. + - Second configuration (--hud=xshape) + - X server with Composite, Xrender and XShape extension. + - no window manager required. + - Third configuration (--hud=opengl or --opengl) + - X server with OpenGL support + - no window manager required. - Compatible graphics hardware and drivers. HUD OSD has been tested with: nVidia GF FX5700LE (driver version 169.09) Intel G965 (GMA-X3000) (driver version 2.2.1, textured XVideo) + nVidia GT 425M (driver version 290.10, VDPAU) metacity 2.23.2 xcompmgr 1.1.3 @@ -266,13 +304,40 @@ - Drawing video (even without OSD) may be slower when composite extension is enabled. + - A composite window manager can also slow down the video playback. In + case of problems, switch off the window manager to see if playback + improves. + - Try to adjust OSD size and offsets to get rid of possible graphical corruption. - For true HD-resolution OSD VDR needs to be patched. + - OpenGL-based HUD requires that the xine-lib video out driver + supports redirecting video frames to a pixmap. VDPAU is known + to work (tested with changeset 11949:0e68b56727d6 from 2011-12-21 of + xine-lib 1.2). XV does currently not support it. + + - If you see black frames when opening the HUD with the --hud=opengl + option: The video out driver frees all resources when the + request to switch to a pixmap arrives. This clean up can also + include clearing the window, resulting in a black frame until the + OpenGL drawing takes over. The VDPAU output drivers behaves in + this way. There are two options to fix this: Either enable the + BackingStore of the X-Server (Option "BackingStore" TRUE in the + Device Section for NVIDIA cards) or patch the xine-lib to not + immediately free the resources. There is an example patch for VDPAU + included in the patches directory (xinelib_vdpau_black_frame.patch). + Please note that enabling the backing store might also require + to enable the Composite extension. + + - Tearing free OpenGL playback / HUD requires that the "Sync to VBLank" + option is set. For nvidia cards, this can be done via the command + "nvidia-settings -a SyncToVBlank=1" + HUD OSD was contributed by Antti Seppälä and Rolf Ahrenberg. + HUD OSD XShape and OpenGL extensions were contributed by Matthias Grünewald. Using with xine-ui (xine, fbxine, gxine, ...) diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/config.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/config.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/config.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/config.c 2012-03-19 11:38:43.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.105 2011/07/10 21:35:22 phintuka Exp $ + * $Id: config.c,v 1.115 2012/03/19 11:38:43 phintuka Exp $ * */ @@ -93,12 +93,6 @@ NULL }; -const char * const config_t::s_fieldOrder[ FIELD_ORDER_count+1 ] = { - trNOOP("normal"), - trNOOP("inverted"), - NULL -}; - const char * const config_t::s_audioDrivers[ AUDIO_DRIVER_count+1 ] = { "auto", "alsa", "oss", "none", "esd", "jack", NULL @@ -115,7 +109,18 @@ }; const char * const config_t::s_videoDriversX11[ X11_DRIVER_count+1 ] = { - "auto", "xshm", "xv", "xvmc", "xxmc", "vidix", "XDirectFB", "opengl", "sdl", "none", + "auto", + "xshm", + "xv", + "vaapi", + "vdpau", + "opengl", + "xvmc", + "xxmc", + "sdl", + "XDirectFB", + "vidix", + "none", NULL }; @@ -123,12 +128,14 @@ trNOOP("automatic"), "XShm", "Xv", + "VAAPI", + "VDPAU", + "OpenGL", "XvMC", "XvMC+VLD", - "Vidix", - "XDirectFB", - "OpenGL", "SDL", + "XDirectFB", + "Vidix", trNOOP("no video"), NULL }; @@ -211,8 +218,8 @@ }; const char * const config_t::s_subExts[] = { - ".sub", ".srt", ".txt", ".ssa", - ".SUB", ".SRT", ".TXT", ".SSA", + ".sub", ".srt", ".txt", ".ssa", "ass", "smi", + ".SUB", ".SRT", ".TXT", ".SSA", "ASS", "SMI", NULL }; @@ -619,7 +626,6 @@ width = 720; height = 576; scale_video = 0; - field_order = 0; autocrop = 0; autocrop_autodetect = 1; @@ -705,15 +711,19 @@ enable_id3_scanner = 1; dvd_arrow_keys_control_playback = 1; media_menu_items = ~0; + media_enable_delete = 0; main_menu_mode = ShowMenu; + last_hotkey = -1;//kNone; force_primary_device = 0; }; +#if 0 static uint8_t g_hidden_options[sizeof(config_t)] = {0}; static uint8_t g_readonly_options[sizeof(config_t)] = {0}; uint8_t *config_t::hidden_options = &g_hidden_options[0]; uint8_t *config_t::readonly_options = &g_readonly_options[0]; +#endif cString config_t::m_ProcessedArgs; bool config_t::ProcessArg(const char *Name, const char *Value) @@ -781,12 +791,13 @@ #endif } #ifndef HAVE_XRENDER - LOGMSG("HUD OSD not supported\n"); + else + LOGMSG("HUD OSD not supported\n"); #endif break; case 'O': ProcessArg("OpenglAlways", "1"); #ifndef HAVE_OPENGL - LOGMSG("OpenGL HUD OSD not supported\n"); + LOGMSG("OpenGL not supported\n"); #endif break; case 'w': //ProcessArg("Fullscreen", "0"); @@ -953,7 +964,6 @@ else if (!strcasecmp(Name, "Video.Scale")) scale_video = atoi(Value); else if (!strcasecmp(Name, "Video.DeinterlaceOptions")) STRN0CPY(deinterlace_opts, Value); else if (!strcasecmp(Name, "Video.Deinterlace")) STRN0CPY(deinterlace_method, Value); - else if (!strcasecmp(Name, "Video.FieldOrder")) field_order=atoi(Value)?1:0; else if (!strcasecmp(Name, "Video.AutoCrop")) autocrop = atoi(Value); else if (!strcasecmp(Name, "Video.AutoCrop.AutoDetect")) autocrop_autodetect = atoi(Value); @@ -1020,6 +1030,7 @@ else if (!strcasecmp(Name, "Media.EnableID3Scanner")) enable_id3_scanner = atoi(Value); else if (!strcasecmp(Name, "Media.DVD.ArrowKeysControlPlayback")) dvd_arrow_keys_control_playback = atoi(Value); else if (!strcasecmp(Name, "Media.MenuItems")) media_menu_items = atoi(Value); + else if (!strcasecmp(Name, "Media.EnableDelete")) media_enable_delete = atoi(Value); else if (!strcasecmp(Name, "Playlist.Tracknumber")) playlist_tracknumber = atoi(Value); else if (!strcasecmp(Name, "Playlist.Artist")) playlist_artist = atoi(Value); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/config.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/config.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/config.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/config.h 2012-03-19 11:38:43.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.h,v 1.81 2011/07/10 21:35:22 phintuka Exp $ + * $Id: config.h,v 1.90 2012/03/19 11:38:43 phintuka Exp $ * */ @@ -16,7 +16,9 @@ #include #include -#include +#include + +class cOsdObject; // Max number of remote clients #define MAXCLIENTS 10 @@ -59,10 +61,6 @@ #define DEINTERLACE_TVTIME 7 #define DEINTERLACE_count 8 -#define FIELD_ORDER_NORMAL 0 -#define FIELD_ORDER_INVERTED 1 -#define FIELD_ORDER_count 2 - // Audio driver #define AUDIO_DRIVER_AUTO 0 #define AUDIO_DRIVER_ALSA 1 @@ -76,14 +74,16 @@ #define X11_DRIVER_AUTO 0 #define X11_DRIVER_XSHM 1 #define X11_DRIVER_XV 2 -#define X11_DRIVER_XVMC 3 -#define X11_DRIVER_XXMC 4 -#define X11_DRIVER_VIDIX 5 -#define X11_DRIVER_DIRECTFB 6 -#define X11_DRIVER_OPENGL 7 +#define X11_DRIVER_VAAPI 3 +#define X11_DRIVER_VDPAU 4 +#define X11_DRIVER_OPENGL 5 +#define X11_DRIVER_XVMC 6 +#define X11_DRIVER_XXMC 7 #define X11_DRIVER_SDL 8 -#define X11_DRIVER_NONE 9 -#define X11_DRIVER_count 10 +#define X11_DRIVER_DIRECTFB 9 +#define X11_DRIVER_VIDIX 10 +#define X11_DRIVER_NONE 11 +#define X11_DRIVER_count 12 #define FB_DRIVER_AUTO 0 #define FB_DRIVER_FB 1 @@ -233,7 +233,6 @@ static const char * const s_vo_aspects [VO_ASPECT_count + 1]; static const char * const s_deinterlaceMethods [DEINTERLACE_count + 1]; static const char * const s_deinterlaceMethodNames [DEINTERLACE_count + 1]; - static const char * const s_fieldOrder [FIELD_ORDER_count + 1]; static const char * const s_audioDriverNames [AUDIO_DRIVER_count + 1]; static const char * const s_audioDrivers [AUDIO_DRIVER_count + 1]; static const char * const s_videoDriverNamesX11 [X11_DRIVER_count + 1]; @@ -265,6 +264,12 @@ // Force xineliboutput to be the primary device int force_primary_device; + // OSD state + eMainMenuMode main_menu_mode; // used internally to open right sub-menu + cOsdObject *pending_menu_action; // used to replace current OSD with another type of OSD object + time_t last_hotkey_time; + int/*eKeys*/ last_hotkey; + // local frontend settings char local_frontend[64]; char video_driver[32]; @@ -284,10 +289,11 @@ int ypos; int display_aspect; int scale_video; - int field_order; int exit_on_close; // Terminate VDR when local frontend is closed int use_x_keyboard; // Use X11 keyboard to control VDR (console kbd is handled by VDR) int window_id; // use existing X11 window + int hud_osd; // head up display OSD + int opengl; // use opengl acceleration for video and HUD OSD // Audio settings int speaker_type; @@ -298,6 +304,10 @@ int headphone; // mix audio for headphones int audio_upmix; // upmix stereo to 5.1 int sw_volume_control; // software (xine-lib) or hardware (alsa) volume control and muting + // Audio visualization + char audio_visualization[64]; + char audio_vis_goom_opts[256]; + char audio_vis_image_mrl[4096]; // Video settings int ibp_trickspeed; @@ -311,8 +321,7 @@ int noise_reduction; // 0...0xffff, -1 == off int vo_aspect_ratio; - // OSD settings - eMainMenuMode main_menu_mode; // used internally to open right sub-menu + // OSD settings int hide_main_menu; int osd_size; int osd_width; @@ -323,8 +332,6 @@ int osd_mixer; // show multiple OSD layers int osd_scaling; // OSD scaling mode: off, nearest, bilinear int osd_spu_scaling; // SPU OSD scaling mode: off, nearest, bilinear - int hud_osd; // head up display OSD - int opengl; // use opengl acceleration for video and HUD OSD int osd_blending; // OSD blending method int osd_blending_lowresvideo; // Use hardware blending for low-resolution video int alpha_correction; @@ -346,11 +353,7 @@ int playlist_album; int dvd_arrow_keys_control_playback; uint media_menu_items; // enabled items in media player menu (bitmask) - - // Audio visualization - char audio_visualization[64]; - char audio_vis_goom_opts[256]; - char audio_vis_image_mrl[4096]; + int media_enable_delete; // enable Delete in file browser // deinterlacing post plugin char deinterlace_method[32]; @@ -461,15 +464,18 @@ cString UnsharpOptions(void); cString Denoise3dOptions(void); +#if 0 template bool IsOptionHidden(T & option) { return hidden_options[(int)((long int)&option - (long int)this)];}; template bool IsOptionReadOnly(T & option) { return readonly_options[(int)((long int)&option - (long int)this)];}; +#endif protected: bool ProcessArg(const char *Name, const char *Value); static cString m_ProcessedArgs; +#if 0 static uint8_t *hidden_options; static uint8_t *readonly_options; @@ -477,6 +483,7 @@ { hidden_options[(int)((long int)&option - (long int)this)] = 1;}; template void ReadOnlyOption(T & option) { readonly_options[(int)((long int)&option - (long int)this)] = 1;}; +#endif }; // Global instance diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/configure vdr-plugin-xineliboutput-1.0.7+cvs20130303/configure --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/configure 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/configure 2012-08-30 06:44:20.000000000 +0000 @@ -7,7 +7,7 @@ # See the main source file 'xineliboutput.c' for copyright information and # how to reach the author. # -# * $Id: configure,v 1.38 2011/06/11 08:38:43 phintuka Exp $ +# * $Id: configure,v 1.42 2012/08/30 06:44:20 phintuka Exp $ # PKG_CONFIG="pkg-config" @@ -30,7 +30,7 @@ die(){ log "$@" - exit -1 + exit 1 } log(){ @@ -334,8 +334,7 @@ disabled vdr && disable libextractor libcap libbluray disabled dlfcn && disable opengl disabled pthread && disable opengl - disabled xrender && disable opengl - disabled xshape && disable opengl + disabled xrender && disable xshape xshm } check_deps @@ -377,7 +376,7 @@ test_library X11 xshape "X11/extensions/shape.h" "-lXext" "XShapeQueryExtension(0,0,0)" test_library X11 xdpms "X11/extensions/dpms.h" "-lXext" "DPMSDisable(0)" test_library X11 xinerama "X11/extensions/Xinerama.h" "-lXinerama" "XineramaQueryScreens(0,0)" - test_library X11 opengl "GL/glx.h" "-lGL -lGLU -lglut" "glXQueryVersion(0,0,0)" + test_library X11 opengl "GL/glx.h" "-lGL -lGLU" "glXQueryVersion(0,0,0)" test_library none vdpau "vdpau/vdpau_x11.h" "-lvdpau" "vdp_device_create_x11(0,0,0,0)" test_library X11 dbus-glib-1 \ "dbus/dbus-glib.h" \ @@ -468,6 +467,7 @@ echo "CFLAGS_XINE += $CFLAGS_XINE">>$makefile echo "CFLAGS_VDR += $CFLAGS_VDR">>$makefile echo "CFLAGS_X11 += $CFLAGS_X11">>$makefile +echo "CFLAGS_AVUTIL += $CFLAGS_AVUTIL">>$makefile echo "LIBS_XINE += $LIBS_XINE">>$makefile echo "LIBS_JPEG += $LIBS_JPEG">>$makefile echo "LIBS_AVUTIL += $LIBS_AVUTIL">>$makefile diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/changelog vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/changelog --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/changelog 2011-12-11 16:26:49.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/changelog 2013-03-04 11:28:48.000000000 +0000 @@ -1,37 +1,118 @@ -vdr-plugin-xineliboutput (1.0.7+cvs20111211.1625-1) unstable; urgency=low +vdr-plugin-xineliboutput (1.0.7+cvs20130303-0yavdr0~precise) precise; urgency=low * New Upstream Snapshot - * Build-depend on vdr-dev (>= 1.7.22) - -- Tobias Grimm Sun, 11 Dec 2011 17:26:04 +0100 + -- Marcus Brimmer Sun, 03 Mar 2013 04:32:01 +0100 -vdr-plugin-xineliboutput (1.0.7+cvs20111029.0956-1) unstable; urgency=low +vdr-plugin-xineliboutput (1.0.7+cvs20120830-2yavdr1~precise) precise; urgency=medium - * New Upstream Snapshot - * Switched to GIT using pristine tar + * rebuild - -- Tobias Grimm Sat, 29 Oct 2011 11:56:16 +0200 + -- Lars Hanisch Sun, 09 Dec 2012 19:35:01 +0100 -vdr-plugin-xineliboutput (1.0.7+cvs20111023.1141-1) unstable; urgency=low +vdr-plugin-xineliboutput (1.0.7+cvs20120830-2yavdr0~precise) precise; urgency=medium - * New Upstream Snapshot - * Support epoch in libxine version + * add patch for vdr 1.7.33 + + -- Lars Hanisch Sun, 09 Dec 2012 19:04:31 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-1yavdr1~precise) precise; urgency=medium + + * rebuild + + -- Lars Hanisch Wed, 05 Dec 2012 21:19:43 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-1yavdr0~precise) precise; urgency=medium + + * replace dependency libjpeg62 with libjpeg + + -- Lars Hanisch Tue, 04 Dec 2012 18:55:43 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-0yavdr4~precise) precise; urgency=medium + + * rebuild + + -- Lars Hanisch Sat, 01 Dec 2012 16:04:23 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-0yavdr3~precise) precise; urgency=medium + + * rebuild + + -- Lars Hanisch Wed, 21 Nov 2012 20:14:06 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-0yavdr2~precise) precise; urgency=medium + + * rebuild + + -- Holger Schvestka Wed, 21 Nov 2012 07:44:15 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120830-0yavdr0~precise) precise; urgency=medium + + * New upstream snapshot + + -- Holger Schvestka Fri, 12 Oct 2012 16:24:07 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20120313-0yavdr0~precise) precise; urgency=medium + + * New upstream snapshot + * libxine-dev -> libxine2-dev + + -- Holger Schvestka Tue, 13 Mar 2012 19:03:18 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111217.2347-1yavdr0~precise) precise; urgency=medium + + * Change dfatmo patch to match lirc namespace from "DFAtmoEnabled" to "KEY_BRIGHTNESS_CYCLE" + + -- Reiner Paulus Sun, 18 Dec 2011 17:50:06 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111217.2347-0yavdr0~precise) precise; urgency=medium + + * New upstream snapshot + + -- Reiner Paulus Sun, 18 Dec 2011 00:50:49 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111129.2100-0yavdr3~precise) precise; urgency=medium + + * Fix control file to work with precise: libjpeg-dev -> libjpeg8-dev + + -- Reiner Paulus Sun, 04 Dec 2011 20:01:43 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111129.2100-0yavdr2~precise) precise; urgency=medium + + * Fix libxine-dfatmo patch to work with latest cvs version + + -- Reiner Paulus Sun, 04 Dec 2011 16:00:14 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111129.2100-0yavdr1~precise) precise; urgency=medium + + * Update from libxine-atmo to libxine-dfatmo patch + + -- Reiner Paulus Sun, 04 Dec 2011 13:17:42 +0100 + +vdr-plugin-xineliboutput (1.0.7+cvs20111129.2100-0yavdr0~precise) precise; urgency=medium + + * New upstream snapshot + + -- Holger Schvestka Tue, 29 Nov 2011 21:00:56 +0200 + +vdr-plugin-xineliboutput (1.0.7+cvs20111025.2215-1yavdr0~precise) precise; urgency=medium + + * workaround for unresolved symbol EXIT - -- Tobias Grimm Sun, 23 Oct 2011 13:41:14 +0200 + -- Gerald Dachs Tue, 25 Oct 2011 23:14:51 +0200 -vdr-plugin-xineliboutput (1.0.7+cvs20110918.1632-1) unstable; urgency=low +vdr-plugin-xineliboutput (1.0.7+cvs20111025.2215-0yavdr0~precise) precise; urgency=medium * New Upstream Snapshot - * Build-depend on vdr-dev (>= 1.7.21) - -- Tobias Grimm Sun, 18 Sep 2011 18:23:54 +0200 + -- Holger Schvestka Tue, 25 Oct 2011 22:15:29 +0200 -vdr-plugin-xineliboutput (1.0.7+cvs20110820.1342-1) unstable; urgency=low +vdr-plugin-xineliboutput (1.0.7+cvs20110901.0800-1yavdr2~precise) precise; urgency=medium * New Upstream Snapshot * Build-depend on vdr-dev (>= 1.7.20) - -- Tobias Grimm Sat, 20 Aug 2011 15:26:09 +0200 + -- Holger Schvestka Fri, 01 Sep 2011 08:00:09 +0200 vdr-plugin-xineliboutput (1.0.6+cvs20110619.1841-1) unstable; urgency=low diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/control vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/control --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/control 2011-12-11 16:26:49.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/control 2012-12-04 17:54:34.000000000 +0000 @@ -4,9 +4,9 @@ Maintainer: Debian VDR Team Uploaders: Tobias Grimm , Thomas Schmidt , Thomas Günther Build-Depends: debhelper (>= 7.0.50~), gettext, txt2man, - vdr-dev (>= 1.7.22), + vdr-dev (>= 1.7.20), x11proto-core-dev, - libxine-dev (>= 1.1.12), + libxine2-dev, libxext-dev, libjpeg-dev, libx11-dev, @@ -14,11 +14,13 @@ libextractor-dev, libxinerama-dev, libxrender-dev, + libavutil-dev, + libcap-dev, libvdpau-dev, freeglut3-dev Standards-Version: 3.9.2 -Vcs-Git: git://git.debian.org/git/pkg-vdr-dvb/vdr-plugin-xineliboutput.git -Vcs-Browser: http://git.debian.org/?p=pkg-vdr-dvb/vdr-plugin-xineliboutput.git +Vcs-Svn: svn://svn.debian.org/pkg-vdr-dvb/vdr/vdr-plugin-xineliboutput/trunk/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-xineliboutput/trunk/ Homepage: http://sourceforge.net/projects/xineliboutput Package: vdr-plugin-xineliboutput @@ -30,35 +32,35 @@ Package: libxineliboutput-fbfe Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-plugin-xineliboutput (= ${binary:Version}), libxine1-xvdr (= ${binary:Version}), libxine1-console +Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-plugin-xineliboutput (= ${binary:Version}), libxine1-xvdr (= ${binary:Version}), libxine2 Description: Local framebuffer frontend for the xineliboutput plugin The xineliboutput vdr plugin requires this library to provide the built-in local frontend for framebuffer devices. Package: libxineliboutput-sxfe Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-plugin-xineliboutput (= ${binary:Version}), libxine1-xvdr (= ${binary:Version}), libxine1-x, dbus +Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-plugin-xineliboutput (= ${binary:Version}), libxine1-xvdr (= ${binary:Version}), libxine2, dbus Description: Local X-Server frontend for the xineliboutput plugin The xineliboutput vdr plugin requires this library to provide the built-in local frontend for X, Xv or XvMC window systems. Package: xineliboutput-fbfe Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libxine1-xvdr (= ${binary:Version}), libxine1-console +Depends: ${shlibs:Depends}, ${misc:Depends}, libxine1-xvdr (= ${binary:Version}), libxine2 Description: Remote Framebuffer frontend for vdr-plugin-xineliboutput This frambuffer remote frontend plays back streams provided by vdr-plugin-xineliboutput. Package: xineliboutput-sxfe Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libxine1-xvdr (= ${binary:Version}), libxine1-x, dbus +Depends: ${shlibs:Depends}, ${misc:Depends}, libxine1-xvdr (= ${binary:Version}), libxine2, dbus Description: Remote X-Server frontend for vdr-plugin-xineliboutput This X/Xv/XvMc remote frontend plays back streams provided by vdr-plugin-xineliboutput. Package: libxine1-xvdr Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${xine:Depends}, libxine1-ffmpeg +Depends: ${shlibs:Depends}, ${misc:Depends}, libxine2 Replaces: libxine-xvdr (<< 1.0.0~rc2-5) Provides: libxine-xvdr Conflicts: libxine-xvdr (<< 1.0.0~rc2-5) diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/get-vcs-snapshot.sh vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/get-vcs-snapshot.sh --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/get-vcs-snapshot.sh 2011-12-11 16:26:49.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/get-vcs-snapshot.sh 2011-08-21 02:48:47.000000000 +0000 @@ -5,5 +5,4 @@ cvs -z3 -d:pserver:anonymous@xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput export -DNOW vdr-xineliboutput tar cvfz "../vdr-plugin-xineliboutput_$VERSION_ID.orig.tar.gz" vdr-xineliboutput rm -rf vdr-xineliboutput -git-import-orig --pristine-tar "../vdr-plugin-xineliboutput_$VERSION_ID.orig.tar.gz" dch -v "$VERSION_ID-1" "New Upstream Snapshot" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/series vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/series --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/series 2013-03-04 11:26:56.000000000 +0000 @@ -0,0 +1,3 @@ +xineliboutput-dfatmo-switch +yaepghd + diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/xineliboutput-dfatmo-switch vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/xineliboutput-dfatmo-switch --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/xineliboutput-dfatmo-switch 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/xineliboutput-dfatmo-switch 2011-12-18 16:27:07.000000000 +0000 @@ -0,0 +1,96 @@ +--- vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100.orig/xine_frontend.c ++++ vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100/xine_frontend.c +@@ -1424,6 +1424,41 @@ static int fe_send_event(frontend_t *thi + } else if (!strcmp(data, "POWER_OFF")) { + shutdown_system(this->shutdown_cmd, 1); + ++ } else if (!strncasecmp(data, "DFATMOENABLED", 13)) { ++ if (this->postplugins) { ++ int i; ++ for (i = 0; i < this->postplugins->post_video_elements_num; ++i) { ++ post_element_t *pve = this->postplugins->post_video_elements[i]; ++ if (pve->enable && (!strcmp(pve->name, "dfatmo") || !strcmp(pve->name, "atmo"))) { ++ xine_post_in_t *input_api = (xine_post_in_t *) xine_post_input(pve->post, "parameters"); ++ if (input_api) { ++ xine_post_api_t *post_api = (xine_post_api_t *) input_api->data; ++ xine_post_api_descr_t *api_descr = post_api->get_param_descr(); ++ xine_post_api_parameter_t *parm = api_descr->parameter; ++ while(parm->type != POST_PARAM_TYPE_LAST) { ++ if (!strcmp(parm->name, "enabled")) { ++ uint8_t *param_data = malloc(api_descr->struct_size); ++ if (param_data) { ++ post_api->get_parameters(pve->post, param_data); ++ int *enabled = (int *)(param_data + parm->offset); ++ char *p = strpbrk(data + 13, "01"); ++ if (p) ++ *enabled = (atoi(p)) ? 1: 0; ++ else ++ *enabled = (*enabled) ? 0: 1; ++ post_api->set_parameters(pve->post, param_data); ++ free(param_data); ++ } ++ break; ++ } ++ parm++; ++ } ++ } ++ break; ++ } ++ } ++ } ++ + } else { + + LOGDBG("Event: %s", data); +--- vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100.orig/xine_frontend_main.c ++++ vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100/xine_frontend_main.c +@@ -428,9 +428,11 @@ int main(int argc, char *argv[]) + " mapping keyboard f,F -> fullscreen toggle\n" + " keyboard d,D -> deinterlace toggle\n" + " keyboard p,P -> power off\n" ++ " keyboard a,A -> DFAtmo enabled toggle\n" + " LIRC Deinterlace -> deinterlace toggle\n" + " LIRC Fullscreen -> fullscreen toggle\n" + " LIRC PowerOff -> power off\n" ++ " LIRC KEY_BRIGHTNESS_CYCLE -> DFAtmo enabled toggle\n" + " LIRC Quit -> exit\n"); + break; + case 'b': nokbd = daemon_mode = 1; +--- vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100.orig/xine_frontend_kbd.c ++++ vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100/xine_frontend_kbd.c +@@ -215,6 +215,10 @@ static void *kbd_receiver_thread(void *f + fe->send_event(fe, "TOGGLE_DEINTERLACE"); + continue; + } ++ if (code == 'a' || code == 'A') { ++ fe->send_event(fe, "DFATMOENABLED"); ++ continue; ++ } + } + + snprintf(str, sizeof(str), "%016" PRIX64, code); +@@ -288,6 +292,10 @@ static void *slave_receiver_thread(void + fe->send_input_event(fe, NULL, str+5, 0, 0); + continue; + } ++ if (!strncasecmp(str, "DFATMOENABLED", 13)) { ++ fe->send_event(fe, str); ++ continue; ++ } + + LOGMSG("Unknown slave mode command: %s", str); + +--- vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100.orig/xine_frontend_lirc.c ++++ vdr-plugin-xineliboutput-1.0.7+cvs20111129.2100/xine_frontend_lirc.c +@@ -229,6 +229,11 @@ static void *lirc_receiver_thread(void * + fe->send_event(fe, "TOGGLE_DEINTERLACE"); + continue; + } ++ if (!strcmp(KeyName, "KEY_BRIGHTNESS_CYCLE")) { ++ if (!repeat) ++ fe->send_event(fe, "DFATMOENABLED"); ++ continue; ++ } + } + + alarm(3); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/yaepghd vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/yaepghd --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/patches/yaepghd 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/patches/yaepghd 2011-12-18 17:02:05.000000000 +0000 @@ -0,0 +1,17 @@ +Index: vdr-plugin-xineliboutput_1.0.7+cvs20111217.2347/osd.c +=================================================================== +--- vdr-plugin-xineliboutput_1.0.7+cvs20111217.2347.orig/osd.c 2011-12-18 17:58:32.506780226 +0100 ++++ vdr-plugin-xineliboutput_1.0.7+cvs20111217.2347/osd.c 2011-12-18 18:01:11.000000000 +0100 +@@ -526,10 +526,10 @@ + if(!m_IsVisible) + return; + +-#ifdef YAEPGHDVERSNUM ++ + if (vidWin.bpp) + CmdVideoWindow(vidWin.x1, vidWin.y1, vidWin.Width(), vidWin.Height()); +-#endif ++ + + #if VDRVERSNUM >= 10717 + if (IsTrueColor()) { diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/rules vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/rules --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/debian/rules 2011-12-11 16:26:49.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/debian/rules 2011-08-21 02:48:47.000000000 +0000 @@ -23,7 +23,7 @@ override_dh_gencontrol: sh /usr/share/vdr-dev/dependencies.sh - dpkg -p libxine-dev | sed -re '/^Version:/! d; s/^Version: (([0-9]:)?([0-9]+\.){2}[0-9]+).*$$/xine:Depends=libxine1 (>= \1)/' \ + dpkg -p libxine-dev | sed -re '/^Version:/! d; s/^Version: (([0-9]+\.){2}[0-9]+).*$$/xine:Depends=libxine1 (>= \1)/' \ >> debian/libxine1-xvdr.substvars dh_gencontrol diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/device.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/device.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/device.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/device.c 2012-12-09 21:37:53.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.116 2011/11/13 08:49:34 phintuka Exp $ + * $Id: device.c,v 1.122 2012/12/09 21:37:53 rofafor Exp $ * */ @@ -77,7 +77,11 @@ }; protected: +#if VDRVERSNUM < 10726 virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); +#else + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); +#endif virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); @@ -112,7 +116,11 @@ }; void cXinelibStatusMonitor::ChannelSwitch(const cDevice *Device, +#if VDRVERSNUM < 10726 int ChannelNumber) +#else + int ChannelNumber, bool LiveView) +#endif { TRACEF("cXinelibStatusMonitor::ChannelSwitch"); TRACK_TIME(200); @@ -192,13 +200,8 @@ m_OriginalPrimaryDevice = 0; m_ForcePrimaryDeviceCnt = 0; - if(*xc.local_frontend && strncmp(xc.local_frontend, "none", 4)) - m_clients.Add(m_local = new cXinelibLocal(xc.local_frontend)); - if(xc.remote_mode && xc.listen_port>0) - m_clients.Add(m_server = new cXinelibServer(xc.listen_port)); - memset(m_MetaInfo, 0, sizeof(m_MetaInfo)); - + m_PlayMode = pmNone; m_AudioChannel = 0; @@ -234,6 +237,23 @@ ts_state_dispose(m_tssVideoSize); } +bool cXinelibDevice::InitDevice() +{ + TRACEF("cXinelibDevice::InitDevice"); + + if (m_local || m_server) { + LOGMSG("cXinelibDevice::InitDevice() called twice"); + return false; + } + + if (*xc.local_frontend && strncmp(xc.local_frontend, "none", 4)) + m_clients.Add(m_local = new cXinelibLocal(this, xc.local_frontend)); + if (xc.remote_mode && xc.listen_port > 0) + m_clients.Add(m_server = new cXinelibServer(this, xc.listen_port)); + + return true; +} + bool cXinelibDevice::StartDevice() { TRACEF("cXinelibDevice::StartDevice"); @@ -475,8 +495,7 @@ void cXinelibDevice::ConfigureWindow(int fullscreen, int width, int height, int modeswitch, const char *modeline, - int aspect, int scale_video, - int field_order) + int aspect, int scale_video) { TRACEF("cXinelibDevice::ConfigureWindow"); @@ -492,10 +511,10 @@ if(m_local) m_local->ConfigureWindow(fullscreen, width, height, modeswitch, modeline, - aspect, scale_video, field_order); + aspect, scale_video); else if(*xc.local_frontend && strncmp(xc.local_frontend, "none", 4)) { - cXinelibThread *tmp = new cXinelibLocal(xc.local_frontend); + cXinelibThread *tmp = new cXinelibLocal(this, xc.local_frontend); tmp->Start(); m_clients.Add(m_local = tmp); @@ -512,7 +531,7 @@ ForcePrimaryDevice(true); m_local->ConfigureWindow(fullscreen, width, height, modeswitch, modeline, - aspect, scale_video, field_order); + aspect, scale_video); } } } @@ -523,7 +542,7 @@ if(activate && port>0) { if(!m_server) { - cXinelibThread *tmp = new cXinelibServer(port); + cXinelibThread *tmp = new cXinelibServer(this, port); tmp->Start(); m_clients.Add(m_server = tmp); @@ -1140,8 +1159,11 @@ if (TsHasPayload(Data) && TsPayloadOffset(Data) < TS_SIZE) { int Pid = TsPid(Data); +#if VDRVERSNUM < 10733 if (Pid == 0 || Pid == PatPmtParser()->PmtPid()) { - +#else + if (Pid == PATPID || PatPmtParser()->IsPmtPid(Pid)) { +#endif if (m_server) m_server->SetHeader(Data, Result, Pid == 0); @@ -1415,10 +1437,12 @@ TsBufferFlush(); +#if 0 // creates empty video PES with pseudo-pts ForEach(m_clients, &cXinelibThread::Play_Mpeg2_ES, Data, 0, VIDEO_STREAM, isH264, &mand, true); +#endif ForEach(m_clients, &cXinelibThread::Flush, 60, &mand, true); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/device.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/device.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/device.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/device.h 2012-03-17 20:14:41.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.h,v 1.61 2011/03/20 21:36:31 phintuka Exp $ + * $Id: device.h,v 1.63 2012/03/17 20:14:41 phintuka Exp $ * */ @@ -59,6 +59,7 @@ // device start/stop (from cPlugin) public: + bool InitDevice(void); bool StartDevice(void); void StopDevice(void); @@ -200,7 +201,7 @@ // local mode: void ConfigureWindow(int fullscreen, int width, int height, int modeswitch, const char *modeline, - int aspect, int scale_video, int field_order); + int aspect, int scale_video); void ConfigureDecoder(int pes_buffers); // remote mode: void Listen(bool activate, int port); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/dummy_player.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/dummy_player.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/dummy_player.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/dummy_player.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -/* - * dummy_player.c: Player that does nothing (saves CPU time) - * - * See the main source file 'xineliboutput.c' for copyright information and - * how to reach the author. - * - * $Id: dummy_player.c,v 1.3 2007/10/15 00:15:07 phintuka Exp $ - * - */ - -#include - -#include "dummy_player.h" -#include "tools/timer.h" - -#define STILLPICTURE_INTERVAL (5*1000) // 5 sec - -// -// cDummyPlayerControl -// - -extern const unsigned char v_mpg_vdrlogo[]; // vdrlogo_720x576.mpg.c -extern const int v_mpg_vdrlogo_length; // vdrlogo_720x576.mpg.c -//extern const unsigned char v_mpg_nosignal[];// nosignal_720x576.mpg.c -//extern const int v_mpg_nosignal_length; // nosignal_720x576.mpg.c -//extern const unsigned char v_mpg_black[]; // black_720x576.mpg.c -//extern const int v_mpg_black_length; // black_720x576.mpg.c - -class cDummyPlayer : public cPlayer { - protected: - virtual void Activate(bool On) - { - if(On) { - TimerHandler(); - CreateTimerEvent(this, &cDummyPlayer::TimerHandler, STILLPICTURE_INTERVAL); - } else { - CancelTimerEvents(this); - } - } - bool TimerHandler(void) - { - DeviceStillPicture(v_mpg_vdrlogo, v_mpg_vdrlogo_length); - //DeviceStillPicture(v_mpg_nosignal, v_mpg_nosignal_length); - //DeviceStillPicture(v_mpg_black, v_mpg_black_length); - return true; - } - - public: - cDummyPlayer(void) {}; - virtual ~cDummyPlayer() - { - Activate(false); - Detach(); - } -}; - -// -// cDummyPlayerControl -// - -cDummyPlayer *cDummyPlayerControl::m_Player = NULL; -cMutex cDummyPlayerControl::m_Lock; - -cDummyPlayerControl::cDummyPlayerControl(void) : - cControl(OpenPlayer()) -{ - cStatus::MsgReplaying(this, "none", NULL, true); -} - -cDummyPlayerControl::~cDummyPlayerControl() -{ - cStatus::MsgReplaying(this, NULL, NULL, false); - Close(); -} - -cDummyPlayer *cDummyPlayerControl::OpenPlayer(void) -{ - m_Lock.Lock(); - if(!m_Player) - m_Player = new cDummyPlayer; - m_Lock.Unlock(); - return m_Player; -} - -void cDummyPlayerControl::Close(void) -{ - m_Lock.Lock(); - if(m_Player) - delete m_Player; - m_Player = NULL; - m_Lock.Unlock(); -} - -eOSState cDummyPlayerControl::ProcessKey(eKeys Key) -{ - if(!ISMODELESSKEY(Key) || Key == kBack || Key == kStop) { - Close(); - return osEnd; - } - return osContinue; -} - diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/dummy_player.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/dummy_player.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/dummy_player.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/dummy_player.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - * dummy_player.h: Player that does nothing (saves CPU time) - * - * See the main source file 'xineliboutput.c' for copyright information and - * how to reach the author. - * - * $Id: dummy_player.h,v 1.1 2006/06/03 09:50:54 phintuka Exp $ - * - */ - -#ifndef __DUMMY_PLAYER_H -#define __DUMMY_PLAYER_H - -#include - -class cDummyPlayer; - -class cDummyPlayerControl : public cControl -{ - private: - static cDummyPlayer *m_Player; - static cMutex m_Lock; - - static cDummyPlayer *OpenPlayer(void); - - public: - cDummyPlayerControl(void); - virtual ~cDummyPlayerControl(); - - virtual void Show(void) {}; - virtual void Hide(void) {}; - virtual eOSState ProcessKey(eKeys Key); - - static void Close(void); - static bool IsOpen(void) {return m_Player != NULL;}; -}; - -#endif //__DUMMY_PLAYER_H - diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/equalizer.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/equalizer.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/equalizer.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/equalizer.c 2012-03-18 19:17:07.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: equalizer.c,v 1.7 2011/10/30 16:54:26 phintuka Exp $ + * $Id: equalizer.c,v 1.8 2012/03/18 19:17:07 phintuka Exp $ * */ @@ -14,8 +14,9 @@ #include "device.h" #include "equalizer.h" -cEqualizer::cEqualizer() : cOsdObject() +cEqualizer::cEqualizer(cXinelibDevice *Dev) : cOsdObject() { + m_Dev = Dev; m_Values = new int[AUDIO_EQ_count]; memcpy(m_Values, xc.audio_equalizer, sizeof(xc.audio_equalizer)); m_Osd = NULL; @@ -66,14 +67,14 @@ if(m_Values[m_Current] < ADJUST_MIN) m_Values[m_Current] = ADJUST_MIN; DrawBar(m_Current,true); - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, m_Values, xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, m_Values, xc.audio_surround, xc.speaker_type); break; case kUp: m_Values[m_Current] += ADJUST_STEP; if(m_Values[m_Current] > ADJUST_MAX) m_Values[m_Current] = ADJUST_MAX; DrawBar(m_Current,true); - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, m_Values, xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, m_Values, xc.audio_surround, xc.speaker_type); break; case kLeft: if(m_Current>0) { @@ -90,7 +91,7 @@ } break; case kBack: - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); return osEnd; case kOk: memcpy(xc.audio_equalizer, m_Values, sizeof(xc.audio_equalizer)); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/equalizer.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/equalizer.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/equalizer.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/equalizer.h 2012-03-18 19:17:07.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: equalizer.h,v 1.1 2006/06/03 09:50:54 phintuka Exp $ + * $Id: equalizer.h,v 1.2 2012/03/18 19:17:07 phintuka Exp $ * */ @@ -14,16 +14,20 @@ #include #include +class cXinelibDevice; + class cEqualizer : public cOsdObject { private: + cXinelibDevice *m_Dev; + int *m_Values; int m_Current; cOsd *m_Osd; public: - cEqualizer(); + cEqualizer(cXinelibDevice *Dev); virtual ~cEqualizer(); virtual void Show(); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend.c 2012-03-19 11:57:18.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.96 2011/11/13 08:56:44 phintuka Exp $ + * $Id: frontend.c,v 1.101 2012/03/19 11:57:18 phintuka Exp $ * */ @@ -28,6 +28,7 @@ #include #include #include +#include #include "logdefs.h" #include "config.h" @@ -40,8 +41,6 @@ #include "tools/general_remote.h" #include "tools/iso639.h" -//#define LOG_CONTROL_MESSAGES -//#define XINELIBOUTPUT_LOG_KEYS #ifndef STARTUP_IMAGE_FILE # define STARTUP_IMAGE_FILE "/usr/share/vdr/xineliboutput/logo.mpv" @@ -60,13 +59,6 @@ void cXinelibThread::KeypressHandler(const char *keymap, const char *key, bool repeat, bool release) { -#ifdef XINELIBOUTPUT_LOG_KEYS - static FILE *flog = fopen("/video/keys.log","w"); - if (flog) { - fprintf(flog,"KEY %s %s %d %d\n",keymap,key,repeat,release); fflush(flog); - } -#endif - TRACE("keypress_handler: " << (keymap?keymap:"") << " " << key); // check if key exists. @@ -150,22 +142,22 @@ char *lang = map; while(*map && *map != ' ') map++; if(*map == ' ') { *map = 0; map++; }; - cXinelibDevice::Instance().SetAvailableTrack(ttSubtitle, id, id+1, iso639_1_to_iso639_2(lang) ?: *cString::sprintf("%03d", id+1)); + m_Dev->SetAvailableTrack(ttSubtitle, id, id+1, iso639_1_to_iso639_2(lang) ?: *cString::sprintf("%03d", id+1)); if (Current) CurrentTrack = id; } } if (CurrentTrack == ttXSubtitleAuto) - cXinelibDevice::Instance().EnsureSubtitleTrack(); + m_Dev->EnsureSubtitleTrack(); else if (CurrentTrack == ttXSubtitleNone) - cXinelibDevice::Instance().SetCurrentSubtitleTrack(ttNone, true); + m_Dev->SetCurrentSubtitleTrack(ttNone, true); else - cXinelibDevice::Instance().SetCurrentSubtitleTrack(eTrackType(CurrentTrack+ttSubtitleFirst), true); + m_Dev->SetCurrentSubtitleTrack(eTrackType(CurrentTrack+ttSubtitleFirst), true); } else if(!strncmp(info, "TRACKMAP AUDIO", 14)) { map += 14; - cXinelibDevice::Instance().ClrAvailableTracks(); + m_Dev->ClrAvailableTracks(); while(*map) { bool Current = false; while(*map == ' ') map++; @@ -179,9 +171,9 @@ char *lang = map; while(*map && *map != ' ') map++; if(*map == ' ') { *map = 0; map++; }; - cXinelibDevice::Instance().SetAvailableTrack(ttDolby, id, ttDolby+id, iso639_1_to_iso639_2(lang) ?: *cString::sprintf("%03d", id+1)); + m_Dev->SetAvailableTrack(ttDolby, id, ttDolby+id, iso639_1_to_iso639_2(lang) ?: *cString::sprintf("%03d", id+1)); if(Current) - cXinelibDevice::Instance().SetCurrentAudioTrack((eTrackType)(ttDolby+id)); + m_Dev->SetCurrentAudioTrack((eTrackType)(ttDolby+id)); } } @@ -200,13 +192,13 @@ *end = 0; if(!strcmp(map, "title")) - cXinelibDevice::Instance().SetMetaInfo(miTitle, next); + m_Dev->SetMetaInfo(miTitle, next); if(!strcmp(map, "tracknumber")) - cXinelibDevice::Instance().SetMetaInfo(miTracknumber, next); + m_Dev->SetMetaInfo(miTracknumber, next); if(!strcmp(map, "album")) - cXinelibDevice::Instance().SetMetaInfo(miAlbum, next); + m_Dev->SetMetaInfo(miAlbum, next); if(!strcmp(map, "artist")) - cXinelibDevice::Instance().SetMetaInfo(miArtist, next); + m_Dev->SetMetaInfo(miArtist, next); map = end+1; } } @@ -214,21 +206,21 @@ else if(!strncmp(info, "DVDBUTTONS ", 11)) { map += 11; while(*map == ' ') map++; - cXinelibDevice::Instance().SetMetaInfo(miDvdButtons, map); + m_Dev->SetMetaInfo(miDvdButtons, map); } else if(!strncmp(info, "TITLE ", 6)) { map += 6; while(*map == ' ') map++; - cXinelibDevice::Instance().SetMetaInfo(miTitle, map); + m_Dev->SetMetaInfo(miTitle, map); } else if(!strncmp(info, "DVDTITLE ", 9)) { map += 9; while(*map == ' ') map++; - cXinelibDevice::Instance().SetMetaInfo(miDvdTitleNo, map); + m_Dev->SetMetaInfo(miDvdTitleNo, map); if (*map == '0') // DVD Menu, set spu track to 0 - cXinelibDevice::Instance().SetCurrentSubtitleTrack(ttSubtitleFirst); + m_Dev->SetCurrentSubtitleTrack(ttSubtitleFirst); } else if (!strncmp(info, "WINDOW ", 7)) { @@ -244,10 +236,12 @@ free(pmap); } -cXinelibThread::cXinelibThread(const char *Description) : cThread(Description) +cXinelibThread::cXinelibThread(cXinelibDevice *Dev, const char *Description) : cThread(Description) { TRACEF("cXinelibThread::cXinelibThread"); + m_Dev = Dev; + m_Volume = 255; m_bReady = false; m_bNoVideo = true; @@ -535,12 +529,12 @@ bool cXinelibThread::Play_Mpeg2_ES(const uchar *data, int len, int streamID, bool h264) { - static uchar hdr_vid[] = {0x00,0x00,0x01,0xe0, 0x00,0x00,0x80,0x00,0x00}; /* mpeg2 */ - static uchar hdr_pts[] = {0x00,0x00,0x01,0xe0, 0x00,0x08,0x80,0x80, - 0x05,0x00,0x00,0x00, 0x00,0x00}; /* mpeg2 */ - static uchar seq_end[] = {0x00,0x00,0x01,0xe0, 0x00,0x07,0x80,0x00, - 0x00, - 0x00,0x00,0x01,SC_SEQUENCE_END}; /* mpeg2 */ + uchar hdr_vid[] = {0x00,0x00,0x01,0xe0, 0x00,0x00,0x80,0x00,0x00}; /* mpeg2 */ + uchar hdr_pts[] = {0x00,0x00,0x01,0xe0, 0x00,0x08,0x80,0x80, + 0x05,0x00,0x00,0x00, 0x00,0x00}; /* mpeg2 */ + uchar seq_end[] = {0x00,0x00,0x01,0xe0, 0x00,0x07,0x80,0x00, + 0x00, + 0x00,0x00,0x01,SC_SEQUENCE_END}; /* mpeg2 */ int todo = len, done = 0, hdrlen = 9/*sizeof(hdr)*/; uchar *frame = new uchar[PES_CHUNK_SIZE+32]; cPoller p; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend.h 2012-03-19 11:57:18.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.h,v 1.41 2011/03/20 20:59:25 phintuka Exp $ + * $Id: frontend.h,v 1.45 2012/03/19 11:57:18 phintuka Exp $ * */ @@ -13,11 +13,12 @@ #include #include -#include // ePlayMode #include "xine_input_vdr_net.h" // eStreamId class cStatus; +class cXinelibDevice; +enum ePlayMode; //----------------------------- cXinelibThread -------------------------------- @@ -27,7 +28,7 @@ cXinelibThread(cXinelibThread&); // no copy contructor public: - cXinelibThread(const char *Description = NULL); + cXinelibThread(cXinelibDevice *Dev, const char *Description = NULL); virtual ~cXinelibThread(); // @@ -105,9 +106,9 @@ int SizeX, int SizeY) { return NULL; } // Control from frontend - static void KeypressHandler(const char *keymap, const char *key, - bool repeat, bool release); - static void InfoHandler(const char *info); + void KeypressHandler(const char *keymap, const char *key, + bool repeat, bool release); + void InfoHandler(const char *info); // // Configuration @@ -127,8 +128,7 @@ // Local frontend: virtual void ConfigureWindow(int fullscreen, int width, int height, int modeswitch, const char *modeline, - int aspect, int scale_video, - int field_order) {}; + int aspect, int scale_video) {}; virtual void ConfigureDecoder(int pes_buffers) {}; // Remote frontend server: virtual bool Listen(int port) { return false; } @@ -140,6 +140,8 @@ // protected: + cXinelibDevice *m_Dev; + bool m_bReady; bool m_bNoVideo; bool m_bLiveMode; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_local.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_local.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_local.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_local.c 2012-03-19 11:57:18.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.55 2011/03/20 20:59:25 phintuka Exp $ + * $Id: frontend_local.c,v 1.60 2012/03/19 11:57:18 phintuka Exp $ * */ @@ -21,6 +21,7 @@ #include #include #include +#include #include "logdefs.h" #include "config.h" @@ -50,21 +51,26 @@ //----------------- keyboard control handler (C callback) -------------------- extern "C" { - static void keypress_handler(const char *keymap, const char *key) + static void keypress_handler(void *handle, const char *keymap, const char *key) { - if(!strncmp("INFO ", keymap, 5)) { - - cXinelibThread::InfoHandler(keymap+5); + if (!handle) { + LOGMSG("keypress_handler(): missing handle"); + return; + } + + cXinelibThread *t = (cXinelibThread *)handle; - } else if(!xc.use_x_keyboard || !key) { + if (!strncmp("INFO ", keymap, 5)) { + t->InfoHandler(keymap+5); + + } else if (!xc.use_x_keyboard || !key) { /* Only X11 key events came this way in local mode. Keyboard is handled by vdr. */ LOGMSG("keypress_handler(%s): X11 Keyboard disabled in config", key); } else { - - cXinelibThread::KeypressHandler(keymap, key, false, false); + t->KeypressHandler(keymap, key, false, false); } } @@ -72,8 +78,8 @@ //----------------------------- cXinelibLocal -------------------------------- -cXinelibLocal::cXinelibLocal(const char *frontend_name) : - cXinelibThread("Local decoder/display (cXinelibThread)"), m_feLock(true) +cXinelibLocal::cXinelibLocal(cXinelibDevice *Dev, const char *frontend_name) : + cXinelibThread(Dev, "Local decoder/display (cXinelibThread)"), m_feLock(true) { fe = NULL; h_fe_lib = NULL; @@ -189,14 +195,13 @@ void cXinelibLocal::ConfigureWindow(int fullscreen, int width, int height, int modeswitch, const char *modeline, - int aspect, int scale_video, - int field_order) + int aspect, int scale_video) { LOCK_FE; if(fe) fe->fe_display_config(fe, -1, -1, width, height, fullscreen, modeswitch, modeline, - aspect, scale_video, field_order); + aspect, scale_video); } void cXinelibLocal::ConfigureDecoder(int pes_buffers) @@ -342,15 +347,16 @@ Cancel(-1); } else { LOGDBG("cXinelibLocal::Action - fe created"); + curr_fe->fe_message_cb = keypress_handler; + curr_fe->fe_message_h = this; if(!curr_fe->fe_display_open(curr_fe, xc.xpos, xc.ypos, xc.width, xc.height, xc.fullscreen, xc.hud_osd, xc.opengl, xc.modeswitch, xc.modeline, xc.display_aspect, - keypress_handler, 0/*no_x_kbd*/, 0/*gui_hotkeys*/, + 0/*no_x_kbd*/, 0/*gui_hotkeys*/, xc.video_port, xc.scale_video, - xc.field_order, NULL, xc.window_id)) { LOGMSG("cXinelibLocal: Error initializing display"); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_local.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_local.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_local.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_local.h 2012-03-17 20:19:27.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.h,v 1.9 2011/03/20 20:59:25 phintuka Exp $ + * $Id: frontend_local.h,v 1.11 2012/03/17 20:19:27 phintuka Exp $ * */ @@ -19,11 +19,13 @@ typedef struct frontend_s frontend_t; } +class cXinelibDevice; + class cXinelibLocal : public cXinelibThread { public: - cXinelibLocal(const char *frontend_name); + cXinelibLocal(cXinelibDevice *Dev, const char *frontend_name); virtual ~cXinelibLocal(); protected: @@ -46,7 +48,7 @@ // Configuration virtual void ConfigureWindow(int fullscreen, int width, int height, int modeswitch, const char *modeline, - int aspect, int scale_video, int field_order); + int aspect, int scale_video); virtual void ConfigureDecoder(int pes_buffers); virtual int SupportsTrueColorOSD(void); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_svr.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_svr.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_svr.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_svr.c 2012-03-18 12:22:25.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.103 2011/03/20 20:59:25 phintuka Exp $ + * $Id: frontend_svr.c,v 1.107 2012/03/18 12:22:25 phintuka Exp $ * */ @@ -28,6 +28,7 @@ #include #include #include +#include #include "logdefs.h" #include "config.h" @@ -116,8 +117,8 @@ #define DATA_NOPOLL(dt) ((dt) & (dtHttp | dtRtspMux)) #define DATA_NOCONTROL(dt) ((dt) & (dtHttp | dtRtspMux)) -cXinelibServer::cXinelibServer(int listen_port) : - cXinelibThread("Remote decoder/display server (cXinelibServer)") +cXinelibServer::cXinelibServer(cXinelibDevice *Dev, int listen_port) : + cXinelibThread(Dev, "Remote decoder/display server (cXinelibServer)") { int i; for(i=0; iRemoveRtp(); + + if (cli == m_MasterCli) + m_MasterCli = -1; } void cXinelibServer::CloseConnection(int cli) @@ -238,7 +240,7 @@ delete m_State[cli]; m_State[cli] = NULL; } - cXinelibDevice::Instance().ForcePrimaryDevice(false); + m_Dev->ForcePrimaryDevice(false); } } @@ -484,14 +486,13 @@ // in replay mode local frontend (if present) is master if(m_bLiveMode || (*xc.local_frontend && strncmp(xc.local_frontend, "none", 4))) { if(m_Scheduler->Clients()) - return m_Scheduler->Poll(TimeoutMs, m_Master = false); + return m_Scheduler->Poll(TimeoutMs, false); return DEFAULT_POLL_SIZE; } // replay mode: do { Lock(); - m_Master = true; int Free = 0xfffff, FreeHttp = 0xfffff, FreeUdp = 0; int Clients = 0, Http = 0, Udp = 0; for(int i=0; iPut(sidVdr, 0, m_Header, m_HeaderLength); /* not anymore control connection, so dec primary device reference counter */ - cXinelibDevice::Instance().ForcePrimaryDevice(false); + m_Dev->ForcePrimaryDevice(false); } void cXinelibServer::Handle_Control_RTP(int cli, const char *arg) @@ -1198,7 +1199,7 @@ if(m_bPlayingFile && *m_FileName) { Unlock(); - int pos = cXinelibDevice::Instance().PlayFileCtrl("GETPOS"); + int pos = m_Dev->PlayFileCtrl("GETPOS"); Lock(); if(m_bPlayingFile && *m_FileName) { fd_control[cli].printf("PLAYFILE %d %s %s\r\n", @@ -1782,7 +1783,7 @@ fd_control[cli].set_handle(fd); fd_control[cli].set_buffers(KILOBYTE(128), KILOBYTE(128)); - if (!cXinelibDevice::Instance().ForcePrimaryDevice(true)) { + if (!m_Dev->ForcePrimaryDevice(true)) { const char *msg = "Not primary device.\r\n"; ssize_t len = strlen(msg); LOGMSG("Dropping client: xineliboutput is not the primary device !"); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_svr.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_svr.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/frontend_svr.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/frontend_svr.h 2012-03-17 20:19:27.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.h,v 1.30 2011/03/20 20:59:25 phintuka Exp $ + * $Id: frontend_svr.h,v 1.32 2012/03/17 20:19:27 phintuka Exp $ * */ @@ -24,6 +24,7 @@ class cStcFuture; class cCmdFutures; class cConnState; +class cXinelibDevice; #include "tools/cxsocket.h" @@ -31,7 +32,7 @@ { public: - cXinelibServer(int listen_port); + cXinelibServer(cXinelibDevice *Dev, int listen_port); virtual ~cXinelibServer(); protected: @@ -126,7 +127,6 @@ cBackgroundWriterI *m_Writer[MAXCLIENTS]; // buffered output (pipe/tcp/http) cConnState *m_State[MAXCLIENTS]; // connection state (http/rtsp) cUdpScheduler *m_Scheduler; - bool m_Master; // Storage for return values of pending RPCs cStcFuture *m_StcFuture; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/media_player.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/media_player.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/media_player.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/media_player.c 2012-08-29 19:25:14.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.c,v 1.89 2011/06/15 20:25:16 phintuka Exp $ + * $Id: media_player.c,v 1.94 2012/08/29 19:25:14 phintuka Exp $ * */ @@ -207,7 +207,8 @@ *Playlist().Current()->Tracknumber ?: "-", tr ?: "-", *Playlist().Current()->Title ?: "-", ti ?: "-"); - m_Playlist.Current()->Title = ti; + if (ti && ti[0]) + m_Playlist.Current()->Title = ti; if (tr && tr[0]) m_Playlist.Current()->Tracknumber = tr; if (al && al[0]) @@ -248,8 +249,11 @@ if(m_Playlist.Count() == 1 && !strcmp("cdda:/", m_Playlist.First()->Filename)) { int count = m_Dev->PlayFileCtrl("GETAUTOPLAYSIZE CD", 10000); if(count>0) { - for(int i=0; iTitle = cString::sprintf("Track %d", i + 1); + m_Playlist.Last()->Tracknumber = cString::sprintf("%d/%d", i + 1, count); + } m_Playlist.Del(m_Playlist.First()); } } @@ -318,6 +322,7 @@ protected: + cXinelibDevice *m_Dev; cPlaylist& m_Playlist; bool m_NeedsUpdate; bool& m_RandomPlay; @@ -325,7 +330,7 @@ public: - cPlaylistMenu(cPlaylist &Playlist, bool& RandomPlay); + cPlaylistMenu(cXinelibDevice *Dev, cPlaylist &Playlist, bool& RandomPlay); virtual ~cPlaylistMenu(); void Set(bool setCurrentPlaying = false); @@ -339,12 +344,13 @@ virtual void PlaylistChanged(const cPlaylistItem *item); }; -cPlaylistMenu::cPlaylistMenu(cPlaylist &Playlist, bool& RandomPlay) : +cPlaylistMenu::cPlaylistMenu(cXinelibDevice *Dev, cPlaylist &Playlist, bool& RandomPlay) : cOsdMenu(tr("Playlist")), m_Playlist(Playlist), m_RandomPlay(RandomPlay), m_IC("UTF-8", cCharSetConv::SystemCharacterTable()) { + m_Dev = Dev; m_Marked = -1; SetTitle(cString::sprintf("%s: %s", tr("Playlist"), m_IC.Convert(*Playlist.Name()))); Playlist.Listen(this); @@ -396,7 +402,7 @@ SetHelpButtons(); return osContinue; case kGreen: - return AddSubMenu(cMenuXinelib::CreateMenuBrowseFiles(ShowMusic)); + return AddSubMenu(cMenuXinelib::CreateMenuBrowseFiles(m_Dev, ShowMusic)); case kYellow: if(m_Playlist.Count() > 1) { eOSState result = osContinue; cPlaylistItem *i = m_Playlist.Current(); @@ -485,11 +491,13 @@ private: static cMutex m_Lock; - static cXinelibPlayer *OpenPlayer(const char *File, bool Queue = false, const char *SubFile = NULL); + static cXinelibPlayer *OpenPlayer(cXinelibDevice *Dev, const char *File, bool Queue = false, const char *SubFile = NULL); protected: static cXinelibPlayer *m_Player; + cXinelibDevice *m_Dev; + cSkinDisplayReplay *m_DisplayReplay; cPlaylistMenu *m_PlaylistMenu; @@ -508,7 +516,7 @@ void MsgReplaying(const char *Title, const char *File); public: - cXinelibPlayerControl(eMainMenuMode Mode, const char *File, const char *SubFile = NULL); + cXinelibPlayerControl(cXinelibDevice *Dev, eMainMenuMode Mode, const char *File, const char *SubFile = NULL); virtual ~cXinelibPlayerControl(); virtual void Show(void); @@ -518,15 +526,16 @@ static void Close(void); static bool IsOpen(void) { return m_Player != NULL; }; - static void Queue(const char *File); + static void Queue(cXinelibDevice *Dev, const char *File); }; cXinelibPlayer *cXinelibPlayerControl::m_Player = NULL; cMutex cXinelibPlayerControl::m_Lock; -cXinelibPlayerControl::cXinelibPlayerControl(eMainMenuMode Mode, const char *File, const char *SubFile) : - cControl(OpenPlayer(File, false, SubFile)) +cXinelibPlayerControl::cXinelibPlayerControl(cXinelibDevice *Dev, eMainMenuMode Mode, const char *File, const char *SubFile) : + cControl(OpenPlayer(Dev, File, false, SubFile)) { + m_Dev = Dev; m_DisplayReplay = NULL; m_PlaylistMenu = NULL; m_ShowModeOnly = true; @@ -570,7 +579,7 @@ cStatus::MsgReplaying(this, Title, File, true); } -void cXinelibPlayerControl::Queue(const char *File) +void cXinelibPlayerControl::Queue(cXinelibDevice *Dev, const char *File) { if(!File) return; @@ -580,8 +589,8 @@ LOGMSG("cXinelibPlayerControl::Queue(%s)", File); if(!m_Player) { - OpenPlayer(File, true); - cControl::Launch(new cXinelibPlayerControl(ShowMusic, NULL)); + OpenPlayer(Dev, File, true); + cControl::Launch(new cXinelibPlayerControl(Dev, ShowMusic, NULL)); } else { size_t len = strlen(File); if(len && File[len-1] == '/') @@ -599,11 +608,11 @@ } -cXinelibPlayer *cXinelibPlayerControl::OpenPlayer(const char *File, bool Queue, const char *SubFile) +cXinelibPlayer *cXinelibPlayerControl::OpenPlayer(cXinelibDevice *Dev, const char *File, bool Queue, const char *SubFile) { m_Lock.Lock(); if(!m_Player) - m_Player = new cXinelibPlayer(&(cXinelibDevice::Instance()), File, Queue, SubFile); + m_Player = new cXinelibPlayer(Dev, File, Queue, SubFile); m_Lock.Unlock(); return m_Player; } @@ -731,7 +740,7 @@ // replay menu case kRed: if(m_Player->Playlist().Count() > 1) { Hide(); - m_PlaylistMenu = new cPlaylistMenu(m_Player->Playlist(), m_RandomPlay); + m_PlaylistMenu = new cPlaylistMenu(m_Dev, m_Player->Playlist(), m_RandomPlay); m_AutoShowStart = 0; } else { m_Player->Control("SEEK 0"); break; @@ -772,7 +781,7 @@ if ( m_Mode == ShowMusic ) { switch(Key) { case kRed: Hide(); - m_PlaylistMenu = new cPlaylistMenu(m_Player->Playlist(), m_RandomPlay); + m_PlaylistMenu = new cPlaylistMenu(m_Dev, m_Player->Playlist(), m_RandomPlay); m_AutoShowStart = 0; break; case kNext: @@ -970,8 +979,8 @@ void CloseDvdMenu(void); public: - cXinelibDvdPlayerControl(const char *File) : - cXinelibPlayerControl(ShowFiles, File), m_DvdMenu(NULL) + cXinelibDvdPlayerControl(cXinelibDevice *Dev, const char *File) : + cXinelibPlayerControl(Dev, ShowFiles, File), m_DvdMenu(NULL) {} virtual ~cXinelibDvdPlayerControl(); @@ -1231,7 +1240,7 @@ void CloseBdMenu(void); public: - cXinelibBdPlayerControl(const char *File); + cXinelibBdPlayerControl(cXinelibDevice *Dev, const char *File); virtual ~cXinelibBdPlayerControl(); virtual void Show(void); @@ -1239,8 +1248,8 @@ virtual eOSState ProcessKey(eKeys Key); }; -cXinelibBdPlayerControl::cXinelibBdPlayerControl(const char *File) : - cXinelibPlayerControl(ShowFiles, File), m_BdMenu(NULL) +cXinelibBdPlayerControl::cXinelibBdPlayerControl(cXinelibDevice *Dev, const char *File) : + cXinelibPlayerControl(Dev, ShowFiles, File), m_BdMenu(NULL) { } @@ -1521,14 +1530,14 @@ int m_LastShowTime; bool m_ShowModeOnly; - static cXinelibImagePlayer *OpenPlayer(const char *File); + static cXinelibImagePlayer *OpenPlayer(cXinelibDevice *Dev, const char *File); protected: void Seek(int Rel); void Delete(void); public: - cXinelibImagesControl(cPlaylist *Playlist); + cXinelibImagesControl(cXinelibDevice *Dev, cPlaylist *Playlist); virtual ~cXinelibImagesControl(); virtual void Show(void); @@ -1544,8 +1553,8 @@ cXinelibImagePlayer *cXinelibImagesControl::m_Player = NULL; cMutex cXinelibImagesControl::m_Lock; -cXinelibImagesControl::cXinelibImagesControl(cPlaylist *Playlist) : - cControl(OpenPlayer(Playlist->Current()->Filename)) +cXinelibImagesControl::cXinelibImagesControl(cXinelibDevice *Dev, cPlaylist *Playlist) : + cControl(OpenPlayer(Dev, Playlist->Current()->Filename)) { m_DisplayReplay = NULL; m_Playlist = Playlist; @@ -1567,11 +1576,11 @@ delete m_Playlist; } -cXinelibImagePlayer *cXinelibImagesControl::OpenPlayer(const char *File) +cXinelibImagePlayer *cXinelibImagesControl::OpenPlayer(cXinelibDevice *Dev, const char *File) { m_Lock.Lock(); if(!m_Player) - m_Player = new cXinelibImagePlayer(&(cXinelibDevice::Instance()), File); + m_Player = new cXinelibImagePlayer(Dev, File); m_Lock.Unlock(); return m_Player; } @@ -1587,6 +1596,11 @@ void cXinelibImagesControl::Delete(void) { + if (!xc.media_enable_delete) { + LOGMSG("Deleting files disabled in config"); + return; + } + if(Interface->Confirm(tr("Delete image ?"))) { if(!unlink(m_Playlist->Current()->Filename)) { m_Playlist->Del(m_Playlist->Current()); @@ -1731,7 +1745,7 @@ { if (PlayMode == pmVideoOnly) { - return new cXinelibImagesControl(Playlist); + return new cXinelibImagesControl(Dev, Playlist); } LOGMSG("cPlayerFactory::Create(cPlaylist*) not implemented for PlayMode %d !", @@ -1749,25 +1763,25 @@ // Special mrls if (!strncmp(Mrl, "dvd:/", 5)) - return new cXinelibDvdPlayerControl(Mrl); + return new cXinelibDvdPlayerControl(Dev, Mrl); if (!strncmp(Mrl, "bluray:/", 8)) - return new cXinelibBdPlayerControl(Mrl); + return new cXinelibBdPlayerControl(Dev, Mrl); if (!strncmp(Mrl, "bd:/", 4)) - return new cXinelibBdPlayerControl(Mrl); + return new cXinelibBdPlayerControl(Dev, Mrl); if (!strncmp(Mrl, "cdda:/", 6)) - return new cXinelibPlayerControl(ShowMusic, Mrl); + return new cXinelibPlayerControl(Dev, ShowMusic, Mrl); if (xc.IsDvdImage(Mrl)) - return new cXinelibDvdPlayerControl(Mrl); + return new cXinelibDvdPlayerControl(Dev, Mrl); // Playmode if (PlayMode == pmAudioOnly) - return new cXinelibPlayerControl(ShowMusic, Mrl); + return new cXinelibPlayerControl(Dev, ShowMusic, Mrl); if (PlayMode == pmAudioVideo) - return new cXinelibPlayerControl(ShowFiles, Mrl, SubFile); + return new cXinelibPlayerControl(Dev, ShowFiles, Mrl, SubFile); if (PlayMode == pmVideoOnly) { - return new cXinelibImagesControl(CreatePlaylist(Mrl)); + return new cXinelibImagesControl(Dev, CreatePlaylist(Mrl)); } // guess from playlist content @@ -1779,35 +1793,35 @@ return NULL; if (xc.IsAudioFile(Playlist.First()->Filename)) - return new cXinelibPlayerControl(ShowMusic, Mrl); + return new cXinelibPlayerControl(Dev, ShowMusic, Mrl); if (xc.IsImageFile(Playlist.First()->Filename)) { - return new cXinelibImagesControl(CreatePlaylist(Mrl)); + return new cXinelibImagesControl(Dev, CreatePlaylist(Mrl)); } - return new cXinelibPlayerControl(ShowFiles, Mrl); + return new cXinelibPlayerControl(Dev, ShowFiles, Mrl); } // guess from file type if (xc.IsAudioFile(Mrl)) - return new cXinelibPlayerControl(ShowMusic, Mrl); + return new cXinelibPlayerControl(Dev, ShowMusic, Mrl); if (xc.IsVideoFile(Mrl)) - return new cXinelibPlayerControl(ShowFiles, Mrl, SubFile); + return new cXinelibPlayerControl(Dev, ShowFiles, Mrl, SubFile); if (xc.IsImageFile(Mrl)) { - return new cXinelibImagesControl(CreatePlaylist(Mrl)); + return new cXinelibImagesControl(Dev, CreatePlaylist(Mrl)); } // default - return new cXinelibPlayerControl(ShowFiles, Mrl, SubFile); + return new cXinelibPlayerControl(Dev, ShowFiles, Mrl, SubFile); } -void cPlayerFactory::Queue(const char *Mrl) +void cPlayerFactory::Queue(cXinelibDevice *Dev, const char *Mrl) { - cXinelibPlayerControl::Queue(Mrl); + cXinelibPlayerControl::Queue(Dev, Mrl); } bool cPlayerFactory::IsOpen(void) @@ -1815,12 +1829,12 @@ return cXinelibPlayerControl::IsOpen(); } -bool cPlayerFactory::Launch(ePlayMode PlayMode, +bool cPlayerFactory::Launch(cXinelibDevice *Dev, + ePlayMode PlayMode, const char *Mrl, const char *SubFile, bool BackToMenu) { - cXinelibDevice *Dev = &(cXinelibDevice::Instance()); cControl *Control = CreateControl(Dev, PlayMode, Mrl, SubFile, BackToMenu); if (!Control) { @@ -1834,11 +1848,11 @@ return true; } -bool cPlayerFactory::Launch(ePlayMode PlayMode, +bool cPlayerFactory::Launch(cXinelibDevice *Dev, + ePlayMode PlayMode, cPlaylist *Playlist, bool BackToMenu) { - cXinelibDevice *Dev = &(cXinelibDevice::Instance()); cControl *Control = CreateControl(Dev, PlayMode, Playlist, BackToMenu); if (!Control) { diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/media_player.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/media_player.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/media_player.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/media_player.h 2012-03-19 11:07:52.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.h,v 1.23 2010/12/19 14:46:24 phintuka Exp $ + * $Id: media_player.h,v 1.24 2012/03/19 11:07:52 phintuka Exp $ * */ @@ -12,6 +12,7 @@ #define __XINELIB_PLAYER_H class cPlaylist; +class cXinelibDevice; class cPlayerFactory { @@ -20,14 +21,14 @@ // interact with current player static bool IsOpen(void); - static void Queue (const char *Mrl); + static void Queue (cXinelibDevice *Dev, const char *Mrl); // launch new media player - static bool Launch(const char *Mrl, const char *SubFile = NULL) { return Launch(pmNone, Mrl, SubFile); }; + static bool Launch(cXinelibDevice *Dev, const char *Mrl, const char *SubFile = NULL) { return Launch(Dev, pmNone, Mrl, SubFile); }; - static bool Launch(ePlayMode PlayMode, const char *Mrl, const char *SubFile = NULL, bool BackToMenu = false); - static bool Launch(ePlayMode PlayMode, cPlaylist *Playlist, bool BackToMenu = false); + static bool Launch(cXinelibDevice *Dev, ePlayMode PlayMode, const char *Mrl, const char *SubFile = NULL, bool BackToMenu = false); + static bool Launch(cXinelibDevice *Dev, ePlayMode PlayMode, cPlaylist *Playlist, bool BackToMenu = false); }; #endif // __XINELIB_PLAYER_H diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/menu.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/menu.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/menu.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/menu.c 2012-03-19 11:29:14.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.c,v 1.88 2011/07/10 21:35:22 phintuka Exp $ + * $Id: menu.c,v 1.96 2012/03/19 11:29:14 phintuka Exp $ * */ @@ -78,18 +78,21 @@ class cMenuBluray : public cOsdMenu { private: + cXinelibDevice *m_Dev; + cString m_Path; public: - cMenuBluray(const char *Path); + cMenuBluray(cXinelibDevice *Dev, const char *Path); virtual ~cMenuBluray() {}; virtual eOSState ProcessKey(eKeys Key); }; -cMenuBluray::cMenuBluray(const char *Path) : cOsdMenu("BluRay") +cMenuBluray::cMenuBluray(cXinelibDevice *Dev, const char *Path) : cOsdMenu("BluRay") { + m_Dev = Dev; m_Path = Path; Add(new cOsdItem(tr("Play movie title"), osUser1)); Add(new cOsdItem(tr("Play disc"), osUser2)); @@ -101,12 +104,12 @@ eOSState state = cOsdMenu::ProcessKey(Key); switch (state) { case osUser1: - cPlayerFactory::Launch(pmAudioVideo, + cPlayerFactory::Launch(m_Dev, pmAudioVideo, cPlaylist::BuildMrl("bluray", *m_Path), NULL, true); return osEnd; case osUser2: - cPlayerFactory::Launch(pmAudioVideo, + cPlayerFactory::Launch(m_Dev, pmAudioVideo, cPlaylist::BuildMrl("bd", *m_Path), NULL, true); return osEnd; @@ -122,6 +125,8 @@ class cMenuBrowseFiles : public cOsdMenu { protected: + cXinelibDevice *m_Dev; + const eMainMenuMode m_Mode; bool m_OnlyQueue; cString m_CurrentDir; @@ -139,7 +144,7 @@ char *GetLastDir(void); public: - cMenuBrowseFiles(eMainMenuMode mode = ShowFiles, bool OnlyQueue=false); + cMenuBrowseFiles(cXinelibDevice *Dev, eMainMenuMode mode = ShowFiles, bool OnlyQueue=false); ~cMenuBrowseFiles(); virtual eOSState ProcessKey(eKeys Key); @@ -166,13 +171,14 @@ return cString(NULL); } -cMenuBrowseFiles::cMenuBrowseFiles(eMainMenuMode mode, bool OnlyQueue) : +cMenuBrowseFiles::cMenuBrowseFiles(cXinelibDevice *Dev, eMainMenuMode mode, bool OnlyQueue) : cOsdMenu( ( mode==ShowImages ? tr("Images") : mode==ShowMusic ? (!OnlyQueue ? tr("Play music") : tr("Add to playlist")) : /*mode==ShowFiles ?*/ tr("Play file")), 2, 4), m_Mode(mode) { + m_Dev = Dev; m_OnlyQueue = OnlyQueue; m_ConfigLastDir = GetLastDir(); @@ -270,18 +276,19 @@ { bool isDir = !GetCurrent() || GetCurrent()->IsDir(); bool isFile = !isDir; + bool bDel = isFile && xc.media_enable_delete; if (isDir && !strcmp("..", GetCurrent()->Name())) { help[0] = help[1] = help[2] = help[3] = NULL; } else if (m_Mode == ShowMusic) { help[0] = isDir ? trVDR("Button$Play") : NULL; help[1] = tr ("Button$Queue"); - help[2] = isFile ? trVDR("Button$Delete") : NULL; + help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } else if (m_Mode == ShowImages) { help[0] = isDir ? trVDR("Button$Play") : NULL; help[1] = NULL; - help[2] = isFile ? trVDR("Button$Delete") : NULL; + help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } else { bool isDvd = GetCurrent() && (GetCurrent()->IsDvd() || GetCurrent()->IsBluRay()); @@ -289,7 +296,7 @@ help[0] = isDir && isDvd ? trVDR("Button$Open") : NULL; help[1] = hasResume ? trVDR("Button$Rewind") : NULL; - help[2] = isFile || isDvd ? trVDR("Button$Delete") : NULL; + help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } @@ -337,7 +344,7 @@ if (!ForceOpen && GetCurrent()->IsDvd()) { /* play dvd */ - cPlayerFactory::Launch(pmAudioVideo, + cPlayerFactory::Launch(m_Dev, pmAudioVideo, cPlaylist::BuildMrl("dvd", *m_CurrentDir, "/", GetCurrent()->Name()), NULL, true); return osEnd; @@ -345,11 +352,11 @@ if (!ForceOpen && GetCurrent()->IsBluRay()) { cString bd_path = cString::sprintf("%s/%s/", *m_CurrentDir, GetCurrent()->Name()); if (BlurayMenuSupported(bd_path)) { - AddSubMenu(new cMenuBluray(bd_path)); + AddSubMenu(new cMenuBluray(m_Dev, bd_path)); return osContinue; } /* play BluRay disc/image */ - cPlayerFactory::Launch(pmAudioVideo, + cPlayerFactory::Launch(m_Dev, pmAudioVideo, cPlaylist::BuildMrl("bluray", *m_CurrentDir, "/", GetCurrent()->Name(), "/"), NULL, true); return osEnd; @@ -368,9 +375,9 @@ if (!Queue || !cPlayerFactory::IsOpen()) cControl::Shutdown(); if (Queue) - cPlayerFactory::Queue(f); + cPlayerFactory::Queue(m_Dev, f); else - cPlayerFactory::Launch(m_Mode == ShowFiles ? pmAudioVideo : pmAudioOnly, f, NULL, true); + cPlayerFactory::Launch(m_Dev, m_Mode == ShowFiles ? pmAudioVideo : pmAudioOnly, f, NULL, true); return Queue ? osContinue : osEnd; } else { @@ -403,19 +410,19 @@ if (!Queue || !cPlayerFactory::IsOpen()) cControl::Shutdown(); if (Queue) - cPlayerFactory::Queue(f); + cPlayerFactory::Queue(m_Dev, f); if (!cPlayerFactory::IsOpen()) { if (Rewind) unlink(cString::sprintf("%s.resume", *f)); if (GetCurrent()->IsBluRay()) { - AddSubMenu(new cMenuBluray(f)); + AddSubMenu(new cMenuBluray(m_Dev, f)); return osContinue; } if (GetCurrent()->IsDvd()) - cPlayerFactory::Launch(pmAudioVideo, cPlaylist::BuildMrl("dvd", f), NULL, true); + cPlayerFactory::Launch(m_Dev, pmAudioVideo, cPlaylist::BuildMrl("dvd", f), NULL, true); else - cPlayerFactory::Launch(m_Mode == ShowFiles ? pmAudioVideo : pmAudioOnly, + cPlayerFactory::Launch(m_Dev, m_Mode == ShowFiles ? pmAudioVideo : pmAudioOnly, f, GetCurrent()->SubFile(), true); } if (Queue) @@ -429,7 +436,7 @@ if (it == Get(Current())) Playlist->SetCurrent(Playlist->Last()); } - cPlayerFactory::Launch(pmVideoOnly, Playlist, true); + cPlayerFactory::Launch(m_Dev, pmVideoOnly, Playlist, true); } return osEnd; } @@ -567,20 +574,16 @@ #include "tools/display_message.h" -extern cOsdObject *g_PendingMenuAction; - -time_t cMenuXinelib::g_LastHotkeyTime = 0; -eKeys cMenuXinelib::g_LastHotkey = kNone; - -cMenuXinelib::cMenuXinelib() +cMenuXinelib::cMenuXinelib(cXinelibDevice *Dev) { + m_Dev = Dev; compression = xc.audio_compression; autocrop = xc.autocrop; overscan = xc.overscan; hotkey_state = hkInit; - novideo = cXinelibDevice::Instance().GetPlayMode() == pmAudioOnlyBlack ? 1 : 0; + novideo = m_Dev->GetPlayMode() == pmAudioOnlyBlack ? 1 : 0; Add(SeparatorItem(tr("Media"))); if (xc.media_menu_items & MEDIA_MENU_FILES) @@ -615,9 +618,9 @@ } switch (xc.main_menu_mode) { - case ShowFiles: AddSubMenu(new cMenuBrowseFiles(ShowFiles)); break; - case ShowMusic: AddSubMenu(new cMenuBrowseFiles(ShowMusic)); break; - case ShowImages: AddSubMenu(new cMenuBrowseFiles(ShowImages)); break; + case ShowFiles: + case ShowMusic: + case ShowImages: AddSubMenu(new cMenuBrowseFiles(m_Dev, xc.main_menu_mode)); break; default: break; } @@ -627,28 +630,28 @@ cMenuXinelib::~cMenuXinelib() { if (xc.audio_compression != compression) - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - xc.audio_compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); if (xc.overscan != overscan) - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, - xc.noise_reduction, xc.contrast, xc.overscan, - xc.vo_aspect_ratio); + m_Dev->ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, + xc.noise_reduction, xc.contrast, xc.overscan, + xc.vo_aspect_ratio); if (xc.autocrop != autocrop) - cXinelibDevice::Instance().ConfigurePostprocessing("autocrop", - xc.autocrop ? true : false, - xc.AutocropOptions()); + m_Dev->ConfigurePostprocessing("autocrop", + xc.autocrop ? true : false, + xc.AutocropOptions()); - int dev_novideo = cXinelibDevice::Instance().GetPlayMode() == pmAudioOnlyBlack ? 1 : 0; + int dev_novideo = m_Dev->GetPlayMode() == pmAudioOnlyBlack ? 1 : 0; if (dev_novideo != novideo) - cXinelibDevice::Instance().SetPlayMode(novideo ? pmAudioOnlyBlack : pmNone); + m_Dev->SetPlayMode(novideo ? pmAudioOnlyBlack : pmNone); } -cOsdMenu *cMenuXinelib::CreateMenuBrowseFiles(eMainMenuMode mode, bool Queue) +cOsdMenu *cMenuXinelib::CreateMenuBrowseFiles(cXinelibDevice *Dev, eMainMenuMode mode, bool Queue) { - return new cMenuBrowseFiles(mode, true); + return new cMenuBrowseFiles(Dev, mode, true); } eOSState cMenuXinelib::ProcessKey(eKeys Key) @@ -674,26 +677,26 @@ switch (state) { case osUser1: - AddSubMenu(new cMenuBrowseFiles(ShowFiles)); + AddSubMenu(new cMenuBrowseFiles(m_Dev, ShowFiles)); return osUnknown; case osUser2: - AddSubMenu(new cMenuBrowseFiles(ShowMusic)); + AddSubMenu(new cMenuBrowseFiles(m_Dev, ShowMusic)); return osUnknown; case osUser3: - AddSubMenu(new cMenuBrowseFiles(ShowImages)); + AddSubMenu(new cMenuBrowseFiles(m_Dev, ShowImages)); return osContinue; case osUser4: - cPlayerFactory::Launch("dvd:/"); + cPlayerFactory::Launch(m_Dev, "dvd:/"); return osEnd; case osUser5: - AddSubMenu(new cMenuBluray(NULL)); + AddSubMenu(new cMenuBluray(m_Dev, NULL)); return osContinue; case osUser6: - cPlayerFactory::Launch("cdda:/"); + cPlayerFactory::Launch(m_Dev, "cdda:/"); return osEnd; case osUser7: - if (!g_PendingMenuAction) { - g_PendingMenuAction = new cEqualizer(); + if (!xc.pending_menu_action) { + xc.pending_menu_action = new cEqualizer(m_Dev); return osPlugin; } return osContinue; @@ -704,20 +707,20 @@ if (Key == kLeft || Key == kRight || ISNUMBERKEY(Key)) { if (item == audio_ctrl_compress) - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); else if (item == ctrl_overscan) - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, - xc.noise_reduction, xc.contrast, overscan, - xc.vo_aspect_ratio); + m_Dev->ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, + xc.noise_reduction, xc.contrast, overscan, + xc.vo_aspect_ratio); } if (Key == kLeft || Key == kRight) { if (item == ctrl_autocrop) - cXinelibDevice::Instance().ConfigurePostprocessing("autocrop", autocrop?true:false, - xc.AutocropOptions()); + m_Dev->ConfigurePostprocessing("autocrop", autocrop?true:false, + xc.AutocropOptions()); else if (item == ctrl_novideo) - cXinelibDevice::Instance().SetPlayMode(novideo ? pmAudioOnlyBlack : pmNone); + m_Dev->SetPlayMode(novideo ? pmAudioOnlyBlack : pmNone); } return state; @@ -735,15 +738,15 @@ eOSState NewState = osEnd; cString Message; time_t now = time(NULL); - bool OnlyInfo = ((g_LastHotkeyTime < now-3) || g_LastHotkey != Key); + bool OnlyInfo = ((xc.last_hotkey_time < now-3) || xc.last_hotkey != Key); switch (Key) { case HOTKEY_DVD: - cPlayerFactory::Launch("dvd:/"); + cPlayerFactory::Launch(m_Dev, "dvd:/"); break; case HOTKEY_DVD_TRACK1: - cPlayerFactory::Launch("dvd:/1"); + cPlayerFactory::Launch(m_Dev, "dvd:/1"); break; case HOTKEY_LOCAL_FE: @@ -778,9 +781,9 @@ if (local_frontend >= FRONTEND_count) local_frontend = 0; strn0cpy(xc.local_frontend, xc.s_frontends[local_frontend], sizeof(xc.local_frontend)); - cXinelibDevice::Instance().ConfigureWindow( + m_Dev->ConfigureWindow( xc.fullscreen, xc.width, xc.height, xc.modeswitch, xc.modeline, - xc.display_aspect, xc.scale_video, xc.field_order); + xc.display_aspect, xc.scale_video); } Message = cString::sprintf("%s %s %s", tr("Local Frontend"), OnlyInfo ? ":" : "->", @@ -792,9 +795,9 @@ /* auto, 4:3, 16:9, ... */ if (!OnlyInfo) { xc.display_aspect = (xc.display_aspect < ASPECT_count-1) ? xc.display_aspect+1 : 0; - cXinelibDevice::Instance().ConfigureWindow(xc.fullscreen, xc.width, xc.height, - xc.modeswitch, xc.modeline, xc.display_aspect, - xc.scale_video, xc.field_order); + m_Dev->ConfigureWindow(xc.fullscreen, xc.width, xc.height, + xc.modeswitch, xc.modeline, xc.display_aspect, + xc.scale_video); } Message = cString::sprintf("%s %s %s", tr("Aspect ratio"), OnlyInfo ? ":" : "->", @@ -805,9 +808,9 @@ /* auto, square, 4:3, anamorphic or DVB */ if (!OnlyInfo) { xc.vo_aspect_ratio = (xc.vo_aspect_ratio < VO_ASPECT_count-1) ? xc.vo_aspect_ratio + 1 : 0; - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, - xc.noise_reduction, xc.contrast, xc.overscan, - xc.vo_aspect_ratio); + m_Dev->ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, + xc.noise_reduction, xc.contrast, xc.overscan, + xc.vo_aspect_ratio); } Message = cString::sprintf("%s %s %s", tr("Video aspect ratio"), OnlyInfo ? ":" : "->", @@ -825,9 +828,9 @@ } else { xc.autocrop = 0; } - cXinelibDevice::Instance().ConfigurePostprocessing("autocrop", - xc.autocrop ? true : false, - xc.AutocropOptions()); + m_Dev->ConfigurePostprocessing("autocrop", + xc.autocrop ? true : false, + xc.AutocropOptions()); } Message = cString::sprintf("%s %s %s", tr("Crop letterbox 4:3 to 16:9"), @@ -845,9 +848,9 @@ strcpy(xc.deinterlace_method, "none"); else strcpy(xc.deinterlace_method, "tvtime"); - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); } Message = cString::sprintf("%s %s %s", tr("Deinterlacing"), OnlyInfo ? ":" : "->", @@ -859,8 +862,7 @@ /* off, on */ if (!OnlyInfo) { xc.audio_upmix = xc.audio_upmix ? 0 : 1; - cXinelibDevice::Instance().ConfigurePostprocessing( - "upmix", xc.audio_upmix ? true : false, NULL); + m_Dev->ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL); } Message = cString::sprintf("%s %s %s", tr("Upmix stereo to 5.1"), @@ -872,7 +874,7 @@ /* off, on */ if (!OnlyInfo) { xc.audio_surround = xc.audio_surround ? 0 : 1; - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigurePostprocessing( xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); } @@ -895,7 +897,7 @@ Message = tr("Default playlist not found"); } else { LOGDBG("Replaying default playlist: %s", *file); - cPlayerFactory::Launch(buffer); + cPlayerFactory::Launch(m_Dev, buffer); } } else { Message = tr("Default playlist is not symlink"); @@ -910,9 +912,9 @@ /* audio delay up */ if (!OnlyInfo) { xc.audio_delay++; - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - xc.audio_compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); } Message = cString::sprintf("%s %s %d %s", tr("Delay"), OnlyInfo ? ":" : "->", @@ -923,9 +925,9 @@ /* audio delay up */ if (!OnlyInfo) { xc.audio_delay--; - cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, - xc.audio_compression, xc.audio_equalizer, - xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); } Message = cString::sprintf("%s %s %d %s", tr("Delay"), OnlyInfo ? ":" : "->", @@ -938,14 +940,14 @@ } if (*Message) { - if (!g_PendingMenuAction && + if (!xc.pending_menu_action && !cRemote::HasKeys() && cRemote::CallPlugin("xineliboutput")) - g_PendingMenuAction = new cDisplayMessage(Message); + xc.pending_menu_action = new cDisplayMessage(Message); } - g_LastHotkeyTime = now; - g_LastHotkey = Key; + xc.last_hotkey_time = now; + xc.last_hotkey = Key; return NewState; } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/menu.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/menu.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/menu.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/menu.h 2012-03-19 11:29:14.000000000 +0000 @@ -4,20 +4,22 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.h,v 1.8 2010/01/19 22:45:45 phintuka Exp $ + * $Id: menu.h,v 1.11 2012/03/19 11:29:14 phintuka Exp $ * */ #ifndef __XINELIB_MENU_H #define __XINELIB_MENU_H -#include "features.h" - #include +class cXinelibDevice; + class cMenuXinelib : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + int compression; int autocrop; int overscan; @@ -25,13 +27,9 @@ // Hotkeys enum { hkInit, hkSeen, hkNone } hotkey_state; - static time_t g_LastHotkeyTime; - static eKeys g_LastHotkey; + virtual eOSState ProcessHotkey(eKeys Key); -#ifdef HAVE_XV_FIELD_ORDER - cOsdItem *video_ctrl_interlace_order; -#endif cOsdItem *audio_ctrl_compress; cOsdItem *ctrl_autocrop; @@ -42,11 +40,11 @@ virtual void Store(void); public: - cMenuXinelib(void); + cMenuXinelib(cXinelibDevice *Dev); virtual ~cMenuXinelib(); virtual eOSState ProcessKey(eKeys Key); - static cOsdMenu *CreateMenuBrowseFiles(eMainMenuMode mode, bool Queue=true); + static cOsdMenu *CreateMenuBrowseFiles(cXinelibDevice *Dev, eMainMenuMode mode, bool Queue=true); }; #endif //__XINELIB_SETUP_MENU_H diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/patches/xinelib-1.2.0_vdpau_black_frame.patch vdr-plugin-xineliboutput-1.0.7+cvs20130303/patches/xinelib-1.2.0_vdpau_black_frame.patch --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/patches/xinelib-1.2.0_vdpau_black_frame.patch 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/patches/xinelib-1.2.0_vdpau_black_frame.patch 2012-01-19 11:10:28.000000000 +0000 @@ -0,0 +1,43 @@ +diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c +--- a/src/video_out/video_out_vdpau.c ++++ b/src/video_out/video_out_vdpau.c +@@ -113,7 +113,9 @@ VdpOutputSurfaceRenderBlendState blend = + + VdpDevice vdp_device; + VdpPresentationQueue vdp_queue; ++VdpPresentationQueue prev_vdp_queue = VDP_INVALID_HANDLE; + VdpPresentationQueueTarget vdp_queue_target; ++VdpPresentationQueueTarget prev_vdp_queue_target = VDP_INVALID_HANDLE; + + VdpDeviceDestroy *vdp_device_destroy; + +@@ -2234,8 +2236,16 @@ static int vdpau_gui_data_exchange (vo_d + pthread_mutex_lock(&this->drawable_lock); /* wait for other thread which is currently displaying */ + DO_LOCKDISPLAY + this->drawable = (Drawable) data; +- vdp_queue_destroy( vdp_queue ); +- vdp_queue_target_destroy( vdp_queue_target ); ++ ++ // Do not immideatly destory queue as the window would display a black frame ++ // Patch for xineliboutput to allow opening the hud without black frame ++ if (prev_vdp_queue!=VDP_INVALID_HANDLE) { ++ vdp_queue_destroy(prev_vdp_queue); ++ vdp_queue_target_destroy(prev_vdp_queue_target); ++ } ++ prev_vdp_queue=vdp_queue; ++ prev_vdp_queue_target=vdp_queue_target; ++ + st = vdp_queue_target_create_x11( vdp_device, this->drawable, &vdp_queue_target ); + if ( st != VDP_STATUS_OK ) { + fprintf(stderr, "vo_vdpau: FATAL !! Can't recreate presentation queue target after drawable change !!\n" ); +@@ -2298,6 +2308,10 @@ static void vdpau_dispose (vo_driver_t * + + if ( vdp_queue_target != VDP_INVALID_HANDLE ) + vdp_queue_target_destroy( vdp_queue_target ); ++ if ( prev_vdp_queue != VDP_INVALID_HANDLE ) ++ vdp_queue_destroy( prev_vdp_queue ); ++ if ( prev_vdp_queue_target != VDP_INVALID_HANDLE ) ++ vdp_queue_target_destroy( prev_vdp_queue_target ); + + if ( this->video_mixer!=VDP_INVALID_HANDLE ) + vdp_video_mixer_destroy( this->video_mixer ); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/cs_CZ.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/cs_CZ.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/cs_CZ.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/cs_CZ.po 2012-03-13 12:53:42.000000000 +0000 @@ -6,40 +6,40 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:18+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2008-03-20 23:57+0100\n" "Last-Translator: Maya \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Czech\n" "X-Poedit-Country: CZECH REPUBLIC\n" msgid "custom" -msgstr "uivatelsk" +msgstr "uživatelský" msgid "tiny" -msgstr "nejmen" +msgstr "nejmenší" msgid "small" -msgstr "mal" +msgstr "malý" msgid "medium" -msgstr "stedn" +msgstr "střední" msgid "large" -msgstr "velk" +msgstr "velký" msgid "huge" -msgstr "nejvt" +msgstr "největší" msgid "automatic" msgstr "automaticky" msgid "default" -msgstr "vchoz" +msgstr "výchozí" msgid "Pan&Scan" msgstr "Pan&Scan" @@ -48,10 +48,10 @@ msgstr "" msgid "square" -msgstr "tvercov" +msgstr "čtvercový" msgid "anamorphic" -msgstr "anamorfn" +msgstr "anamorfní" msgid "DVB" msgstr "DVB" @@ -59,12 +59,6 @@ msgid "off" msgstr "vypnuto" -msgid "normal" -msgstr "normln" - -msgid "inverted" -msgstr "inverzn" - msgid "no audio" msgstr "bez zvuku" @@ -75,7 +69,7 @@ msgstr "vypnuto" msgid "Goom" -msgstr "Soutska" +msgstr "Soutěska" msgid "Oscilloscope" msgstr "Osciloskop" @@ -96,7 +90,7 @@ msgstr "Stereo 2.0" msgid "Headphones 2.0" -msgstr "Sluchtka 2.0" +msgstr "Sluchátka 2.0" msgid "Stereo 2.1" msgstr "Stereo 2.1" @@ -126,25 +120,25 @@ msgstr "Surround 7.1" msgid "Pass Through" -msgstr "Prchoz" +msgstr "Průchozí" msgid "very large" -msgstr "velmi velk" +msgstr "velmi velký" msgid "Software" -msgstr "softwarov" +msgstr "softwarové" msgid "Hardware" -msgstr "hardwarov" +msgstr "hardwarové" msgid "no" msgstr "ne" msgid "grayscale" -msgstr "odstny edi" +msgstr "odstíny šedi" msgid "transparent" -msgstr "prhledn" +msgstr "průhledný" msgid "transparent grayscale" msgstr "" @@ -183,7 +177,7 @@ msgstr "" msgid "Frontend initialization failed" -msgstr "Inicializace rozhran selhala" +msgstr "Inicializace rozhraní selhala" msgid "Server initialization failed" msgstr "Inicializace serveru selhala" @@ -192,13 +186,13 @@ msgstr "Seznam stop" msgid "Button$Random" -msgstr "Nhodn" +msgstr "Náhodné" msgid "Button$Normal" -msgstr "Normln" +msgstr "Normální" msgid "Button$Add files" -msgstr "Pidat soubory" +msgstr "Přidat soubory" msgid "Button$Remove" msgstr "Odstranit" @@ -207,13 +201,13 @@ msgstr "" msgid "Queued to playlist" -msgstr "Pidno do seznamu stop" +msgstr "Přidáno do seznamu stop" msgid "Random play" -msgstr "Nhodn pehrvn" +msgstr "Náhodné přehrávání" msgid "Normal play" -msgstr "Normln pehrvn" +msgstr "Normální přehrávání" msgid "DVD Menu" msgstr "" @@ -236,8 +230,20 @@ msgid "Close menu" msgstr "" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" -msgstr "Smazat obrzek ?" +msgstr "Smazat obrázek ?" msgid "Play movie title" msgstr "" @@ -246,104 +252,101 @@ msgstr "" msgid "Images" -msgstr "Obrzky" +msgstr "Obrázky" msgid "Play music" -msgstr "Pehrt hudbu" +msgstr "Přehrát hudbu" msgid "Add to playlist" -msgstr "Pidat do seznamu stop" +msgstr "Přidat do seznamu stop" msgid "Play file" -msgstr "Pehrt soubor" +msgstr "Přehrát soubor" msgid "Button$Queue" msgstr "Fronta" msgid "Media" -msgstr "Mdia" +msgstr "Média" msgid "View images" -msgstr "Prohlet obrzky" +msgstr "Prohlížet obrázky" msgid "Play DVD disc" -msgstr "Pehrt DVD" +msgstr "Přehrát DVD" msgid "Play BluRay disc" -msgstr "Pehrt BluRay" +msgstr "Přehrát BluRay" msgid "Play audio CD" -msgstr "Pehrt zvukov CD" +msgstr "Přehrát zvukové CD" msgid "Video settings" -msgstr "Nastaven obrazu" +msgstr "Nastavení obrazu" msgid "Play only audio" -msgstr "Pehrvat pouze zvuk" +msgstr "Přehrávat pouze zvuk" msgid "Crop letterbox 4:3 to 16:9" -msgstr "Oznout letterbox 4:3 na 16:9" +msgstr "Oříznout letterbox 4:3 na 16:9" msgid "Overscan (crop image borders)" -msgstr "Overscan (oez okraj obrazu)" +msgstr "Overscan (ořez okrajů obrazu)" msgid "Audio settings" -msgstr "Nastaven zvuku" +msgstr "Nastavení zvuku" msgid "Audio Compression" msgstr "" msgid "Audio equalizer" -msgstr "Korekce zvuku (ekvalizr)" +msgstr "Korekce zvuku (ekvalizér)" msgid "Local Frontend" -msgstr "Lokln rozhran" +msgstr "Lokální rozhraní" msgid "Aspect ratio" -msgstr "Pomr stran" +msgstr "Poměr stran" msgid "Video aspect ratio" -msgstr "Pomr stran obrazu" +msgstr "Poměr stran obrazu" msgid "On" msgstr "zapnuto" msgid "Deinterlacing" -msgstr "Odstrann prokldn" +msgstr "Odstranění prokládání" msgid "Upmix stereo to 5.1" -msgstr "Pevzorkovat stereo na 5.1" +msgstr "Převzorkovat stereo na 5.1" msgid "Downmix AC3 to surround" -msgstr "Pevzorkovat AC3 na surround" +msgstr "Převzorkovat AC3 na surround" msgid "Default playlist not found" -msgstr "Vchoz seznam stop nenalezen" +msgstr "Výchozí seznam stop nenalezen" msgid "Default playlist is not symlink" -msgstr "Vchoz seznam stop nen symbolick odkaz" +msgstr "Výchozí seznam stop není symbolický odkaz" msgid "Default playlist not defined" -msgstr "Vchoz seznam stop nen definovn" +msgstr "Výchozí seznam stop není definován" msgid "Delay" -msgstr "Zpodn" +msgstr "Zpoždění" msgid "ms" msgstr "ms" #, c-format msgid "xineliboutput: hotkey %s not binded" -msgstr "xineliboutput: hork klvesa %s nen piazena" +msgstr "xineliboutput: horká klávesa %s není přiřazena" msgid "Audio" msgstr "Zvuk" -msgid "Speakers" -msgstr "Reproduktory" - msgid "Volume control" -msgstr "Ovldn hlasitosti" +msgstr "Ovládání hlasitosti" msgid "Mix to headphones" msgstr "" @@ -352,19 +355,19 @@ msgstr "Vizualizace" msgid "Width" -msgstr "ka" +msgstr "Šířka" msgid "px" -msgstr "bod" +msgstr "bodů" msgid "Height" -msgstr "Vka" +msgstr "Výška" msgid "Speed" msgstr "Rychlost" msgid "fps" -msgstr "snmk/sek." +msgstr "snímků/sek." msgid "Background image MRL" msgstr "" @@ -397,7 +400,7 @@ msgstr "Automaticky detekovat letterbox" msgid "Crop to" -msgstr "Oznout na" +msgstr "Oříznout na" msgid "Autodetect rate" msgstr "" @@ -412,7 +415,7 @@ msgstr "" msgid "Soft start" -msgstr "Postupn zvten" +msgstr "Postupné zvětšení" msgid "Soft start step" msgstr "" @@ -433,16 +436,16 @@ msgstr "" msgid "Software scaling" -msgstr "Softwarov klovn" +msgstr "Softwarové škálování" msgid "Change aspect ratio" -msgstr "Zmna pomru stran obrazu" +msgstr "Změna poměru stran obrazu" msgid "Change video size" -msgstr "Zmnit velikost obrazu" +msgstr "Změnit velikost obrazu" msgid "Allow downscaling" -msgstr "Povolit zmenen" +msgstr "Povolit zmenšení" msgid "Post processing (ffmpeg)" msgstr "Post processing (ffmpeg)" @@ -451,22 +454,22 @@ msgstr "Kvalita" msgid "Mode" -msgstr "Md" +msgstr "Mód" msgid "Method" msgstr "Metoda" msgid "Cheap mode" -msgstr "Zjednoduen md" +msgstr "Zjednodušený mód" msgid "Pulldown" msgstr "" msgid "Frame rate" -msgstr "Snmkov rychlost" +msgstr "Snímková rychlost" msgid "Judder Correction" -msgstr "Korekce chvn" +msgstr "Korekce chvění" msgid "Use progressive frame flag" msgstr "" @@ -475,7 +478,7 @@ msgstr "" msgid "Sharpen / Blur" -msgstr "Zaosten / rozmazn" +msgstr "Zaostření / rozmazání" msgid "Width of the luma matrix" msgstr "" @@ -496,7 +499,7 @@ msgstr "" msgid "3D Denoiser" -msgstr "3D odstrann umu" +msgstr "3D odstranění šumu" msgid "Spatial luma strength" msgstr "" @@ -526,16 +529,16 @@ msgstr "" msgid "Smooth fast forward" -msgstr "Plynul peten" +msgstr "Plynulé přetáčení" msgid "Fastest trick speed" msgstr "" msgid "On-Screen Display" -msgstr "Obrazovkov menu" +msgstr "Obrazovkové menu" msgid "Hide main menu" -msgstr "Nezobrazovat v hlavnm menu" +msgstr "Nezobrazovat v hlavním menu" msgid "Resolution" msgstr "" @@ -556,37 +559,37 @@ msgstr "" msgid "Show all layers" -msgstr "Zobrazit vechny vrstvy" +msgstr "Zobrazit všechny vrstvy" msgid "Dynamic transparency correction" -msgstr "prava dynamick prhlednosti" +msgstr "Úprava dynamické průhlednosti" msgid "Static transparency correction" -msgstr "prava statick prhlednosti" +msgstr "Úprava statické průhlednosti" msgid "External subtitle size" -msgstr "Velikost externch titulk" +msgstr "Velikost externích titulků" msgid "DVB subtitle decoder" msgstr "" msgid "Decoder" -msgstr "Dekodr" +msgstr "Dekodér" msgid "Buffer size" -msgstr "Velikost vyrovnvac pamti" +msgstr "Velikost vyrovnávací paměti" msgid "Number of PES packets" -msgstr "Poet PES paket" +msgstr "Počet PES paketů" msgid "Local Display Frontend" -msgstr "Lokln zobrazovac rozhran" +msgstr "Lokální zobrazovací rozhraní" msgid "Use keyboard" -msgstr "Pouvat klvesnici" +msgstr "Používat klávesnici" msgid "Driver" -msgstr "Ovlada" +msgstr "Ovladač" msgid "Display address" msgstr "" @@ -595,31 +598,31 @@ msgstr "" msgid "Fullscreen mode" -msgstr "Celoobrazovkov reim" +msgstr "Celoobrazovkový režim" msgid "Window width" -msgstr "ka okna" +msgstr "Šířka okna" msgid "Window height" -msgstr "Vka okna" +msgstr "Výška okna" msgid "Window aspect" -msgstr "Pomr stran okna" +msgstr "Poměr stran okna" msgid "Scale to window size" -msgstr "klovat do velikosti okna" - -msgid "Interlaced Field Order" -msgstr "Poad plsnmk" +msgstr "Škálovat do velikosti okna" msgid "Port" msgstr "Port" +msgid "Speakers" +msgstr "Reproduktory" + msgid "Remote Clients" -msgstr "Vzdlen klienti" +msgstr "Vzdálení klienti" msgid "Allow remote clients" -msgstr "Povolit vzdlen klienty" +msgstr "Povolit vzdálené klienty" msgid "Listen port (TCP and broadcast)" msgstr "" @@ -652,7 +655,7 @@ msgstr "" msgid "Transmit always on" -msgstr "Penos stle zapnut" +msgstr "Přenos stále zapnut" msgid "SAP announcements" msgstr "" @@ -661,40 +664,40 @@ msgstr "" msgid "HTTP transport for media files" -msgstr "HTTP transport pro mdia" +msgstr "HTTP transport pro média" msgid "Additional network services" -msgstr "Dal sov sluby" +msgstr "Další síťové služby" msgid "HTTP server" msgstr "HTTP server" msgid "HTTP clients can control VDR" -msgstr "HTTP klienti mohou ovldat VDR" +msgstr "HTTP klienti mohou ovládat VDR" msgid "RTSP server" msgstr "RTSP server" msgid "RTSP clients can control VDR" -msgstr "RTSP klienti mohou ovldat VDR" +msgstr "RTSP klienti mohou ovládat VDR" msgid "Playlist settings" -msgstr "Nastaven seznamu stop" +msgstr "Nastavení seznamu stop" msgid "Show the track number" -msgstr "Zobrazovat slo stopy" +msgstr "Zobrazovat číslo stopy" msgid "Show the name of the artist" -msgstr "Zobrazovat jmno autora" +msgstr "Zobrazovat jméno autora" msgid "Show the name of the album" -msgstr "Zobrazovat nzev alba" +msgstr "Zobrazovat název alba" msgid "Scan for metainfo" -msgstr "Vyhledvat metainfo" +msgstr "Vyhledávat metainfo" msgid "Cache metainfo" -msgstr "Uchovvat metainfo" +msgstr "Uchovávat metainfo" msgid "Arrow keys control DVD playback" msgstr "" @@ -702,11 +705,14 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" -msgstr "Pehrva mdi" +msgstr "Přehrávač médií" msgid "Grayscale" -msgstr "Odstny edi" +msgstr "Odstíny šedi" msgid "Bitmap" msgstr "Rastr" @@ -715,37 +721,46 @@ msgstr "OSD" msgid "Test Images" -msgstr "Zkuebn obrazce" +msgstr "Zkušební obrazce" msgid "X11/xine-lib output plugin" -msgstr "X11/xine-lib vstupn plugin" +msgstr "X11/xine-lib výstupní plugin" + +#~ msgid "normal" +#~ msgstr "normální" + +#~ msgid "inverted" +#~ msgstr "inverzní" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Pořadí půlsnímků" #~ msgid "Button$Sort" -#~ msgstr "Tdn" +#~ msgstr "Třídění" #~ msgid "Play file >>" -#~ msgstr "Pehrt soubor >>" +#~ msgstr "Přehrát soubor >>" #~ msgid "Play music >>" -#~ msgstr "Pehrt hudbu >>" +#~ msgstr "Přehrát hudbu >>" #~ msgid "View images >>" -#~ msgstr "Prohlet obrzky >>" +#~ msgstr "Prohlížet obrázky >>" #~ msgid "Play DVD disc >>" -#~ msgstr "Pehrt DVD >>" +#~ msgstr "Přehrát DVD >>" #~ msgid "Play audio CD >>" -#~ msgstr "Pehrt zvukov CD >>" +#~ msgstr "Přehrát zvukové CD >>" #~ msgid "Play BluRay disc >>" -#~ msgstr "Pehrt BluRay >>" +#~ msgstr "Přehrát BluRay >>" #~ msgid "Play remote DVD >>" -#~ msgstr "Pehrt vzdlen DVD >>" +#~ msgstr "Přehrát vzdálené DVD >>" #~ msgid "Play remote CD >>" -#~ msgstr "Pehrt vzdlen CD >>" +#~ msgstr "Přehrát vzdálené CD >>" #~ msgid "Audio equalizer >>" -#~ msgstr "Korekce zvuku (ekvalizr) >>" +#~ msgstr "Korekce zvuku (ekvalizér) >>" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/de_DE.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/de_DE.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/de_DE.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/de_DE.po 2012-03-13 12:53:42.000000000 +0000 @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:18+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2007-11-23 10:17+0200\n" "Last-Translator: Udo Richter\n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "custom" @@ -29,7 +29,7 @@ msgstr "Mittel" msgid "large" -msgstr "Gro" +msgstr "Groß" msgid "huge" msgstr "Riesig" @@ -58,12 +58,6 @@ msgid "off" msgstr "Aus" -msgid "normal" -msgstr "Normal" - -msgid "inverted" -msgstr "Invertiert" - msgid "no audio" msgstr "Kein Audio" @@ -95,7 +89,7 @@ msgstr "" msgid "Headphones 2.0" -msgstr "Kopfhrer 2.0" +msgstr "Kopfhörer 2.0" msgid "Stereo 2.1" msgstr "" @@ -197,7 +191,7 @@ msgstr "Normal" msgid "Button$Add files" -msgstr "Fge Dateien hinzu" +msgstr "Füge Dateien hinzu" msgid "Button$Remove" msgstr "Entferne" @@ -206,7 +200,7 @@ msgstr "Markieren" msgid "Queued to playlist" -msgstr "Hnge an Wiedergabeliste an" +msgstr "Hänge an Wiedergabeliste an" msgid "Random play" msgstr "Zufallswiedergabe" @@ -215,28 +209,40 @@ msgstr "Normale Wiedergabe" msgid "DVD Menu" -msgstr "DVD Men" +msgstr "DVD Menü" msgid "Exit DVD menu" -msgstr "DVD Men verlassen" +msgstr "DVD Menü verlassen" msgid "DVD Root menu" -msgstr "DVD Hauptmen" +msgstr "DVD Hauptmenü" msgid "DVD Title menu" -msgstr "DVD Titelmen" +msgstr "DVD Titelmenü" msgid "DVD SPU menu" -msgstr "DVD SPU Men" +msgstr "DVD SPU Menü" msgid "DVD Audio menu" -msgstr "DVD Audiomen" +msgstr "DVD Audiomenü" msgid "Close menu" -msgstr "Men schlieen" +msgstr "Menü schließen" + +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" msgid "Delete image ?" -msgstr "Bild lschen?" +msgstr "Bild löschen?" msgid "Play movie title" msgstr "" @@ -251,7 +257,7 @@ msgstr "Musik abspielen" msgid "Add to playlist" -msgstr "Fge zur Wiedergabeliste hinzu" +msgstr "Füge zur Wiedergabeliste hinzu" msgid "Play file" msgstr "Datei abspielen" @@ -284,7 +290,7 @@ msgstr "Schneide letterbox 4:3 zu 16:9" msgid "Overscan (crop image borders)" -msgstr "Overscan (Bildrnder abschneiden)" +msgstr "Overscan (Bildränder abschneiden)" msgid "Audio settings" msgstr "Audio-Einstellungen" @@ -299,10 +305,10 @@ msgstr "Lokale Anzeige" msgid "Aspect ratio" -msgstr "Seitenverhltnis" +msgstr "Seitenverhältnis" msgid "Video aspect ratio" -msgstr "Video Seitenverhltnis" +msgstr "Video Seitenverhältnis" msgid "On" msgstr "an" @@ -326,7 +332,7 @@ msgstr "Std Wiedergabeliste nicht definiert" msgid "Delay" -msgstr "Verzgerung" +msgstr "Verzögerung" msgid "ms" msgstr "ms" @@ -338,9 +344,6 @@ msgid "Audio" msgstr "Audio" -msgid "Speakers" -msgstr "Lautsprecher" - msgid "Volume control" msgstr "" @@ -357,7 +360,7 @@ msgstr "px" msgid "Height" -msgstr "Hhe" +msgstr "Höhe" msgid "Speed" msgstr "Bildrate" @@ -447,7 +450,7 @@ msgstr "Nachbearbeitung (ffmpeg)" msgid "Quality" -msgstr "Qualitt" +msgstr "Qualität" msgid "Mode" msgstr "Modus" @@ -510,7 +513,7 @@ msgstr "Farbton" msgid "Saturation" -msgstr "Sttigung" +msgstr "Sättigung" msgid "Contrast" msgstr "Kontrast" @@ -534,7 +537,7 @@ msgstr "On-Screen Display" msgid "Hide main menu" -msgstr "Verstecke Hauptmen" +msgstr "Verstecke Hauptmenü" msgid "Resolution" msgstr "" @@ -564,7 +567,7 @@ msgstr "Statische Transparenz-Korrektur" msgid "External subtitle size" -msgstr "Untertitel gre" +msgstr "Untertitel größe" msgid "DVB subtitle decoder" msgstr "" @@ -573,7 +576,7 @@ msgstr "Dekoder" msgid "Buffer size" -msgstr "Puffergre" +msgstr "Puffergröße" msgid "Number of PES packets" msgstr "Anzahl PES-Pakete" @@ -600,20 +603,20 @@ msgstr "Fensterbreite" msgid "Window height" -msgstr "Fensterhhe" +msgstr "Fensterhöhe" msgid "Window aspect" -msgstr "Fenster-Seitenverhltnis" +msgstr "Fenster-Seitenverhältnis" msgid "Scale to window size" -msgstr "Skaliere auf Fenster-Gre" - -msgid "Interlaced Field Order" -msgstr "Interlaced Halbbild-Reihenfolge" +msgstr "Skaliere auf Fenster-Größe" msgid "Port" msgstr "Port" +msgid "Speakers" +msgstr "Lautsprecher" + msgid "Remote Clients" msgstr "Entfernte Clients" @@ -633,16 +636,16 @@ msgstr "" msgid "PIPE transport" -msgstr "Pipe-bertragung" +msgstr "Pipe-Übertragung" msgid "TCP transport" -msgstr "TCP-bertragung" +msgstr "TCP-Übertragung" msgid "UDP transport" -msgstr "UDP-bertragung" +msgstr "UDP-Übertragung" msgid "RTP (multicast) transport" -msgstr "RTP (multicast) bertragung" +msgstr "RTP (multicast) Übertragung" msgid "Address" msgstr "Multicast-Adresse" @@ -654,28 +657,28 @@ msgstr "Immer senden" msgid "SAP announcements" -msgstr "SAP-Ankndigungen" +msgstr "SAP-Ankündigungen" msgid "Server announce broadcasts" msgstr "Server-Bekanntmachung Broadcast" msgid "HTTP transport for media files" -msgstr "HTTP-Verbindung fr Medien-Dateien" +msgstr "HTTP-Verbindung für Medien-Dateien" msgid "Additional network services" -msgstr "Zustzliche Netzwerk-Services" +msgstr "Zusätzliche Netzwerk-Services" msgid "HTTP server" msgstr "HTTP-Server" msgid "HTTP clients can control VDR" -msgstr "HTTP-Clients knnen VDR kontrollieren" +msgstr "HTTP-Clients können VDR kontrollieren" msgid "RTSP server" msgstr "RTSP-Server" msgid "RTSP clients can control VDR" -msgstr "RTSP-Clients knnen VDR kontrollieren" +msgstr "RTSP-Clients können VDR kontrollieren" msgid "Playlist settings" msgstr "" @@ -701,6 +704,9 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "Medien..." @@ -719,6 +725,15 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib Ausgabe-Plugin" +#~ msgid "normal" +#~ msgstr "Normal" + +#~ msgid "inverted" +#~ msgstr "Invertiert" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Interlaced Halbbild-Reihenfolge" + #~ msgid "Button$Sort" #~ msgstr "Sortiere" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/et_EE.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/et_EE.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/et_EE.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/et_EE.po 2012-03-13 12:53:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:21+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2008-10-06 11:19+0200\n" "Last-Translator: Arthur Konovalov\n" "Language-Team: Estonian \n" @@ -58,12 +58,6 @@ msgid "off" msgstr "väljas" -msgid "normal" -msgstr "normaalne" - -msgid "inverted" -msgstr "pööratud" - msgid "no audio" msgstr "helita" @@ -235,6 +229,18 @@ msgid "Close menu" msgstr "Menüü sulgemine" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" msgstr "Kustutada pilt ?" @@ -338,9 +344,6 @@ msgid "Audio" msgstr "Heli" -msgid "Speakers" -msgstr "Kõlarid" - msgid "Volume control" msgstr "Helitugevuse juhtimine" @@ -608,12 +611,12 @@ msgid "Scale to window size" msgstr "Akna skaleeritud suurus" -msgid "Interlaced Field Order" -msgstr "Ridade järjestus" - msgid "Port" msgstr "Port" +msgid "Speakers" +msgstr "Kõlarid" + msgid "Remote Clients" msgstr "Kaugkliendid" @@ -701,6 +704,9 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "Meediapleier" @@ -719,6 +725,15 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib kuvar" +#~ msgid "normal" +#~ msgstr "normaalne" + +#~ msgid "inverted" +#~ msgstr "pööratud" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Ridade järjestus" + #~ msgid "Button$Sort" #~ msgstr "Sorteerimine" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/fi_FI.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/fi_FI.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/fi_FI.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/fi_FI.po 2012-03-13 12:53:42.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:18+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2008-10-06 11:19+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish \n" @@ -59,12 +59,6 @@ msgid "off" msgstr "ei käytössä" -msgid "normal" -msgstr "normaali" - -msgid "inverted" -msgstr "käänteinen" - msgid "no audio" msgstr "ei ääntä" @@ -236,6 +230,18 @@ msgid "Close menu" msgstr "Sulje valikko" +msgid "BluRay Top menu" +msgstr "BluRay-levyn päävalikko" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" msgstr "Poistetaanko kuva ?" @@ -339,9 +345,6 @@ msgid "Audio" msgstr "Ääni" -msgid "Speakers" -msgstr "Kaiuttimet" - msgid "Volume control" msgstr "Äänenvoimakkuuden säätö" @@ -609,12 +612,12 @@ msgid "Scale to window size" msgstr "Skaalaa ikkunan kokoiseksi" -msgid "Interlaced Field Order" -msgstr "Lomitettujen kenttien järjestys" - msgid "Port" msgstr "Portti" +msgid "Speakers" +msgstr "Kaiuttimet" + msgid "Remote Clients" msgstr "Etäkäyttö" @@ -702,6 +705,9 @@ msgid "Show hidden files" msgstr "Näytä piilotiedostot" +msgid "Allow removing files" +msgstr "Salli tiedostojen poistaminen" + msgid "Media Player" msgstr "Mediasoitin" @@ -720,6 +726,15 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib näyttölaite" +#~ msgid "normal" +#~ msgstr "normaali" + +#~ msgid "inverted" +#~ msgstr "käänteinen" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Lomitettujen kenttien järjestys" + #~ msgid "Button$Sort" #~ msgstr "Järjestä" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/it_IT.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/it_IT.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/it_IT.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/it_IT.po 2012-03-13 12:53:42.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:18+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2011-07-10 02:27+0100\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian \n" @@ -60,12 +60,6 @@ msgid "off" msgstr "spento" -msgid "normal" -msgstr "normale" - -msgid "inverted" -msgstr "invertito" - msgid "no audio" msgstr "niente audio" @@ -237,6 +231,18 @@ msgid "Close menu" msgstr "Chiudi menu" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" msgstr "Eliminare immagine ?" @@ -340,9 +346,6 @@ msgid "Audio" msgstr "Audio" -msgid "Speakers" -msgstr "Altoparlanti" - msgid "Volume control" msgstr "Controllo volume" @@ -610,12 +613,12 @@ msgid "Scale to window size" msgstr "Scala a dimensione finestra" -msgid "Interlaced Field Order" -msgstr "Ordine campo interlacciato" - msgid "Port" msgstr "Porta" +msgid "Speakers" +msgstr "Altoparlanti" + msgid "Remote Clients" msgstr "Client remoti" @@ -703,6 +706,9 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "Lettore multimediale" @@ -721,6 +727,15 @@ msgid "X11/xine-lib output plugin" msgstr "Plugin uscita X11/xine-lib" +#~ msgid "normal" +#~ msgstr "normale" + +#~ msgid "inverted" +#~ msgstr "invertito" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Ordine campo interlacciato" + #~ msgid "Button$Sort" #~ msgstr "Ordina" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/ru_RU.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/ru_RU.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/ru_RU.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/ru_RU.po 2012-03-13 12:53:42.000000000 +0000 @@ -7,38 +7,38 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:18+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2007-11-23 10:17+0200\n" "Last-Translator: Vladimir Monchenko\n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-5\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "custom" -msgstr "" +msgstr "Пользователь" msgid "tiny" -msgstr " " +msgstr "Очень маленький" msgid "small" -msgstr "" +msgstr "Маленький" msgid "medium" -msgstr "" +msgstr "Средний" msgid "large" -msgstr "" +msgstr "Большой" msgid "huge" -msgstr " " +msgstr "Очень больной" msgid "automatic" -msgstr "" +msgstr "Автоматически" msgid "default" -msgstr " " +msgstr "По умолчанию" msgid "Pan&Scan" msgstr "Pan&Scan" @@ -56,19 +56,13 @@ msgstr "" msgid "off" -msgstr "." - -msgid "normal" -msgstr "" - -msgid "inverted" -msgstr "" +msgstr "Выкл." msgid "no audio" -msgstr " " +msgstr "Нет аудио" msgid "no video" -msgstr " " +msgstr "Нет видео" msgid "Off" msgstr "" @@ -235,8 +229,20 @@ msgid "Close menu" msgstr "" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" -msgstr " ?" +msgstr "Удалить картинку ?" msgid "Play movie title" msgstr "" @@ -245,7 +251,7 @@ msgstr "" msgid "Images" -msgstr "" +msgstr "Изображения" msgid "Play music" msgstr "" @@ -254,7 +260,7 @@ msgstr "" msgid "Play file" -msgstr " " +msgstr "Проиграть файл" msgid "Button$Queue" msgstr "" @@ -263,7 +269,7 @@ msgstr "" msgid "View images" -msgstr " " +msgstr "Просмотреть изображения" msgid "Play DVD disc" msgstr "" @@ -290,13 +296,13 @@ msgstr "" msgid "Audio Compression" -msgstr " " +msgstr "Аудио компрессия" msgid "Audio equalizer" -msgstr " " +msgstr "Аудио эквалайзер" msgid "Local Frontend" -msgstr " " +msgstr "Локальный фронтенд" msgid "Aspect ratio" msgstr "" @@ -308,10 +314,10 @@ msgstr "" msgid "Deinterlacing" -msgstr "" +msgstr "Деинтерлейсинг" msgid "Upmix stereo to 5.1" -msgstr " 5.1" +msgstr "Преобразовать стерео в 5.1" msgid "Downmix AC3 to surround" msgstr "" @@ -326,7 +332,7 @@ msgstr "" msgid "Delay" -msgstr "" +msgstr "Задержка" msgid "ms" msgstr "ms" @@ -336,10 +342,7 @@ msgstr "" msgid "Audio" -msgstr "" - -msgid "Speakers" -msgstr "" +msgstr "Аудио" msgid "Volume control" msgstr "" @@ -348,13 +351,13 @@ msgstr "" msgid "Visualization" -msgstr "" +msgstr "Визуализация" msgid "Width" msgstr "" msgid "px" -msgstr "" +msgstr "пикселей" msgid "Height" msgstr "" @@ -369,7 +372,7 @@ msgstr "" msgid "Audio Equalizer" -msgstr " " +msgstr "Аудио эквалайзер" msgid "Use Video-Out Driver" msgstr "" @@ -387,7 +390,7 @@ msgstr "" msgid "Video" -msgstr "" +msgstr "Видео" msgid "Use driver crop" msgstr "" @@ -441,7 +444,7 @@ msgstr "" msgid "Allow downscaling" -msgstr " " +msgstr "Масштабировать с падением качества" msgid "Post processing (ffmpeg)" msgstr "" @@ -510,13 +513,13 @@ msgstr "HUE" msgid "Saturation" -msgstr "" +msgstr "Насыщенность" msgid "Contrast" -msgstr "" +msgstr "Контрастность" msgid "Brightness" -msgstr "" +msgstr "Яркость" msgid "Sharpness" msgstr "" @@ -531,10 +534,10 @@ msgstr "" msgid "On-Screen Display" -msgstr " " +msgstr "Экранное меню" msgid "Hide main menu" -msgstr " " +msgstr "Скрыть основное меню" msgid "Resolution" msgstr "" @@ -558,10 +561,10 @@ msgstr "" msgid "Dynamic transparency correction" -msgstr " " +msgstr "Динамическая коррекция прозрачности" msgid "Static transparency correction" -msgstr " " +msgstr "Статическая коррекция прозрачности" msgid "External subtitle size" msgstr "" @@ -570,79 +573,79 @@ msgstr "" msgid "Decoder" -msgstr "" +msgstr "Декодер" msgid "Buffer size" -msgstr " " +msgstr "Размер буфера" msgid "Number of PES packets" -msgstr "PES " +msgstr "PES пакетов" msgid "Local Display Frontend" -msgstr " " +msgstr "Фронтенд локального экрана" msgid "Use keyboard" -msgstr " " +msgstr "Использовать клавиатуру" msgid "Driver" -msgstr "" +msgstr "Драйвер" msgid "Display address" -msgstr " " +msgstr "Адрес дисплея" msgid "Framebuffer device" -msgstr "Framebuffer " +msgstr "Framebuffer устройство" msgid "Fullscreen mode" -msgstr " " +msgstr "Полноэкранный режим" msgid "Window width" -msgstr " " +msgstr "Ширина окна" msgid "Window height" -msgstr " " +msgstr "Высота окна" msgid "Window aspect" -msgstr " " +msgstr "Соотношение сторон" msgid "Scale to window size" -msgstr " " - -msgid "Interlaced Field Order" -msgstr " " +msgstr "Масштабировать в размер окна" msgid "Port" -msgstr "" +msgstr "Порт" + +msgid "Speakers" +msgstr "" msgid "Remote Clients" -msgstr " " +msgstr "Удаленные клиенты" msgid "Allow remote clients" -msgstr " " +msgstr "Разрешить удаленных клиентов" msgid "Listen port (TCP and broadcast)" -msgstr " (TCP )" +msgstr "Порт (TCP и широковешательный)" msgid "Listen address" msgstr "" msgid "Remote keyboard" -msgstr " " +msgstr "Удаленная клавиатура" msgid "Max number of clients" msgstr "" msgid "PIPE transport" -msgstr "PIPE " +msgstr "PIPE транспорт" msgid "TCP transport" -msgstr "TCP " +msgstr "TCP транспорт" msgid "UDP transport" -msgstr "UDP " +msgstr "UDP транспорт" msgid "RTP (multicast) transport" -msgstr "RTP () " +msgstr "RTP (широковещательный) транспорт" msgid "Address" msgstr "" @@ -657,7 +660,7 @@ msgstr "" msgid "Server announce broadcasts" -msgstr " " +msgstr "Сервер использует широковещание" msgid "HTTP transport for media files" msgstr "" @@ -701,32 +704,44 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "Xine-lib" msgid "Grayscale" -msgstr " " +msgstr "Оттенки серого" msgid "Bitmap" -msgstr " " +msgstr "Битовая карта" msgid "OSD" msgstr "" msgid "Test Images" -msgstr " " +msgstr "Тестовые изображения" msgid "X11/xine-lib output plugin" -msgstr "X11/xine-lib " +msgstr "X11/xine-lib видео модуль" + +#~ msgid "normal" +#~ msgstr "Нормальный" + +#~ msgid "inverted" +#~ msgstr "Инвертировано" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Черезстрочный порядок полей" #~ msgid "Play file >>" -#~ msgstr " >>" +#~ msgstr "Проиграть файл >>" #~ msgid "Play music >>" -#~ msgstr " >>" +#~ msgstr "Проиграть файл >>" #~ msgid "View images >>" -#~ msgstr " >>" +#~ msgstr "Просмотреть изображения >>" #~ msgid "Audio equalizer >>" -#~ msgstr " >>" +#~ msgstr "Аудио эквалайзер >>" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/uk_UA.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/uk_UA.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/uk_UA.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/uk_UA.po 2012-12-12 10:42:44.000000000 +0000 @@ -7,16 +7,14 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:21+0300\n" -"PO-Revision-Date: 2010-05-05 19:16+0200\n" +"POT-Creation-Date: 2012-12-12 12:39+0200\n" +"PO-Revision-Date: 2012-11-29 13:34+0100\n" "Last-Translator: Yarema aka Knedlyk \n" "Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Ukrainian\n" -"X-Poedit-Country: Ukraine\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\\n\n" msgid "custom" @@ -61,12 +59,6 @@ msgid "off" msgstr "викл" -msgid "normal" -msgstr "нормально" - -msgid "inverted" -msgstr "обернено" - msgid "no audio" msgstr "немає аудіо" @@ -89,7 +81,7 @@ msgstr "FFT Graph" msgid "Image" -msgstr "" +msgstr "Малюнок" msgid "Mono 1.0" msgstr "Моно 1.0" @@ -161,13 +153,13 @@ msgstr "білінійний" msgid "LUT8" -msgstr "" +msgstr "LUT8" msgid "TrueColor" -msgstr "" +msgstr "TrueColor" msgid "video stream" -msgstr "" +msgstr "відеопотік" msgid "none" msgstr "немає" @@ -206,7 +198,7 @@ msgstr "Видалити" msgid "Button$Mark" -msgstr "" +msgstr "Позначка" msgid "Queued to playlist" msgstr "Додано до списку програвання" @@ -238,17 +230,29 @@ msgid "Close menu" msgstr "Закрити меню" +msgid "BluRay Top menu" +msgstr "Меню BluRay" + +msgid "Toggle Pop-Up menu" +msgstr "Включити вигулькне меню" + +msgid "Next title" +msgstr "Наступний заголовок" + +msgid "Previous title" +msgstr "Попередній заголовок" + msgid "Delete image ?" msgstr "Видалити зображення?" msgid "Play movie title" -msgstr "" +msgstr "Програвати кінострічку" msgid "Play disc" -msgstr "" +msgstr "Програвати диск" msgid "Images" -msgstr "Зображення" +msgstr "Малюнки" msgid "Play music" msgstr "Програвати музику" @@ -341,9 +345,6 @@ msgid "Audio" msgstr "Аудіо" -msgid "Speakers" -msgstr "Колонки" - msgid "Volume control" msgstr "Регулятор гучності" @@ -369,7 +370,7 @@ msgstr "кадр за сек" msgid "Background image MRL" -msgstr "" +msgstr "Малюнок тла MRL" msgid "Audio Equalizer" msgstr "Аудіо еквалайзер" @@ -393,7 +394,7 @@ msgstr "Відео" msgid "Use driver crop" -msgstr "" +msgstr "Використати обрізання з драйвера" msgid "Autodetect letterbox" msgstr "Автовизначення розміру" @@ -402,37 +403,37 @@ msgstr "Обрізати до" msgid "Autodetect rate" -msgstr "" +msgstr "Автовизначення швидкості" msgid "Stabilize time" -msgstr "" +msgstr "Час стібілізації" msgid "Maximum logo width [%]" -msgstr "" +msgstr "Макс. ширина лого [%]" msgid "Overscan compensate [%1000]" -msgstr "" +msgstr "Компенсація перескану [%1000]" msgid "Soft start" msgstr "М'який старт" msgid "Soft start step" -msgstr "" +msgstr "М’який крок початку" msgid "Detect subtitles" msgstr "Визначити субтитри" msgid "Subs detect stabilize time" -msgstr "" +msgstr "Час стабілізації детектування сибтитрів" msgid "Subs detect lifetime" -msgstr "" +msgstr "Тривалість детектування сибтитрів" msgid "Use avards analysis" -msgstr "" +msgstr "Використання avards аналізу" msgid "Bar tone tolerance" -msgstr "" +msgstr "Допуск тонів поділок" msgid "Software scaling" msgstr "Програмне масштабування" @@ -543,13 +544,13 @@ msgstr "Роздільна здатність" msgid "Color depth" -msgstr "" +msgstr "Глибина кольору" msgid "Blending method" msgstr "Метод змішування" msgid "Use hardware for low-res video" -msgstr "Викор. апаратні засоби для відео з низьк. розд.зд." +msgstr "Викор. ап. засоби для відео з низьк. розд.зд." msgid "Scaling method" msgstr "Метод масштабування" @@ -611,12 +612,12 @@ msgid "Scale to window size" msgstr "Масштабувати до розміру вікна" -msgid "Interlaced Field Order" -msgstr "Порядок поля згладження" - msgid "Port" msgstr "Порт" +msgid "Speakers" +msgstr "Колонки" + msgid "Remote Clients" msgstr "Віддалені клієнти" @@ -702,7 +703,10 @@ msgstr "Клавіші зі стрілками контролюють програвання DVD" msgid "Show hidden files" -msgstr "" +msgstr "Показати приховані файли" + +msgid "Allow removing files" +msgstr "Дозволяти вилучати файли" msgid "Media Player" msgstr "Програвач медіа" @@ -722,5 +726,14 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib output плагін" +#~ msgid "normal" +#~ msgstr "нормально" + +#~ msgid "inverted" +#~ msgstr "обернено" + +#~ msgid "Interlaced Field Order" +#~ msgstr "Порядок поля згладження" + #~ msgid "Button$Sort" #~ msgstr "Сортувати" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/zh_CN.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/zh_CN.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/zh_CN.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/zh_CN.po 2012-03-13 12:53:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:21+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2009-09-21 23:32+0800\n" "Last-Translator: NanFeng \n" "Language-Team: Chinese (simplified) \n" @@ -58,12 +58,6 @@ msgid "off" msgstr "关" -msgid "normal" -msgstr "正常" - -msgid "inverted" -msgstr "反转" - msgid "no audio" msgstr "没有音频" @@ -235,6 +229,18 @@ msgid "Close menu" msgstr "" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" msgstr "是否删除图片?" @@ -338,9 +344,6 @@ msgid "Audio" msgstr "音频" -msgid "Speakers" -msgstr "喇叭" - msgid "Volume control" msgstr "音量控制" @@ -608,12 +611,12 @@ msgid "Scale to window size" msgstr "缩放到窗口大小" -msgid "Interlaced Field Order" -msgstr "隔行场令" - msgid "Port" msgstr "端口" +msgid "Speakers" +msgstr "喇叭" + msgid "Remote Clients" msgstr "远程用户" @@ -701,6 +704,9 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "媒体播放器" @@ -719,6 +725,15 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib 视频输出插件 by NFVDR-HD" +#~ msgid "normal" +#~ msgstr "正常" + +#~ msgid "inverted" +#~ msgstr "反转" + +#~ msgid "Interlaced Field Order" +#~ msgstr "隔行场令" + #~ msgid "Button$Sort" #~ msgstr "按钮$排序" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/zh_TW.po vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/zh_TW.po --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/po/zh_TW.po 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/po/zh_TW.po 2012-03-13 12:53:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Xineliboutput 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-11 16:21+0300\n" +"POT-Creation-Date: 2012-03-13 13:13+0200\n" "PO-Revision-Date: 2009-09-21 23:32+0800\n" "Last-Translator: NanFeng \n" "Language-Team: Chinese (traditional) \n" @@ -58,12 +58,6 @@ msgid "off" msgstr "關" -msgid "normal" -msgstr "正常" - -msgid "inverted" -msgstr "反轉" - msgid "no audio" msgstr "沒有音頻" @@ -235,6 +229,18 @@ msgid "Close menu" msgstr "" +msgid "BluRay Top menu" +msgstr "" + +msgid "Toggle Pop-Up menu" +msgstr "" + +msgid "Next title" +msgstr "" + +msgid "Previous title" +msgstr "" + msgid "Delete image ?" msgstr "是否刪除圖片?" @@ -338,9 +344,6 @@ msgid "Audio" msgstr "音頻" -msgid "Speakers" -msgstr "喇叭" - msgid "Volume control" msgstr "音量控制" @@ -639,12 +642,12 @@ msgid "Scale to window size" msgstr "縮放到窗口大小" -msgid "Interlaced Field Order" -msgstr "隔行場令" - msgid "Port" msgstr "端口" +msgid "Speakers" +msgstr "喇叭" + msgid "Remote Clients" msgstr "遠程用戶" @@ -746,6 +749,9 @@ msgid "Show hidden files" msgstr "" +msgid "Allow removing files" +msgstr "" + msgid "Media Player" msgstr "媒體播放器" @@ -764,6 +770,15 @@ msgid "X11/xine-lib output plugin" msgstr "X11/xine-lib視頻輸出插件by NFVDR-HD" +#~ msgid "normal" +#~ msgstr "正常" + +#~ msgid "inverted" +#~ msgstr "反轉" + +#~ msgid "Interlaced Field Order" +#~ msgstr "隔行場令" + #~ msgid "Button$Sort" #~ msgstr "按鈕$排序" diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/setup_menu.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/setup_menu.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/setup_menu.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/setup_menu.c 2012-03-19 09:53:14.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: setup_menu.c,v 1.83 2011/11/29 09:57:35 phintuka Exp $ + * $Id: setup_menu.c,v 1.88 2012/03/19 09:53:14 phintuka Exp $ * */ @@ -36,13 +36,13 @@ //--- Setup Menu ------------------------------------------------------------- -const char *ModeLineChars = +const char ModeLineChars[] = " 0123456789+-hvsync."; -const char *DriverNameChars = +const char DriverNameChars[] = " abcdefghijklmnopqrstuvwxyz0123456789-.,#~:;"; -const char *OptionsChars = +const char OptionsChars[] = "=.,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -const char *LangNameChars = +const char LangNameChars[] = "abcdefghijklmnopqrstuvwxyz"; const char *controls[] = @@ -106,6 +106,8 @@ class cMenuSetupAudio : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; int visualization; int goom_width, goom_height, goom_fps; @@ -123,14 +125,15 @@ void Set(void); public: - cMenuSetupAudio(void); + cMenuSetupAudio(cXinelibDevice *Dev); ~cMenuSetupAudio(void); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupAudio::cMenuSetupAudio(void) +cMenuSetupAudio::cMenuSetupAudio(cXinelibDevice *Dev) { + m_Dev = Dev; memcpy(&newconfig, &xc, sizeof(config_t)); visualization = strstra(xc.audio_visualization, @@ -153,14 +156,12 @@ cMenuSetupAudio::~cMenuSetupAudio(void) { - cXinelibDevice::Instance().ConfigurePostprocessing( - xc.deinterlace_method, xc.audio_delay, xc.audio_compression, - xc.audio_equalizer, xc.audio_surround, xc.speaker_type); - cXinelibDevice::Instance().ConfigurePostprocessing( - "upmix", xc.audio_upmix ? true : false, NULL); + m_Dev->ConfigurePostprocessing( + xc.deinterlace_method, xc.audio_delay, xc.audio_compression, + xc.audio_equalizer, xc.audio_surround, xc.speaker_type); + m_Dev->ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL); #ifdef ENABLE_TEST_POSTPLUGINS - cXinelibDevice::Instance().ConfigurePostprocessing( - "headphone", xc.headphone ? true : false, NULL); + m_Dev->ConfigurePostprocessing("headphone", xc.headphone ? true : false, NULL); #endif } @@ -231,19 +232,19 @@ return state; if(item == audio_ctrl_delay || item == audio_ctrl_compression) { - cXinelibDevice::Instance().ConfigurePostprocessing( - xc.deinterlace_method, newconfig.audio_delay, - newconfig.audio_compression, newconfig.audio_equalizer, - newconfig.audio_surround, newconfig.speaker_type); + m_Dev->ConfigurePostprocessing( + xc.deinterlace_method, newconfig.audio_delay, + newconfig.audio_compression, newconfig.audio_equalizer, + newconfig.audio_surround, newconfig.speaker_type); } else if(item == audio_ctrl_vis) { Set(); } else if(item == audio_ctrl_surround) { - cXinelibDevice::Instance().ConfigurePostprocessing( - xc.deinterlace_method, newconfig.audio_delay, - newconfig.audio_compression, newconfig.audio_equalizer, - newconfig.audio_surround, newconfig.speaker_type); + m_Dev->ConfigurePostprocessing( + xc.deinterlace_method, newconfig.audio_delay, + newconfig.audio_compression, newconfig.audio_equalizer, + newconfig.audio_surround, newconfig.speaker_type); if(newconfig.audio_surround && newconfig.audio_upmix) { newconfig.audio_upmix = 0; Set(); @@ -255,7 +256,7 @@ cRemote::Put(kMute); } else if(item == audio_ctrl_upmix) { - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigurePostprocessing( "upmix", newconfig.audio_upmix ? true : false, NULL); if(newconfig.audio_upmix && newconfig.audio_surround) { newconfig.audio_surround = 0; @@ -264,7 +265,7 @@ } #ifdef ENABLE_TEST_POSTPLUGINS else if(item == audio_ctrl_headphone) { - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigurePostprocessing( "headphone", newconfig.headphone ? true : false, NULL); } #endif @@ -304,6 +305,7 @@ class cMenuSetupAudioEq : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; config_t newconfig; protected: @@ -311,21 +313,22 @@ void Set(void); public: - cMenuSetupAudioEq(void); + cMenuSetupAudioEq(cXinelibDevice *Dev); ~cMenuSetupAudioEq(void); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupAudioEq::cMenuSetupAudioEq(void) +cMenuSetupAudioEq::cMenuSetupAudioEq(cXinelibDevice *Dev) { + m_Dev = Dev; memcpy(&newconfig, &xc, sizeof(config_t)); Set(); } cMenuSetupAudioEq::~cMenuSetupAudioEq(void) { - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigurePostprocessing( xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); } @@ -354,7 +357,7 @@ Key = NORMALKEY(Key); if(Key == kLeft || Key == kRight) { - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigurePostprocessing( xc.deinterlace_method, xc.audio_delay, xc.audio_compression, newconfig.audio_equalizer, xc.audio_surround, xc.speaker_type); } @@ -481,6 +484,8 @@ class cMenuSetupVideo : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; cOsdItem *ctrl_autocrop; @@ -525,14 +530,16 @@ void Set(void); public: - cMenuSetupVideo(void); + cMenuSetupVideo(cXinelibDevice *Dev); ~cMenuSetupVideo(void); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupVideo::cMenuSetupVideo(void) +cMenuSetupVideo::cMenuSetupVideo(cXinelibDevice *Dev) { + m_Dev = Dev; + memcpy(&newconfig, &xc, sizeof(config_t)); newconfig.hue = CONTROL_TO_INDEX(newconfig.hue); @@ -551,21 +558,16 @@ cMenuSetupVideo::~cMenuSetupVideo(void) { - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, - xc.brightness, xc.sharpness, - xc.noise_reduction, xc.contrast, - xc.overscan, xc.vo_aspect_ratio); - cXinelibDevice::Instance().ConfigurePostprocessing( - "autocrop", xc.autocrop ? true : false, xc.AutocropOptions()); - cXinelibDevice::Instance().ConfigurePostprocessing( - "swscale", xc.swscale ? true : false, xc.SwScaleOptions()); - cXinelibDevice::Instance().ConfigurePostprocessing( - "pp", xc.ffmpeg_pp ? true : false, xc.FfmpegPpOptions()); - cXinelibDevice::Instance().ConfigurePostprocessing( - "unsharp", xc.unsharp ? true : false, xc.UnsharpOptions()); - cXinelibDevice::Instance().ConfigurePostprocessing( - "denoise3d", xc.denoise3d ? true : false, xc.Denoise3dOptions()); - cXinelibDevice::Instance().ConfigurePostprocessing( + m_Dev->ConfigureVideo(xc.hue, xc.saturation, + xc.brightness, xc.sharpness, + xc.noise_reduction, xc.contrast, + xc.overscan, xc.vo_aspect_ratio); + m_Dev->ConfigurePostprocessing("autocrop", !!xc.autocrop, xc.AutocropOptions()); + m_Dev->ConfigurePostprocessing("swscale", !!xc.swscale, xc.SwScaleOptions()); + m_Dev->ConfigurePostprocessing("pp", !!xc.ffmpeg_pp, xc.FfmpegPpOptions()); + m_Dev->ConfigurePostprocessing("unsharp", !!xc.unsharp, xc.UnsharpOptions()); + m_Dev->ConfigurePostprocessing("denoise3d", !!xc.denoise3d, xc.Denoise3dOptions()); + m_Dev->ConfigurePostprocessing( xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); } @@ -796,21 +798,21 @@ item == ctrl_contrast || item == ctrl_brightness || item == ctrl_overscan || item == ctrl_vo_aspect_ratio) #ifdef INTEGER_CONFIG_VIDEO_CONTROLS - cXinelibDevice::Instance().ConfigureVideo(newconfig.hue, - newconfig.saturation, - newconfig.brightness, - newconfig.sharpness, - newconfig.noise_reduction, - newconfig.contrast, - newconfig.overscan, - newconfig.vo_aspect_ratio); + m_Dev->ConfigureVideo(newconfig.hue, + newconfig.saturation, + newconfig.brightness, + newconfig.sharpness, + newconfig.noise_reduction, + newconfig.contrast, + newconfig.overscan, + newconfig.vo_aspect_ratio); #else - cXinelibDevice::Instance().ConfigureVideo( - INDEX_TO_CONTROL(newconfig.hue), + m_Dev->ConfigureVideo( + INDEX_TO_CONTROL(newconfig.hue), INDEX_TO_CONTROL(newconfig.saturation), - INDEX_TO_CONTROL(newconfig.brightness), - INDEX_TO_CONTROL(newconfig.sharpness), - INDEX_TO_CONTROL(newconfig.noise_reduction), + INDEX_TO_CONTROL(newconfig.brightness), + INDEX_TO_CONTROL(newconfig.sharpness), + INDEX_TO_CONTROL(newconfig.noise_reduction), INDEX_TO_CONTROL(newconfig.contrast), newconfig.overscan, newconfig.vo_aspect_ratio); #endif @@ -829,9 +831,7 @@ || item == ctrl_autocrop_use_avards_analysis || item == ctrl_autocrop_overscan_compensate || item == ctrl_autocrop_bar_tone_tolerance) { - cXinelibDevice::Instance().ConfigurePostprocessing( - "autocrop", newconfig.autocrop ? true : false, - newconfig.AutocropOptions()); + m_Dev->ConfigurePostprocessing("autocrop", !!newconfig.autocrop, newconfig.AutocropOptions()); Set(); } else if(item == ctrl_swscale || @@ -839,27 +839,19 @@ item == ctrl_swscale_aspect || item == ctrl_swscale_width || item == ctrl_swscale_height) { - cXinelibDevice::Instance().ConfigurePostprocessing( - "swscale", newconfig.swscale ? true : false, - newconfig.SwScaleOptions()); + m_Dev->ConfigurePostprocessing("swscale", !!newconfig.swscale, newconfig.SwScaleOptions()); Set(); } else if(item == ctrl_pp) { - cXinelibDevice::Instance().ConfigurePostprocessing( - "pp", newconfig.ffmpeg_pp ? true : false, - newconfig.FfmpegPpOptions()); + m_Dev->ConfigurePostprocessing("pp", !!newconfig.ffmpeg_pp, newconfig.FfmpegPpOptions()); Set(); } else if(item == ctrl_unsharp) { - cXinelibDevice::Instance().ConfigurePostprocessing( - "unsharp", newconfig.unsharp ? true : false, - newconfig.UnsharpOptions()); + m_Dev->ConfigurePostprocessing("unsharp", !!newconfig.unsharp, newconfig.UnsharpOptions()); Set(); } else if(item == ctrl_denoise3d) { - cXinelibDevice::Instance().ConfigurePostprocessing( - "denoise3d", newconfig.denoise3d ? true : false, - newconfig.Denoise3dOptions()); + m_Dev->ConfigurePostprocessing("denoise3d", !!newconfig.denoise3d, newconfig.Denoise3dOptions()); Set(); } else if(item == ctrl_deinterlace) { @@ -953,6 +945,8 @@ class cMenuSetupOSD : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; int orig_alpha_correction; @@ -971,14 +965,15 @@ void Set(void); public: - cMenuSetupOSD(void); + cMenuSetupOSD(cXinelibDevice *Dev); ~cMenuSetupOSD(); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupOSD::cMenuSetupOSD(void) +cMenuSetupOSD::cMenuSetupOSD(cXinelibDevice *Dev) { + m_Dev = Dev; memcpy(&newconfig, &xc, sizeof(config_t)); orig_alpha_correction = xc.alpha_correction; orig_alpha_correction_abs = xc.alpha_correction_abs; @@ -1105,7 +1100,7 @@ newconfig.extsub_size --; if(newconfig.extsub_size != xc.extsub_size) { cString tmp = cString::sprintf("EXTSUBSIZE %d", newconfig.extsub_size); - cXinelibDevice::Instance().PlayFileCtrl(tmp); + m_Dev->PlayFileCtrl(tmp); } memcpy(&xc, &newconfig, sizeof(config_t)); @@ -1145,6 +1140,8 @@ class cMenuSetupDecoder : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; int pes_buffers_ind; @@ -1157,14 +1154,17 @@ void Set(void); public: - cMenuSetupDecoder(void); + cMenuSetupDecoder(cXinelibDevice *Dev); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupDecoder::cMenuSetupDecoder(void) +cMenuSetupDecoder::cMenuSetupDecoder(cXinelibDevice *Dev) { int i; + + m_Dev = Dev; + memcpy(&newconfig, &xc, sizeof(config_t)); pes_buffers_ind = PES_BUFFERS_CUSTOM; @@ -1237,7 +1237,7 @@ #endif if(xc.pes_buffers != old_buffers) - cXinelibDevice::Instance().ConfigureDecoder(xc.pes_buffers); + m_Dev->ConfigureDecoder(xc.pes_buffers); Setup.Save(); } @@ -1247,6 +1247,8 @@ class cMenuSetupLocal : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; int local_frontend; @@ -1272,14 +1274,16 @@ void Set(void); public: - cMenuSetupLocal(void); + cMenuSetupLocal(cXinelibDevice *Dev); ~cMenuSetupLocal(void); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupLocal::cMenuSetupLocal(void) +cMenuSetupLocal::cMenuSetupLocal(cXinelibDevice *Dev) { + m_Dev = Dev; + SetPlugin(cPluginManager::GetPlugin(PLUGIN_NAME_I18N)); memcpy(&newconfig, &xc, sizeof(config_t)); @@ -1299,10 +1303,10 @@ cMenuSetupLocal::~cMenuSetupLocal(void) { - cXinelibDevice::Instance().ConfigureWindow( + m_Dev->ConfigureWindow( xc.fullscreen, xc.width, xc.height, xc.modeswitch, xc.modeline, - xc.display_aspect, xc.scale_video, xc.field_order); - cXinelibDevice::Instance().ConfigurePostprocessing( + xc.display_aspect, xc.scale_video); + m_Dev->ConfigurePostprocessing( xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, xc.audio_surround, xc.speaker_type); } @@ -1382,13 +1386,6 @@ Add(ctrl_scale = new cMenuEditBoolItem(tr("Scale to window size"), &newconfig.scale_video)); -#ifdef HAVE_XV_FIELD_ORDER - Add(ctrl_interlace_order = - new cMenuEditStraI18nItem(tr("Interlaced Field Order"), - &newconfig.field_order, FIELD_ORDER_count, - xc.s_fieldOrder)); -#endif - Add(SeparatorItem(tr("Audio"))); Add(ctrl_audio_driver = @@ -1419,7 +1416,7 @@ eOSState state = cMenuSetupPage::ProcessKey(Key); if(state == osUser1) - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupDecoder); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupDecoder(m_Dev)); Key = NORMALKEY(Key); @@ -1449,10 +1446,9 @@ Set(); } else if(item == ctrl_aspect || item == ctrl_scale || item == ctrl_interlace_order) - cXinelibDevice::Instance().ConfigureWindow( + m_Dev->ConfigureWindow( xc.fullscreen, xc.width, xc.height, xc.modeswitch, xc.modeline, - newconfig.display_aspect, newconfig.scale_video, - newconfig.field_order); + newconfig.display_aspect, newconfig.scale_video); else if(item == ctrl_local_fe && local_frontend != prev_frontend) { if(local_frontend == local_frontend_orig) { @@ -1504,7 +1500,6 @@ SetupStore("Video.Port.FB", xc.video_port_fb); #endif SetupStore("Video.Scale", xc.scale_video); - SetupStore("Video.FieldOrder", xc.field_order); SetupStore("Modeline", xc.modeline); SetupStore("VideoModeSwitching", xc.modeswitch); SetupStore("Fullscreen", xc.fullscreen); @@ -1520,6 +1515,8 @@ class cMenuSetupRemote : public cMenuSetupPage { private: + cXinelibDevice *m_Dev; + config_t newconfig; cOsdItem *ctrl_remote_mode; @@ -1535,13 +1532,14 @@ void Set(void); public: - cMenuSetupRemote(void); + cMenuSetupRemote(cXinelibDevice *Dev); virtual eOSState ProcessKey(eKeys Key); }; -cMenuSetupRemote::cMenuSetupRemote(void) +cMenuSetupRemote::cMenuSetupRemote(cXinelibDevice *Dev) { + m_Dev = Dev; memcpy(&newconfig, &xc, sizeof(config_t)); Set(); } @@ -1696,7 +1694,7 @@ SetupStore("Remote.AllowHttp", xc.remote_use_http); SetupStore("Remote.AllowHttpCtrl", xc.remote_use_http_ctrl); - cXinelibDevice::Instance().Listen(xc.remote_mode, xc.listen_port); + m_Dev->Listen(xc.remote_mode, xc.listen_port); Setup.Save(); } @@ -1761,6 +1759,8 @@ &newconfig.dvd_arrow_keys_control_playback)); Add(new cMenuEditBoolItem(tr("Show hidden files"), &newconfig.show_hidden_files)); + Add(new cMenuEditBoolItem(tr("Allow removing files"), + &newconfig.media_enable_delete)); Add(SeparatorItem(tr("Media Player"))); Add(new cMenuEditBitItem(tr("Play file"), &newconfig.media_menu_items, MEDIA_MENU_FILES)); @@ -1795,6 +1795,7 @@ SetupStore("Media.DVD.ArrowKeysControlPlayback", xc.dvd_arrow_keys_control_playback); SetupStore("Media.MenuItems", xc.media_menu_items); SetupStore("Media.ShowHiddenFiles", xc.show_hidden_files); + SetupStore("Media.EnableDelete", xc.media_enable_delete); Setup.Save(); } @@ -1818,10 +1819,11 @@ class cTestGrayscale : public cOsdObject { private: + cXinelibDevice *m_Dev; cOsd *m_Osd; public: - cTestGrayscale() { m_Osd = NULL; } + cTestGrayscale(cXinelibDevice *Dev) { m_Dev = Dev; m_Osd = NULL; } virtual ~cTestGrayscale() { delete m_Osd; } virtual void Show(); @@ -1887,7 +1889,7 @@ br -= 0xffff/1024; sprintf(s, "b %d", br); m_Osd->DrawText(400, 100, s, 0xff000000, 0xffffffff, cFont::GetFont(fontSml)); - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio); + m_Dev->ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio); m_Osd->Flush(); return osContinue; case kUp: @@ -1896,7 +1898,7 @@ co -= 0xffff/1024; sprintf(s, "c %d", co); m_Osd->DrawText(400, 130, s, 0xff000000, 0xffffffff, cFont::GetFont(fontSml)); - cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio); + m_Dev->ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio); m_Osd->Flush(); return osContinue; default:; // all other keys - do nothing. @@ -1988,22 +1990,23 @@ #include // CallPlugin -extern cOsdObject *g_PendingMenuAction; - class cMenuTestImages : public cMenuSetupPage { protected: + cXinelibDevice *m_Dev; + void Set(void); virtual void Store(void) {}; public: - cMenuTestImages(); + cMenuTestImages(cXinelibDevice *Dev); virtual eOSState ProcessKey(eKeys Key); }; -cMenuTestImages::cMenuTestImages() +cMenuTestImages::cMenuTestImages(cXinelibDevice *Dev) { + m_Dev = Dev; Set(); } @@ -2033,15 +2036,15 @@ switch (state) { case osUser1: if(cRemote::CallPlugin("xineliboutput")) - g_PendingMenuAction = new cTestGrayscale(); + xc.pending_menu_action = new cTestGrayscale(m_Dev); return osEnd; case osUser2: if(cRemote::CallPlugin("xineliboutput")) - g_PendingMenuAction = new cTestBitmap(1); + xc.pending_menu_action = new cTestBitmap(1); return osEnd; case osUser3: if(cRemote::CallPlugin("xineliboutput")) - g_PendingMenuAction = new cTestBitmap(4); + xc.pending_menu_action = new cTestBitmap(4); return osEnd; default: ; } @@ -2051,8 +2054,9 @@ //--- cMenuSetupXinelib ------------------------------------------------------ -cMenuSetupXinelib::cMenuSetupXinelib(void) +cMenuSetupXinelib::cMenuSetupXinelib(cXinelibDevice *Dev) { + m_Dev = Dev; XinelibOutputSetupMenu::controls[0] = tr("Off"); Set(); } @@ -2081,21 +2085,21 @@ switch (state) { case osUser1: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupAudio); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupAudio(m_Dev)); case osUser2: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupAudioEq); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupAudioEq(m_Dev)); case osUser3: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupVideo); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupVideo(m_Dev)); case osUser4: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupOSD); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupOSD(m_Dev)); case osUser5: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupMediaPlayer); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupMediaPlayer()); case osUser6: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupLocal); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupLocal(m_Dev)); case osUser7: - return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupRemote); + return AddSubMenu(new XinelibOutputSetupMenu::cMenuSetupRemote(m_Dev)); case osUser8: - return AddSubMenu(new cMenuTestImages); + return AddSubMenu(new cMenuTestImages(m_Dev)); default: ; } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/setup_menu.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/setup_menu.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/setup_menu.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/setup_menu.h 2012-03-19 09:53:14.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: setup_menu.h,v 1.1 2006/06/03 09:50:54 phintuka Exp $ + * $Id: setup_menu.h,v 1.2 2012/03/19 09:53:14 phintuka Exp $ * */ @@ -13,14 +13,18 @@ #include +class cXinelibDevice; + class cMenuSetupXinelib : public cMenuSetupPage { protected: + cXinelibDevice *m_Dev; + void Set(void); virtual void Store(void) {}; - + public: - cMenuSetupXinelib(void); + cMenuSetupXinelib(cXinelibDevice *Dev); virtual eOSState ProcessKey(eKeys Key); }; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/backgroundwriter.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/backgroundwriter.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/backgroundwriter.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/backgroundwriter.h 2012-01-16 12:12:49.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: backgroundwriter.h,v 1.7 2010/03/13 12:20:05 phintuka Exp $ + * $Id: backgroundwriter.h,v 1.10 2012/01/16 12:12:49 phintuka Exp $ * */ @@ -39,7 +39,11 @@ void Cork(void); public: +#if VDRVERSNUM >= 10708 + cBackgroundWriterI(int fd, int Size = KILOBYTE(2048), int Margin = 0); +#else cBackgroundWriterI(int fd, int Size = KILOBYTE(512), int Margin = 0); +#endif virtual ~cBackgroundWriterI(); // Add PES frame to buffer @@ -71,7 +75,12 @@ const uchar *Data, int DataCount); public: +#if VDRVERSNUM >= 10708 + cTcpWriter(int fd, int Size = KILOBYTE(2048)); +#else cTcpWriter(int fd, int Size = KILOBYTE(512)); +#endif + virtual ~cTcpWriter() {}; virtual int Put(eStreamId StreamId, uint64_t StreamPos, const uchar *Data, int DataCount); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/http.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/http.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/http.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/http.c 2012-01-29 19:30:55.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: http.c,v 1.7 2009/06/02 08:37:58 phintuka Exp $ + * $Id: http.c,v 1.8 2012/01/29 19:30:55 phintuka Exp $ * */ @@ -369,7 +369,7 @@ int n = 0; cxPoller p(m_fds); bool Disc = !(ParseRequest() && Seek()); - uint64_t pos = m_Start; + //uint64_t pos = m_Start; off_t start = (off_t)m_Start; while(Running() && !Disc) { @@ -415,7 +415,7 @@ LOGDBG("cHttpStreamer: Reading pipelined request"); pthread_testcancel(); Disc = !(ReadPipelined() && ParseRequest() && Seek()); - pos = m_Start; + //pos = m_Start; } } while(--n && Running() && !Disc); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/mpeg.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/mpeg.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/mpeg.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/mpeg.c 2012-12-31 16:42:45.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: mpeg.c,v 1.4 2010/02/02 22:42:09 phintuka Exp $ + * $Id: mpeg.c,v 1.5 2012/12/31 16:42:45 phintuka Exp $ * */ @@ -31,6 +31,17 @@ return NO_PICTURE; } +int mpeg2_is_sequence_header(const uint8_t *buf, int len) +{ + int i; + for (i = 0; i < len-6; i++) { + if (IS_SC_SEQUENCE(buf + i)) { + return 1; + } + } + return 0; +} + int mpeg2_get_video_size(const uint8_t *buf, int len, video_size_t *size) { int i; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/mpeg.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/mpeg.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/mpeg.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/mpeg.h 2012-12-31 16:42:45.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: mpeg.h,v 1.8 2010/02/03 13:49:39 phintuka Exp $ + * $Id: mpeg.h,v 1.9 2012/12/31 16:42:45 phintuka Exp $ * */ @@ -58,6 +58,10 @@ */ int mpeg2_get_video_size(const uint8_t *buf, int len, video_size_t *size); +/* + * + */ +int mpeg2_is_sequence_header(const uint8_t *buf, int len); #ifdef __cplusplus } /* extern "C" { */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/pes.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/pes.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/pes.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/pes.c 2012-08-30 08:36:39.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: pes.c,v 1.10 2009/07/01 09:31:17 phintuka Exp $ + * $Id: pes.c,v 1.11 2012/08/30 08:36:39 phintuka Exp $ * */ @@ -18,6 +18,16 @@ #include "pes.h" +static int64_t parse_timestamp(const uint8_t *buf) +{ + int64_t ts; + ts = ((int64_t)( buf[0] & 0x0E)) << 29 ; + ts |= (int64_t)( buf[1] << 22 ); + ts |= (int64_t)((buf[2] & 0xFE) << 14 ); + ts |= (int64_t)( buf[3] << 7 ); + ts |= (int64_t)((buf[4] & 0xFE) >> 1 ); + return ts; +} int64_t pes_get_pts(const uint8_t *buf, int len) { @@ -30,13 +40,7 @@ return NO_PTS; if ((len > 13) && (buf[7] & 0x80)) { /* pts avail */ - int64_t pts; - pts = ((int64_t)(buf[ 9] & 0x0E)) << 29 ; - pts |= ((int64_t) buf[10]) << 22 ; - pts |= ((int64_t)(buf[11] & 0xFE)) << 14 ; - pts |= ((int64_t) buf[12]) << 7 ; - pts |= ((int64_t)(buf[13] & 0xFE)) >> 1 ; - return pts; + return parse_timestamp(buf + 9); } } return NO_PTS; @@ -52,13 +56,7 @@ return NO_PTS; if (len > 18 && (buf[7] & 0x40)) { /* dts avail */ - int64_t dts; - dts = ((int64_t)( buf[14] & 0x0E)) << 29 ; - dts |= (int64_t)( buf[15] << 22 ); - dts |= (int64_t)((buf[16] & 0xFE) << 14 ); - dts |= (int64_t)( buf[17] << 7 ); - dts |= (int64_t)((buf[18] & 0xFE) >> 1 ); - return dts; + return parse_timestamp(buf + 14); } } return NO_PTS; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/playlist.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/playlist.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/playlist.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/playlist.c 2012-01-30 07:47:36.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: playlist.c,v 1.33 2010/12/19 14:25:38 phintuka Exp $ + * $Id: playlist.c,v 1.34 2012/01/30 07:47:36 phintuka Exp $ * */ @@ -347,9 +347,9 @@ 1 == sscanf(line + 5, "%d=", &n)) { if(*(t+1)) { if(n == m_Current) - Prev()->Title = t; + Prev()->Title = t+1; else - m_Title = t; + m_Title = t+1; } } //else if(!strncasecmp(line, "length", 6) && diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/rle.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/rle.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/rle.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/rle.c 2012-01-24 11:23:10.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: rle.c,v 1.9 2011/11/08 09:38:54 phintuka Exp $ + * $Id: rle.c,v 1.10 2012/01/24 11:23:10 phintuka Exp $ * */ @@ -406,21 +406,25 @@ } } +void rle_palette_to_rgba(uint32_t *rgba, const struct xine_clut_s *palette, uint entries) +{ + uint i; + for (i = 0; i < entries; i++) { + rgba[i] = (palette[i].r << 24) | + (palette[i].g << 16) | + (palette[i].b << 8 ) | + (palette[i].alpha ); + } +} -void rle_uncompress_argb(uint32_t *dst, - uint w, uint h, uint stride, - const struct xine_rle_elem_s *rle_data, uint num_rle, - const struct xine_clut_s *palette, uint palette_entries) +static void rle_uncompress_u32(uint32_t *dst, + uint w, uint h, uint stride, + const struct xine_rle_elem_s *rle_data, uint num_rle, + uint32_t *lut) { - uint32_t lut[256]; uint i, pixelcounter = 0; uint idx = 0, line = 0; - if (palette_entries > 256) - return; - - rle_palette_to_argb(lut, palette, palette_entries); - for(i = 0; i < num_rle; ++i) { uint32_t color = lut[(rle_data + i)->color]; uint len = (rle_data + i)->len; @@ -440,3 +444,32 @@ } } +void rle_uncompress_argb(uint32_t *dst, + uint w, uint h, uint stride, + const struct xine_rle_elem_s *rle_data, uint num_rle, + const struct xine_clut_s *palette, uint palette_entries) +{ + uint32_t lut[256] = {0}; + + if (palette_entries > 256) + return; + + rle_palette_to_argb(lut, palette, palette_entries); + + rle_uncompress_u32(dst, w, h, stride, rle_data, num_rle, lut); +} + +void rle_uncompress_rgba(uint32_t *dst, + uint w, uint h, uint stride, + const struct xine_rle_elem_s *rle_data, uint num_rle, + const struct xine_clut_s *palette, uint palette_entries) +{ + uint32_t lut[256] = {0}; + + if (palette_entries > 256) + return; + + rle_palette_to_rgba(lut, palette, palette_entries); + + rle_uncompress_u32(dst, w, h, stride, rle_data, num_rle, lut); +} diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/rle.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/rle.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/rle.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/rle.h 2012-01-24 11:23:10.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: rle.h,v 1.6 2011/03/08 08:55:14 phintuka Exp $ + * $Id: rle.h,v 1.7 2012/01/24 11:23:10 phintuka Exp $ * */ @@ -30,6 +30,7 @@ uint rle_recompress_net(uint8_t *raw, xine_rle_elem_t *data, uint elems); void rle_palette_to_argb(uint32_t *argb, const struct xine_clut_s *palette, uint entries); +void rle_palette_to_rgba(uint32_t *rgba, const struct xine_clut_s *palette, uint entries); void rle_uncompress_lut8(uint8_t *dst, uint w, uint h, uint stride, @@ -38,6 +39,10 @@ uint w, uint h, uint stride, const struct xine_rle_elem_s *rle_data, uint num_rle, const struct xine_clut_s *palette, uint palette_entries); +void rle_uncompress_rgba(uint32_t *dst, + uint w, uint h, uint stride, + const struct xine_rle_elem_s *rle_data, uint num_rle, + const struct xine_clut_s *palette, uint palette_entries); /* * rle_scale_nearest() diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/time_ms.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/time_ms.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/time_ms.h 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/time_ms.h 2012-03-20 09:10:33.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * time_ms.h: simple current time interface + * + * See the main source file 'xineliboutput.c' for copyright information and + * how to reach the author. + * + * $Id: time_ms.h,v 1.2 2012/03/20 09:10:33 phintuka Exp $ + * + */ + +#ifndef XINELIBOUTPUT_TIME_MS_H_ +#define XINELIBOUTPUT_TIME_MS_H_ + +#include + +static uint64_t time_ms(void) +{ + struct timeval t; +#ifdef XINEUTILS_H + if (xine_monotonic_clock(&t, NULL) == 0) +#else + if (gettimeofday(&t, NULL) == 0) +#endif + return ((uint64_t)t.tv_sec) * 1000ULL + t.tv_usec / 1000ULL; + return 0; +} + +static uint64_t elapsed(uint64_t t) +{ + return time_ms() - t; +} + +#endif /* XINELIBOUTPUT_TIME_MS_H_ */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/ts.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/ts.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/ts.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/ts.c 2013-01-06 21:23:43.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: ts.c,v 1.29 2011/11/13 09:45:01 phintuka Exp $ + * $Id: ts.c,v 1.33 2013/01/06 21:23:43 phintuka Exp $ * */ @@ -205,7 +205,7 @@ } d += 2 + d[1]; } - LOGPMT("pare_pmt: found no format id"); + LOGPMT("parse_pmt: found no format id"); *dest = 0; } @@ -273,6 +273,8 @@ int count; uint8_t len; uint offset = 0; + uint32_t program_info_format_identifier = 0; + uint8_t hdmv_pmt = 0; /* * A new section should start with the payload unit start @@ -321,6 +323,11 @@ } } + if (!pmt->pmt) { + LOGMSG("parse_pmt: dropping PMT packet without PUSI"); + return 0; + } + if (!pusi) { section_length = (pmt->pmt[1] << 8 | pmt->pmt[2]) & 0x03ff; version_number = (pkt[10] >> 1) & 0x1f; @@ -376,6 +383,17 @@ /* ES definitions start here */ program_info_length = ((pmt->pmt[10] << 8) | pmt->pmt[11]) & 0x0fff; + ts_get_reg_desc(&program_info_format_identifier, + &pmt->pmt[12], program_info_length); + if (program_info_format_identifier) { + if ((program_info_format_identifier == (('H' << 24) | ('D' << 16) | ('M' << 8) | 'V'))) { + LOGMSG("PMT program info has tag 0x05 (format_identifier), content HDMV (0x%x)\n", program_info_format_identifier); + hdmv_pmt = 1; + } else { + LOGMSG("PMT program info has tag 0x05 (format_identifier), content 0x%x\n", program_info_format_identifier); + } + } + stream = &pmt->pmt[12] + program_info_length; coded_length = 13 + program_info_length; if (coded_length > section_length) { @@ -404,6 +422,7 @@ case ISO_13818_VIDEO: case ISO_14496_PART2_VIDEO: case ISO_14496_PART10_VIDEO: + case STREAM_VIDEO_VC1: LOGPMT("parse_pmt: video pid 0x%.4x type %2.2x", pid, stream[0]); if (pmt->video_pid == INVALID_PID) { pmt->video_pid = pid; @@ -469,6 +488,31 @@ } break; + case HDMV_SPU_90_BITMAP & 0xff: + case HDMV_SPU_91_INTERACTIVE & 0xff: + case HDMV_SPU_92_TEXT & 0xff: + if (hdmv_pmt) + break; // ignore BluRay PG/IG/TextST streams + /* fall thru */ + case HDMV_AUDIO_80_PCM & 0xff: + case HDMV_AUDIO_82_DTS & 0xff: + case HDMV_AUDIO_83_TRUEHD & 0xff: + case HDMV_AUDIO_84_EAC3 & 0xff: + case HDMV_AUDIO_85_DTS_HRA & 0xff: + case HDMV_AUDIO_86_DTS_HD_MA & 0xff: + if (hdmv_pmt) { + if ((pmt->audio_tracks_count < TS_MAX_AUDIO_TRACKS)) { + if (find_audio_track(pmt, pid) < 0) { + pmt->audio_tracks[pmt->audio_tracks_count].pid = pid; + pmt->audio_tracks[pmt->audio_tracks_count].type = (ts_stream_type)(stream[0] | STREAM_HDMV); + pmt->audio_tracks_count++; + break; + } + } + break; + } + /* fall thru */ + default: /* This following section handles all the cases where the audio track info is stored diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/ts.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/ts.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/tools/ts.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/tools/ts.h 2013-01-06 21:23:43.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: ts.h,v 1.17 2010/07/19 13:12:07 phintuka Exp $ + * $Id: ts.h,v 1.19 2013/01/06 21:23:43 phintuka Exp $ * */ @@ -77,6 +77,8 @@ STREAM_VIDEO_MPEG = 0x80, STREAM_AUDIO_AC3 = 0x81, + STREAM_VIDEO_VC1 = 0xea, + /* private streams, payload type detected from PMT stream descriptor tag */ STREAM_AUDIO_EAC3 = 0x7a06, // ISO_13818_PES_PRIVATE | (STREAM_DESCR_EAC3 << 8) @@ -84,6 +86,19 @@ STREAM_AUDIO_AAC = 0x7c06, // ISO_13818_PES_PRIVATE | (STREAM_DESCR_AAC << 8) STREAM_DVBSUB = 0x5906, // ISO_13818_PES_PRIVATE | (STREAM_DESCR_DVBSUB << 8) + /* HDMV */ + STREAM_HDMV = 0xff00, + HDMV_AUDIO_80_PCM = 0x80 | STREAM_HDMV, /* BluRay PCM */ + HDMV_AUDIO_82_DTS = 0x82 | STREAM_HDMV, /* DTS */ + HDMV_AUDIO_83_TRUEHD = 0x83 | STREAM_HDMV, /* Dolby TrueHD, primary audio */ + HDMV_AUDIO_84_EAC3 = 0x84 | STREAM_HDMV, /* Dolby Digital plus, primary audio */ + HDMV_AUDIO_85_DTS_HRA = 0x85 | STREAM_HDMV, /* DTS-HRA */ + HDMV_AUDIO_86_DTS_HD_MA = 0x86 | STREAM_HDMV, /* DTS-HD Master audio */ + + HDMV_SPU_90_BITMAP = 0x90 | STREAM_HDMV, /* Presentation Graphics */ + HDMV_SPU_91_INTERACTIVE = 0x91 | STREAM_HDMV, /* Interactive Graphics */ + HDMV_SPU_92_TEXT = 0x92 | STREAM_HDMV, /* Text subtitles */ + } ts_stream_type; /* stream info descriptors */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/BluRay/Makefile vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/BluRay/Makefile --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/BluRay/Makefile 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/BluRay/Makefile 2011-12-15 10:06:37.000000000 +0000 @@ -2,12 +2,22 @@ # select plugins # -ENABLE_DEMUX_PLUGIN ?= yes +ifeq ($(shell pkg-config libxine --atleast-version=1.1.21 || echo "yes"), yes) + ENABLE_DEMUX_PLUGIN ?= yes +else + ENABLE_DEMUX_PLUGIN ?= no + $(warning demux plugin is included in xine-lib 1.1.21+) +endif ifeq ($(shell pkg-config libbluray && echo yes), yes) - ENABLE_INPUT_PLUGIN ?= yes - CFLAGS_BD ?= $(shell pkg-config libbluray --cflags) - LIBS_BD ?= $(shell pkg-config libbluray --libs) + ifeq ($(shell pkg-config libxine --atleast-version=1.1.21 || echo "yes"), yes) + ENABLE_INPUT_PLUGIN ?= yes + CFLAGS_BD ?= $(shell pkg-config libbluray --cflags) + LIBS_BD ?= $(shell pkg-config libbluray --libs) + else + ENABLE_DEMUX_PLUGIN ?= no + $(warning input plugin is included in xine-lib 1.1.21+) + endif else ENABLE_INPUT_PLUGIN ?= no $(warning libbluray not found) diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/BluRay/input_bluray.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/BluRay/input_bluray.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/BluRay/input_bluray.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/BluRay/input_bluray.c 2011-12-15 10:39:51.000000000 +0000 @@ -1,6 +1,5 @@ /* * Copyright (C) 2000-2011 the xine project - * * Copyright (C) 2009-2011 Petri Hintukainen * * This file is part of xine, a free video player. @@ -21,8 +20,9 @@ * * Input plugin for BluRay discs / images * - * Requires libbluray from git://git.videolan.org/libbluray.git - * Tested with revision 2011-10-19 14:00 UTC + * Requires libbluray 0.2.1 or later: + * http://www.videolan.org/developers/libbluray.html + * git://git.videolan.org/libbluray.git * */ @@ -40,7 +40,6 @@ #include #include #include -#include #include /* for loop device (used with .iso images) */ @@ -50,11 +49,15 @@ #include #include +/* libbluray */ #include +#include #include #include #include +/* xine */ + #define LOG_MODULE "input_bluray" #define LOG_VERBOSE @@ -62,7 +65,7 @@ #define LOGMSG(x...) xine_log (this->stream->xine, XINE_LOG_MSG, "input_bluray: " x); -#define XINE_ENGINE_INTERNAL // stream->demux_plugin +#define XINE_ENGINE_INTERNAL #ifdef HAVE_CONFIG_H # include "xine_internal.h" @@ -84,6 +87,8 @@ # define XINE_EVENT_END_OF_CLIP 0x80000001 #endif +/* */ + #ifndef MIN # define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -97,6 +102,8 @@ #define MIN_TITLE_LENGTH 180 +/* */ + typedef struct { input_class_t input_class; @@ -118,12 +125,12 @@ typedef struct { input_plugin_t input_plugin; + bluray_input_class_t *class; + xine_stream_t *stream; xine_event_queue_t *event_queue; xine_osd_t *osd[2]; - bluray_input_class_t *class; - char *mrl; char *disc_root; char *disc_name; @@ -141,20 +148,23 @@ pthread_mutex_t title_info_mutex; /* lock this when accessing title_info outside of input/demux thread */ unsigned int current_clip; time_t still_end_time; - int error; - int menu_open; - int stream_flushed; - int pg_enable; int pg_stream; + + uint8_t nav_mode : 1; + uint8_t error : 1; + uint8_t menu_open : 1; + uint8_t stream_flushed : 1; + uint8_t demux_action_req : 1; + uint8_t end_of_title : 1; + uint8_t pg_enable : 1; int mouse_inside_button; uint32_t cap_seekable; - uint8_t nav_mode; /* loop device for .iso image */ - char *iso_image; - char *loop_dev; - char mount_point[64]; + char *iso_image; + char *loop_dev; + char mount_point[64]; } bluray_input_plugin_t; @@ -311,6 +321,8 @@ * overlay */ +#define PALETTE_INDEX_BACKGROUND 0xff + static void send_num_buttons(bluray_input_plugin_t *this, int n) { xine_event_t event; @@ -324,10 +336,21 @@ xine_event_send(this->stream, &event); } +static void clear_overlay(xine_osd_t *osd) +{ + /* palette entry 0xff is background --> can't use xine_osd_clear(). */ + memset(osd->osd.area, PALETTE_INDEX_BACKGROUND, osd->osd.width * osd->osd.height); + osd->osd.x1 = osd->osd.width; + osd->osd.y1 = osd->osd.height; + osd->osd.x2 = 0; + osd->osd.y2 = 0; +} + static xine_osd_t *get_overlay(bluray_input_plugin_t *this, int plane) { if (!this->osd[plane]) { this->osd[plane] = xine_osd_new(this->stream, 0, 0, 1920, 1080); + clear_overlay(this->osd[plane]); } if (!this->pg_enable) { _x_select_spu_channel(this->stream, -1); @@ -355,9 +378,14 @@ static void open_overlay(bluray_input_plugin_t *this, const BD_OVERLAY * const ov) { - if (!this->osd[ov->plane]) { - this->osd[ov->plane] = xine_osd_new(this->stream, ov->x, ov->y, ov->w, ov->h); + lprintf("open_overlay(%d,%d)\n", ov->w, ov->h); + + if (this->osd[ov->plane]) { + close_overlay(this, ov->plane); } + + this->osd[ov->plane] = xine_osd_new(this->stream, ov->x, ov->y, ov->w, ov->h); + clear_overlay(this->osd[ov->plane]); } static void draw_bitmap(xine_osd_t *osd, const BD_OVERLAY * const ov) @@ -395,6 +423,7 @@ static void overlay_proc(void *this_gen, const BD_OVERLAY * const ov) { bluray_input_plugin_t *this = (bluray_input_plugin_t *) this_gen; + xine_osd_t *osd; if (!this) { return; @@ -419,7 +448,7 @@ return; } - xine_osd_t *osd = get_overlay(this, ov->plane); + osd = get_overlay(this, ov->plane); switch (ov->cmd) { case BD_OVERLAY_DRAW: /* draw bitmap (x,y,w,h,img,palette) */ @@ -427,13 +456,12 @@ return; case BD_OVERLAY_WIPE: /* clear area (x,y,w,h) */ - xine_osd_draw_rect(osd, ov->x, ov->y, ov->x + ov->w - 1, ov->y + ov->h - 1, 0xff, 1); + xine_osd_draw_rect(osd, ov->x, ov->y, ov->x + ov->w - 1, ov->y + ov->h - 1, PALETTE_INDEX_BACKGROUND, 1); return; case BD_OVERLAY_CLEAR: /* clear plane */ - xine_osd_draw_rect(osd, 0, 0, osd->osd.width - 1, osd->osd.height - 1, 0xff, 1); - xine_osd_clear(osd); xine_osd_hide(osd, 0); + clear_overlay(osd); return; case BD_OVERLAY_FLUSH: /* all changes have been done, flush overlay to display at given pts */ @@ -446,7 +474,7 @@ return; default: - LOGMSG("unknown overlay command %d", ov->cmd); + LOGMSG("unknown overlay command %d\n", ov->cmd); return; } } @@ -585,7 +613,7 @@ static void stream_flush(bluray_input_plugin_t *this) { - if (this->stream_flushed || !this->stream || !this->stream->demux_plugin) + if (this->stream_flushed || !this->stream) return; lprintf("Stream flush\n"); @@ -599,6 +627,8 @@ .data_length = 0, }; xine_event_send (this->stream, &event); + + this->demux_action_req = 1; } static void stream_reset(bluray_input_plugin_t *this) @@ -608,6 +638,7 @@ lprintf("Stream reset\n"); +#if XINE_VERSION_CODE < 10121 this->cap_seekable = 0; _x_set_fine_speed(this->stream, XINE_FINE_SPEED_NORMAL); @@ -615,6 +646,22 @@ _x_demux_control_start(this->stream); this->cap_seekable = INPUT_CAP_SEEKABLE; +#else + xine_event_t event = { + .type = XINE_EVENT_PIDS_CHANGE, + .stream = this->stream, + .data = NULL, + .data_length = 0, + }; + + if (!this->end_of_title) { + _x_demux_flush_engine(this->stream); + } + + xine_event_send (this->stream, &event); + + this->demux_action_req = 1; +#endif } static void wait_secs(bluray_input_plugin_t *this, unsigned seconds) @@ -671,6 +718,9 @@ { switch ((bd_event_e)ev.event) { + case BD_EVENT_NONE: + break; + case BD_EVENT_ERROR: LOGMSG("BD_EVENT_ERROR\n"); this->error = 1; @@ -687,6 +737,13 @@ this->error = 1; return; + /* sound effects */ +#if BLURAY_VERSION >= 202 + case BD_EVENT_SOUND_EFFECT: + lprintf("BD_EVENT_SOUND_EFFECT %d\n", ev.param); + break; +#endif + /* playback control */ case BD_EVENT_SEEK: @@ -696,7 +753,6 @@ break; case BD_EVENT_STILL_TIME: - //lprintf("BD_EVENT_STILL_TIME %d\n", ev.param); wait_secs(this, ev.param); break; @@ -719,13 +775,16 @@ break; case BD_EVENT_END_OF_TITLE: - LOGMSG("BD_EVENT_END_OF_TITLE\n"); + lprintf("BD_EVENT_END_OF_TITLE\n"); stream_flush(this); + this->end_of_title = 1; break; case BD_EVENT_TITLE: - LOGMSG("BD_EVENT_TITLE %d\n", ev.param); - this->current_title = ev.param; + if (this->nav_mode) { + lprintf("BD_EVENT_TITLE %d\n", ev.param); + this->current_title = ev.param; + } break; case BD_EVENT_PLAYLIST: @@ -734,6 +793,7 @@ this->current_clip = 0; update_title_info(this, ev.param); stream_reset(this); + this->end_of_title = 0; break; case BD_EVENT_PLAYITEM: @@ -751,18 +811,26 @@ case BD_EVENT_AUDIO_STREAM: lprintf("BD_EVENT_AUDIO_STREAM %d\n", ev.param); - update_audio_channel(this, ev.param - 1); + if (ev.param < 32) { + update_audio_channel(this, ev.param - 1); + } else { + update_audio_channel(this, 0); + } break; case BD_EVENT_PG_TEXTST: lprintf("BD_EVENT_PG_TEXTST %s\n", ev.param ? "ON" : "OFF"); - this->pg_enable = ev.param; + this->pg_enable = !!ev.param; update_spu_channel(this, this->pg_enable ? this->pg_stream : -1); break; case BD_EVENT_PG_TEXTST_STREAM: lprintf("BD_EVENT_PG_TEXTST_STREAM %d\n", ev.param); - this->pg_stream = ev.param - 1; + if (ev.param < 64) { + this->pg_stream = ev.param - 1; + } else { + this->pg_stream = -1; + } if (this->pg_enable) { update_spu_channel(this, this->pg_stream); } @@ -776,11 +844,8 @@ case BD_EVENT_SECONDARY_VIDEO_STREAM: // TODO - case BD_EVENT_NONE: - break; - default: - LOGMSG("unhandled libbluray event %d [param %d]\n", ev.event, ev.param); + lprintf("unhandled libbluray event %d [param %d]\n", ev.event, ev.param); break; } } @@ -1002,6 +1067,20 @@ INPUT_CAP_CHAPTERS; } +#if XINE_VERSION_CODE >= 10121 +# define CHECK_READ_INTERRUPT \ + do { \ + if (this->demux_action_req) { \ + this->demux_action_req = 0; \ + errno = EAGAIN; \ + return -1; \ + } \ + } while (0) +#else +# define CHECK_READ_INTERRUPT +#endif + + #if XINE_VERSION_CODE >= 10190 static off_t bluray_plugin_read (input_plugin_t *this_gen, void *buf, off_t len) #else @@ -1015,14 +1094,19 @@ return -1; handle_events(this); + CHECK_READ_INTERRUPT; if (this->nav_mode) { do { BD_EVENT ev; result = bd_read_ext (this->bdh, (unsigned char *)buf, len, &ev); handle_libbluray_event(this, ev); + CHECK_READ_INTERRUPT; + if (result == 0) { handle_events(this); + CHECK_READ_INTERRUPT; + if (ev.event == BD_EVENT_NONE) { if (_x_action_pending(this->stream)) { break; @@ -1038,7 +1122,8 @@ if (result < 0) LOGMSG("bd_read() failed: %s (%d of %d)\n", strerror(errno), (int)result, (int)len); - this->stream_flushed = 0; + if (result > 0) + this->stream_flushed = 0; return result; } @@ -1169,10 +1254,70 @@ return this->mrl; } -static int get_optional_data_impl (bluray_input_plugin_t *this, void *data, int data_type) +static int get_audio_lang (bluray_input_plugin_t *this, int *data) +{ + /* + * audio track language: + * - channel number can be mpeg-ts PID (0x1100 ... 0x11ff) + */ + + unsigned int current_clip = this->current_clip; /* can change any time */ + + if (this->title_info && current_clip < this->title_info->clip_count) { + int channel = *data; + BLURAY_CLIP_INFO *clip = &this->title_info->clips[current_clip]; + + if (channel >= 0 && channel < clip->audio_stream_count) { + memcpy(data, clip->audio_streams[channel].lang, 4); + return INPUT_OPTIONAL_SUCCESS; + } + + /* search by pid */ + int i; + for (i = 0; i < clip->audio_stream_count; i++) { + if (channel == clip->audio_streams[i].pid) { + memcpy(data, clip->audio_streams[i].lang, 4); + return INPUT_OPTIONAL_SUCCESS; + } + } + } + + return INPUT_OPTIONAL_UNSUPPORTED; +} + +static int get_spu_lang (bluray_input_plugin_t *this, int *data) { - unsigned int current_clip = this->current_clip; + /* + * SPU track language: + * - channel number can be mpeg-ts PID (0x1200 ... 0x12ff) + */ + + unsigned int current_clip = this->current_clip; /* can change any time */ + + if (this->title_info && current_clip < this->title_info->clip_count) { + int channel = *data; + BLURAY_CLIP_INFO *clip = &this->title_info->clips[current_clip]; + + if (channel >= 0 && channel < clip->pg_stream_count) { + memcpy(data, clip->pg_streams[channel].lang, 4); + return INPUT_OPTIONAL_SUCCESS; + } + + /* search by pid */ + int i; + for (i = 0; i < clip->pg_stream_count; i++) { + if (channel == clip->pg_streams[i].pid) { + memcpy(data, clip->pg_streams[i].lang, 4); + return INPUT_OPTIONAL_SUCCESS; + } + } + } + + return INPUT_OPTIONAL_UNSUPPORTED; +} +static int get_optional_data_impl (bluray_input_plugin_t *this, void *data, int data_type) +{ switch (data_type) { case INPUT_OPTIONAL_DATA_DEMUXER: @@ -1183,68 +1328,14 @@ #endif return INPUT_OPTIONAL_SUCCESS; - /* - * audio track language: - * - channel number can be mpeg-ts PID (0x1100 ... 0x11ff) - */ case INPUT_OPTIONAL_DATA_AUDIOLANG: - if (this->title_info && this->title_info->clip_count < current_clip) { - int channel = *((int *)data); - BLURAY_CLIP_INFO *clip = &this->title_info->clips[current_clip]; - - if (channel >= 0 && channel < clip->audio_stream_count) { - memcpy(data, clip->audio_streams[channel].lang, 4); - lprintf("INPUT_OPTIONAL_DATA_AUDIOLANG: %02d [pid 0x%04x]: %s\n", - channel, clip->audio_streams[channel].pid, clip->audio_streams[channel].lang); + return get_audio_lang(this, data); - return INPUT_OPTIONAL_SUCCESS; - } - /* search by pid */ - int i; - for (i = 0; i < clip->audio_stream_count; i++) { - if (channel == clip->audio_streams[i].pid) { - memcpy(data, clip->audio_streams[i].lang, 4); - lprintf("INPUT_OPTIONAL_DATA_AUDIOLANG: pid 0x%04x -> ch %d: %s\n", - channel, i, clip->audio_streams[i].lang); - - return INPUT_OPTIONAL_SUCCESS; - } - } - } - return INPUT_OPTIONAL_UNSUPPORTED; - - /* - * SPU track language: - * - channel number can be mpeg-ts PID (0x1200 ... 0x12ff) - */ case INPUT_OPTIONAL_DATA_SPULANG: - if (this->title_info && this->title_info->clip_count < current_clip) { - int channel = *((int *)data); - BLURAY_CLIP_INFO *clip = &this->title_info->clips[current_clip]; - - if (channel >= 0 && channel < clip->pg_stream_count) { - memcpy(data, clip->pg_streams[channel].lang, 4); - lprintf("INPUT_OPTIONAL_DATA_SPULANG: %02d [pid 0x%04x]: %s\n", - channel, clip->pg_streams[channel].pid, clip->pg_streams[channel].lang); - - return INPUT_OPTIONAL_SUCCESS; - } - /* search by pid */ - int i; - for (i = 0; i < clip->pg_stream_count; i++) { - if (channel == clip->pg_streams[i].pid) { - memcpy(data, clip->pg_streams[i].lang, 4); - lprintf("INPUT_OPTIONAL_DATA_SPULANG: pid 0x%04x -> ch %d: %s\n", - channel, i, clip->pg_streams[i].lang); - - return INPUT_OPTIONAL_SUCCESS; - } - } - } - return INPUT_OPTIONAL_UNSUPPORTED; + return get_spu_lang(this, data); default: - return DEMUX_OPTIONAL_UNSUPPORTED; + return INPUT_OPTIONAL_UNSUPPORTED; } return INPUT_OPTIONAL_UNSUPPORTED; @@ -1528,7 +1619,7 @@ bd_set_player_setting_str(this->bdh, BLURAY_PLAYER_SETTING_MENU_LANG, this->class->language); bd_set_player_setting_str(this->bdh, BLURAY_PLAYER_SETTING_COUNTRY_CODE, this->class->country); - /* init eq */ + /* init event queue */ bd_get_event(this->bdh, NULL); /* get disc name */ @@ -1635,9 +1726,16 @@ static void language_change_cb(void *data, xine_cfg_entry_t *cfg) { - bluray_input_class_t *this = (bluray_input_class_t *) data; + bluray_input_class_t *class = (bluray_input_class_t *) data; - this->language = cfg->str_value; + class->language = cfg->str_value; +#if 0 + if (class->bdh) { + bd_set_player_setting_str(class->bdh, BLURAY_PLAYER_SETTING_AUDIO_LANG, class->language); + bd_set_player_setting_str(class->bdh, BLURAY_PLAYER_SETTING_PG_LANG, class->language); + bd_set_player_setting_str(class->bdh, BLURAY_PLAYER_SETTING_MENU_LANG, class->language); + } +#endif } static void country_change_cb(void *data, xine_cfg_entry_t *cfg) @@ -1705,11 +1803,12 @@ return autoplay_list; } -xine_mrl_t **bluray_class_get_dir(input_class_t *this_gen, const char *filename, int *nFiles) +static xine_mrl_t **bluray_class_get_dir(input_class_t *this_gen, const char *filename, int *nFiles) { bluray_input_class_t *this = (bluray_input_class_t*) this_gen; char *path = NULL; int title = -1, chapter = -1, i, num_pl; + BLURAY *bdh; lprintf("bluray_class_get_dir(%s)\n", filename); @@ -1718,7 +1817,7 @@ if (filename) parse_mrl(filename, &path, &title, &chapter); - BLURAY *bdh = bd_open(path?:this->mountpoint, NULL); + bdh = bd_open(path ? path : this->mountpoint, NULL); if (bdh) { num_pl = bd_get_titles(bdh, TITLES_RELEVANT, MIN_TITLE_LENGTH); @@ -1743,9 +1842,9 @@ //bd_free_title_info(info); } } - } - bd_close(bdh); + bd_close(bdh); + } free(path); @@ -1807,17 +1906,19 @@ this->input_class.dispose = bluray_class_dispose; this->input_class.eject_media = bluray_class_eject_media; - this->mountpoint = config->register_filename(config, "media.bluray.mountpoint", - "/mnt/bluray", XINE_CONFIG_STRING_IS_DIRECTORY_NAME, - _("BluRay mount point"), - _("Default mount location for BluRay discs."), - 0, mountpoint_change_cb, (void *) this); - this->device = config->register_filename(config, "media.bluray.device", - "/dev/dvd", XINE_CONFIG_STRING_IS_DIRECTORY_NAME, - _("device used for BluRay playback"), - _("The path to the device " - "which you intend to use for playing BluRy discs."), - 0, device_change_cb, (void *) this); + this->mountpoint = + config->register_filename(config, "media.bluray.mountpoint", + "/mnt/bluray", XINE_CONFIG_STRING_IS_DIRECTORY_NAME, + _("BluRay mount point"), + _("Default mount location for BluRay discs."), + 0, mountpoint_change_cb, (void *) this); + this->device = + config->register_filename(config, "media.bluray.device", + "/dev/dvd", XINE_CONFIG_STRING_IS_DIRECTORY_NAME, + _("device used for BluRay playback"), + _("The path to the device " + "which you intend to use for playing BluRy discs."), + 0, device_change_cb, (void *) this); /* Player settings */ this->language = diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/adjustable_scr.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/adjustable_scr.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/adjustable_scr.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/adjustable_scr.c 2012-03-22 12:03:37.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: adjustable_scr.c,v 1.2 2008/12/14 01:21:20 phintuka Exp $ + * $Id: adjustable_scr.c,v 1.5 2012/03/22 12:03:37 phintuka Exp $ * */ @@ -13,6 +13,12 @@ #include #include +#include "../tools/time_ms.h" + +#define LOG_MODULENAME "[scr ] " +#define SysLogLevel iSysLogLevel +#include "../logdefs.h" + #include "adjustable_scr.h" /* @@ -58,9 +64,10 @@ double speed_factor; double speed_tuning; - pthread_mutex_t lock; + int buffering; /* clock is freezed while buffering */ + uint64_t buffering_start_time; - struct timeval last_time; + pthread_mutex_t lock; }; /* Only call set_pivot when already mutex locked ! */ @@ -70,6 +77,11 @@ int64_t pts; double pts_calc; + if (this->buffering) { + xine_monotonic_clock(&this->cur_time, NULL); + return; + } + xine_monotonic_clock(&tv,NULL); pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor; @@ -82,11 +94,6 @@ this->cur_time.tv_sec=tv.tv_sec; this->cur_time.tv_usec=tv.tv_usec; this->cur_pts=pts; - - this->last_time.tv_sec = tv.tv_sec; - this->last_time.tv_usec = tv.tv_usec; - - return ; } /* @@ -127,9 +134,6 @@ this->cur_time.tv_usec=tv.tv_usec; this->cur_pts = vpts; - this->last_time.tv_sec = tv.tv_sec; - this->last_time.tv_usec = tv.tv_usec; - pthread_mutex_unlock (&this->lock); } @@ -142,9 +146,6 @@ xine_monotonic_clock(&this->cur_time, NULL); this->cur_pts = start_vpts; - this->last_time.tv_sec = this->cur_time.tv_sec; - this->last_time.tv_usec = this->cur_time.tv_usec; - pthread_mutex_unlock (&this->lock); scr_set_fine_speed (&this->scr, XINE_FINE_SPEED_NORMAL); @@ -157,17 +158,22 @@ struct timeval tv; int64_t pts; double pts_calc; + pthread_mutex_lock (&this->lock); + pts = this->cur_pts; + + if (this->buffering) { + pthread_mutex_unlock (&this->lock); + return pts; + } + xine_monotonic_clock(&tv,NULL); pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor; pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6; - pts = this->cur_pts + pts_calc; - - this->last_time.tv_sec = tv.tv_sec; - this->last_time.tv_usec = tv.tv_usec; + pts += pts_calc; pthread_mutex_unlock (&this->lock); @@ -244,6 +250,45 @@ } /* + * got_pcr() + * + * - Synchronize clock to incoming PCR values + */ +static void adjustable_scr_got_pcr (adjustable_scr_t *scr, int64_t pcr) +{ +} + +/* + * set_buffering() + * + * - Clock is freezed while buffering + */ +static void adjustable_scr_set_buffering (adjustable_scr_t *scr, int buffering) +{ + scr_impl_t *this = (scr_impl_t*) scr; + + pthread_mutex_lock (&this->lock); + + if (buffering) { + if (!this->buffering) { + set_pivot( this ); + this->buffering = 1; + this->buffering_start_time = time_ms(); + LOGMSG("start buffering at %"PRId64, this->cur_pts); + } + } else { + if (this->buffering) { + set_pivot( this ); + this->buffering = 0; + LOGMSG("stop buffering at %"PRId64" (buffering took %"PRIu64" ms)", + this->cur_pts, elapsed(this->buffering_start_time)); + } + } + + pthread_mutex_unlock (&this->lock); +} + +/* * dispose() * * - unregister, stop and free resources @@ -283,6 +328,8 @@ this->ascr.set_speed_tuning = adjustable_scr_speed_tuning; this->ascr.set_speed_base = adjustable_scr_speed_base; this->ascr.jump = adjustable_scr_jump; + this->ascr.got_pcr = adjustable_scr_got_pcr; + this->ascr.set_buffering = adjustable_scr_set_buffering; this->ascr.dispose = adjustable_scr_dispose; /* initialize */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/adjustable_scr.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/adjustable_scr.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/adjustable_scr.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/adjustable_scr.h 2012-03-22 12:03:37.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: adjustable_scr.h,v 1.1 2008/12/03 22:50:04 phintuka Exp $ + * $Id: adjustable_scr.h,v 1.3 2012/03/22 12:03:37 phintuka Exp $ * */ @@ -28,6 +28,9 @@ void (*set_speed_base) (adjustable_scr_t *this, int hz); void (*jump) (adjustable_scr_t *this, int pts); + void (*set_buffering) (adjustable_scr_t *this, int on); + void (*got_pcr) (adjustable_scr_t *this, int64_t pcr); + void (*dispose) (adjustable_scr_t *this); }; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/demux_xvdr.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/demux_xvdr.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/demux_xvdr.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/demux_xvdr.c 2012-06-08 06:59:27.000000000 +0000 @@ -63,8 +63,7 @@ * constants */ -#define DISC_TRESHOLD 90000 -#define WRAP_THRESHOLD 120000 +#define WRAP_THRESHOLD 360000 /* 4 sec */ #define PTS_AUDIO 0 #define PTS_VIDEO 1 @@ -249,11 +248,10 @@ _x_demux_control_newpts(this->stream, buf->pts, 0); } this->send_newpts = 0; - - this->last_pts[1-video] = 0; } this->last_pts[video] = buf->pts; + this->last_pts[1-video] = buf->pts; } } @@ -576,7 +574,7 @@ if (ts_parse_pmt(&ts_data->pmt, ts_data->program_number, buf->content)) { /* PMT changed, reset ts->es converters */ - LOGMSG("PMT changed, resetting demuxer"); + LOGDBG("PMT changed, resetting demuxer"); ts_data_ts2es_init(&ts_data, this->stream->video_fifo, this->stream->audio_fifo); this->video_type = (ts_data->pmt.video_type == ISO_14496_PART10_VIDEO) ? @@ -604,7 +602,7 @@ /* demux audio */ else { - int i, done = 0; + int i/*, done = 0*/; for (i=0; i < ts_data->pmt.audio_tracks_count; i++) if (ts_pid == ts_data->pmt.audio_tracks[i].pid) { if (ts_data->audio[i]) { @@ -616,7 +614,7 @@ this->stream->audio_fifo->put(this->stream->audio_fifo, abuf); } } - done = 1; + /*done = 1;*/ break; } #if 0 @@ -995,7 +993,7 @@ p += result; - if (this->video_type == 0 && buf->size >= 4) { + if (this->video_type == 0 && buf->size >= result + 4) { this->video_type = detect_h264(p); } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/osd_manager.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/osd_manager.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/osd_manager.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/osd_manager.c 2013-01-17 21:05:16.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd_manager.c,v 1.23 2011/03/07 12:36:39 phintuka Exp $ + * $Id: osd_manager.c,v 1.27 2013/01/17 21:05:16 phintuka Exp $ * */ @@ -46,6 +46,11 @@ uint16_t video_window_h; int64_t last_changed_vpts; + +#ifdef VO_CAP_ARGB_LAYER_OVERLAY + argb_layer_t *argb_layer; + uint32_t *argb_buffer; +#endif } osd_data_t; typedef struct osd_manager_impl_s { @@ -68,6 +73,50 @@ /************************************* Tools ************************************/ /* + * argb layer (originally copied from xine - why aren't these functions exported ?) + */ + +#ifdef VO_CAP_ARGB_LAYER_OVERLAY +static argb_layer_t *argb_layer_create() { + + argb_layer_t *argb_layer = (argb_layer_t *)calloc(1, sizeof (argb_layer_t)); + + pthread_mutex_init(&argb_layer->mutex, NULL); + + return argb_layer; +} + +static void argb_layer_destroy(argb_layer_t *argb_layer) { + + pthread_mutex_destroy(&argb_layer->mutex); + free(argb_layer); +} + +static void set_argb_layer(argb_layer_t **dst, argb_layer_t *src) { + + if (src) { + pthread_mutex_lock(&src->mutex); + ++src->ref_count; + pthread_mutex_unlock(&src->mutex); + } + + if (*dst) { + int free_argb_layer; + + pthread_mutex_lock(&(*dst)->mutex); + free_argb_layer = (0 == --(*dst)->ref_count); + pthread_mutex_unlock(&(*dst)->mutex); + + if (free_argb_layer) + argb_layer_destroy(*dst); + } + + *dst = src; +} +#endif /* VO_CAP_ARGB_LAYER_OVERLAY */ + + +/* * acquire_ticket() */ static void acquire_ticket(osd_manager_impl_t *this) @@ -258,6 +307,12 @@ acquire_ticket(this); +#ifdef VO_CAP_ARGB_LAYER_OVERLAY + set_argb_layer(&osd->argb_layer, NULL); + free(osd->argb_buffer); + osd->argb_buffer = NULL; +#endif + xine_video_port_t *video_out = this->stream->video_out; this->vo_scaling = !!(video_out->get_capabilities(video_out) & VO_XCAP_OSDSCALING); @@ -348,6 +403,12 @@ osd->extent_height = 576; osd->last_changed_vpts = 0; +#ifdef VO_CAP_ARGB_LAYER_OVERLAY + set_argb_layer(&osd->argb_layer, NULL); + free(osd->argb_buffer); + osd->argb_buffer = NULL; +#endif + return CONTROL_OK; } @@ -537,8 +598,156 @@ static int exec_osd_set_argb(osd_manager_impl_t *this, osd_command_t *cmd) { - LOGMSG("OSD_Set_ARGB not implemented"); +#ifdef VO_CAP_ARGB_LAYER_OVERLAY + video_overlay_manager_t *ovl_manager = get_ovl_manager(this); + video_overlay_event_t ov_event = {0}; + vo_overlay_t ov_overlay = {0}; + osd_data_t *osd = &this->osd[cmd->wnd]; + int handle = osd->handle; + + if (!ovl_manager) + return CONTROL_PARAM_ERROR; + + if (!this->mgr.argb_supported(this->stream)) { + LOGMSG("ARGB overlay not supported by video driver"); + return CONTROL_PARAM_ERROR; + } + + if (osd->extent_width < 32 || osd->extent_height < 32) { + LOGMSG("ARGB overlay: incorrect extent"); + return CONTROL_PARAM_ERROR; + } + + this->stream->video_out->enable_ovl(this->stream->video_out, 1); + + /* get / allocate OSD handle */ + if (handle < 0) { + handle = ovl_manager->get_handle(ovl_manager,0); + osd->handle = handle; + osd->extent_width = osd->extent_width ?: 720; + osd->extent_height = osd->extent_height ?: 576; + osd->last_changed_vpts = 0; + } + + /* fill SHOW event */ + ov_event.event_type = OVERLAY_EVENT_SHOW; + ov_event.vpts = osd_exec_vpts(this, cmd); + ov_event.object.handle = handle; + ov_event.object.overlay = &ov_overlay; + ov_event.object.object_type = 1; /* menu */ + + /* ARGB overlays are not cached for re-scaling */ + clear_osdcmd(&osd->cmd); + + /* fill ov_overlay */ + ov_overlay.x = 0; + ov_overlay.y = 0; + ov_overlay.width = osd->extent_width; + ov_overlay.height = osd->extent_height; + + /* tag this overlay */ + ov_overlay.hili_rgb_clut = VDR_OSD_MAGIC; + + /* fill extra data */ + const vdr_osd_extradata_t extra_data = { + extent_width: osd->extent_width, + extent_height: osd->extent_height, + layer: cmd->layer, + scaling: cmd->scaling + }; + memcpy(ov_overlay.hili_color, &extra_data, sizeof(extra_data)); + + /* xine-lib 1.2 extensions */ + ov_overlay.extent_width = osd->extent_width; + ov_overlay.extent_height = osd->extent_height; + ov_overlay.video_window_x = osd->video_window_x ?: -1; + ov_overlay.video_window_y = osd->video_window_y ?: -1; + ov_overlay.video_window_width = osd->video_window_w ?: -1; + ov_overlay.video_window_height = osd->video_window_h ?: -1; + + /* this should trigger blending at output resolution (after scaling video frame) ... */ + //ov_overlay.unscaled = 1; + ov_overlay.unscaled = cmd->flags & OSDFLAG_UNSCALED ? 1 : 0; + + /* allocate buffer */ + if (!osd->argb_buffer) { + osd->argb_buffer = calloc(sizeof(uint32_t), osd->extent_width * osd->extent_height); + } + if (!osd->argb_layer) { + set_argb_layer(&osd->argb_layer, argb_layer_create()); + osd->argb_layer->buffer = osd->argb_buffer; + osd->argb_layer->x1 = 0; + osd->argb_layer->x2 = osd->extent_width - 1; + osd->argb_layer->y1 = 0; + osd->argb_layer->y2 = osd->extent_height - 1; + } + + /* copy changed data to buffer */ + /* TODO: do we need double-buffering or locking to prevent tearing ? */ + + uint32_t *src = (uint32_t*)cmd->raw_data; + uint32_t* dst = osd->argb_buffer; + int stride = cmd->w; + int lines = cmd->h; + + /* clip */ + if (cmd->x + cmd->w > osd->extent_width) { + stride = osd->extent_width - cmd->x; + if (stride < 0) stride = 0; + LOGMSG("ARGB overlay: incorrect extent, cropping right side"); + } + if (cmd->y + cmd->h > osd->extent_height) { + lines = osd->extent_height - cmd->y; + LOGMSG("ARGB overlay: incorrect extent, cropping bottom"); + } + + /* blend */ + dst += cmd->y * osd->extent_width + cmd->x; + for (; lines > 0; lines--) { + memcpy(dst, src, stride * sizeof(uint32_t)); + src += cmd->w; + dst += osd->extent_width; + } + + /* set dirty area. not used in opengl2 driver ... */ +#if 0 + /* this can't work... There's no way to know if driver has + copied the dirty area to display. So dirty area can never be + shrinked, just expanded ... */ + osd->argb_layer->x1 = cmd->x; + osd->argb_layer->x2 = cmd->x + cmd->w - 1; + osd->argb_layer->y1 = cmd->y; + osd->argb_layer->y2 = cmd->y + cmd->h - 1; +#else + /* argb layer update area accumulation */ +#define MIN(a,b) ((a)<(b)?(a):(b)) +#define MAX(a,b) ((a)>(b)?(a):(b)) + osd->argb_layer->x1 = MIN( osd->argb_layer->x1, cmd->x ); + osd->argb_layer->x2 = MAX( osd->argb_layer->x2, cmd->x + cmd->w ); + osd->argb_layer->y1 = MIN( osd->argb_layer->y1, cmd->y ); + osd->argb_layer->y2 = MAX( osd->argb_layer->y2, cmd->y + cmd->h ); +#endif + + /* set buffer (ref-counted) */ + set_argb_layer(&ov_overlay.argb_layer, osd->argb_layer); + + /* send event to overlay manager */ + while (ovl_manager->add_event(ovl_manager, (void *)&ov_event) < 0) { + LOGMSG("OSD_Set_ARGB(%d): overlay manager queue full !", cmd->wnd); + ovl_manager->flush_events(ovl_manager); + } + + /* release buffer (ref-counted) */ + set_argb_layer(&ov_overlay.argb_layer, NULL); + + osd->last_changed_vpts = ov_event.vpts ?: xine_get_current_vpts(this->stream); + + return CONTROL_OK; + +#else /* VO_CAP_ARGB_LAYER_OVERLAY */ + LOGMSG("OSD_Set_ARGB: plugin was build without ARGB support"); return CONTROL_PARAM_ERROR; +#endif } /* @@ -743,6 +952,16 @@ pthread_mutex_unlock(&this->lock); } +static int argb_supported(xine_stream_t *stream) +{ +#ifdef VO_CAP_ARGB_LAYER_OVERLAY + xine_video_port_t *video_out = stream->video_out; + return !!(video_out->get_capabilities(video_out) & VO_CAP_ARGB_LAYER_OVERLAY); +#else + return 0; +#endif +} + /* * osd_manager_dispose() */ @@ -787,6 +1006,7 @@ this->mgr.command = exec_osd_command; this->mgr.dispose = osd_manager_dispose; this->mgr.video_size_changed = video_size_changed; + this->mgr.argb_supported = argb_supported; pthread_mutex_init(&this->lock, NULL); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/osd_manager.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/osd_manager.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/osd_manager.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/osd_manager.h 2013-01-15 20:33:29.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd_manager.h,v 1.1 2008/12/06 16:17:18 phintuka Exp $ + * $Id: osd_manager.h,v 1.2 2013/01/15 20:33:29 phintuka Exp $ * */ @@ -28,6 +28,8 @@ void (*dispose)(osd_manager_t *, xine_stream_t *); void (*video_size_changed)(osd_manager_t *, xine_stream_t *, int width, int height); + + int (*argb_supported)(xine_stream_t *); }; osd_manager_t *init_osd_manager(void); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/post.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/post.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/post.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/post.c 2012-01-16 11:43:13.000000000 +0000 @@ -419,7 +419,6 @@ } else { const xine_post_in_t *vo_in; - int err; /* look for standard input names */ vo_in = xine_post_input(post_elements[i + 1]->post, "video"); @@ -428,8 +427,8 @@ LOGDBG(" wiring %10s[out] -> [in]%-10s ", post_elements[i]->name, post_elements[i+1]->name); - err = xine_post_wire((xine_post_out_t *) vo_out, - (xine_post_in_t *) vo_in); + xine_post_wire((xine_post_out_t *) vo_out, + (xine_post_in_t *) vo_in); } } @@ -466,7 +465,6 @@ } else { const xine_post_in_t *ao_in; - int err; /* look for standard input names */ ao_in = xine_post_input(post_elements[i + 1]->post, "audio"); @@ -475,7 +473,7 @@ LOGDBG(" wiring %10s[out] -> [in]%-10s ", post_elements[i]->name, post_elements[i+1]->name); - err = xine_post_wire((xine_post_out_t *) ao_out, (xine_post_in_t *) ao_in); + xine_post_wire((xine_post_out_t *) ao_out, (xine_post_in_t *) ao_in); } } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/ts2es.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/ts2es.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/ts2es.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/ts2es.c 2013-01-07 08:52:16.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: ts2es.c,v 1.14 2011/09/15 07:21:29 phintuka Exp $ + * $Id: ts2es.c,v 1.22 2013/01/07 08:52:16 phintuka Exp $ * */ @@ -28,9 +28,10 @@ uint32_t xine_buf_type; buf_element_t *buf; - int first_pusi_seen; - int video; - int pes_error; + int pes_len; /* PES payload length left */ + uint8_t first_pusi_seen; + uint8_t video; + uint8_t pes_error; }; @@ -46,11 +47,25 @@ /* parse PES header */ uint hdr_len = PES_HEADER_LEN(this->buf->content); uint8_t pes_pid = this->buf->content[3]; - uint pes_len = (this->buf->content[4] << 8) | this->buf->content[5]; + + /* Check if header is complete */ + if (this->buf->size < 9 || this->buf->size < hdr_len) { + LOGMSG("ts2es: PES header not in first TS fragment"); + this->pes_error = 1; + return; + } + + /* Check if PES packet size is known */ + this->pes_len = (this->buf->content[4] << 8) | this->buf->content[5]; + if (this->pes_len > hdr_len + 6) { + this->pes_len += 6; + } else { + this->pes_len = 0; + } /* parse PTS */ this->buf->pts = pes_get_pts(this->buf->content, this->buf->size); - if (this->buf->pts <= 0) + if (this->buf->pts < 0) this->buf->pts = 0; /* parse DTS */ @@ -66,6 +81,17 @@ /* parse substream header */ + if (this->stream_type == HDMV_AUDIO_80_PCM) { + + this->buf->decoder_flags |= BUF_FLAG_SPECIAL; + this->buf->decoder_info[1] = BUF_SPECIAL_LPCM_CONFIG; + this->buf->decoder_info[2] = (this->buf->content[3] << 24) | (this->buf->content[2] << 16) | + (this->buf->content[1] << 8) | this->buf->content[0]; + this->buf->content += 4; + this->buf->size -= 4; + return; + } + if (pes_pid != PRIVATE_STREAM1) return; @@ -127,7 +153,9 @@ if (this->buf->content[0] != 0x20 || this->buf->content[1] != 0x00) LOGMSG("ts2es: DVB SPU, invalid PES substream header"); - this->buf->decoder_info[2] = pes_len - hdr_len - 3 + 9; + if (this->pes_len > hdr_len) { + this->buf->decoder_info[2] = this->pes_len - hdr_len; + } return; } } @@ -143,7 +171,7 @@ return NULL; } if (!ts_HAS_PAYLOAD(data)) { - LOGDBG("ts2es: no payload, size %d", bytes); + LOGVERBOSE("ts2es: no payload, size %d", bytes); return NULL; } @@ -212,6 +240,18 @@ ts2es_parse_pes(this); } + /* check if PES packet is complete */ + if (this->pes_len > 0) { + if (this->pes_len <= bytes) { + this->buf->decoder_flags |= BUF_FLAG_FRAME_END; + result = this->buf; + this->buf = NULL; + this->pes_error = 1; /* to drop rest of data */ + } else { + this->pes_len -= bytes; + } + } + return result; } @@ -258,6 +298,9 @@ case ISO_14496_PART10_VIDEO: data->xine_buf_type = BUF_VIDEO_H264; break; + case STREAM_VIDEO_VC1: + data->xine_buf_type = BUF_VIDEO_VC1; + break; /* AUDIO (PES streams 0xc0...0xdf) */ case ISO_11172_AUDIO: @@ -286,18 +329,27 @@ /* RAW AC3 */ case STREAM_AUDIO_AC3: + case HDMV_AUDIO_83_TRUEHD: data->xine_buf_type = BUF_AUDIO_A52; break; /* EAC3 (xine-lib > 1.1.18.1) */ #ifdef BUF_AUDIO_EAC3 case STREAM_AUDIO_EAC3: + case HDMV_AUDIO_84_EAC3: data->xine_buf_type = BUF_AUDIO_EAC3; break; #endif + case HDMV_AUDIO_80_PCM: + data->xine_buf_type = BUF_AUDIO_LPCM_BE; + break; + /* DTS (PES stream 0xbd) */ - case STREAM_AUDIO_DTS: + case STREAM_AUDIO_DTS: + case HDMV_AUDIO_82_DTS: + case HDMV_AUDIO_85_DTS_HRA: + case HDMV_AUDIO_86_DTS_HD_MA: data->xine_buf_type = BUF_AUDIO_DTS; break; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_frameoutput.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_frameoutput.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_frameoutput.c 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_frameoutput.c 2012-03-07 08:27:40.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * vo_frameoutput.c: + * + * See the main source file 'xineliboutput.c' for copyright information and + * how to reach the author. + * + * $Id: vo_frameoutput.c,v 1.1 2012/03/07 08:27:40 phintuka Exp $ + * + */ + +#include + +#include +#include + +#include "vo_hook.h" + +#define LOG_MODULENAME "[frame_out] " +#include "../logdefs.h" + +#include "vo_frameoutput.h" + + +/* + * frameoutput_hook_t + */ +typedef struct { + vo_driver_hook_t h; + + /* callback */ + void *handle; + void (*cb)(void *, vo_frame_t *); + +} frameoutput_hook_t; + +/* + * interface + */ + +/* + * override display_frame() + */ + +static void display_frame(vo_driver_t *self, vo_frame_t *vo_img) +{ + frameoutput_hook_t *this = (frameoutput_hook_t*)self; + + ASSERT_RET(self, return); + ASSERT_RET(vo_img, return); + + if (this->cb) + this->cb(this->handle, vo_img); + + this->h.orig_driver->display_frame(this->h.orig_driver, vo_img); +} + + +/* + * init() + */ +vo_driver_t *vo_frameoutput_init(void *handle, void (*cb)(void*, vo_frame_t*)) +{ + frameoutput_hook_t *this = calloc(1, sizeof(frameoutput_hook_t)); + + this->h.vo.display_frame = display_frame; + + this->handle = handle; + this->cb = cb; + + return &this->h.vo; +} + diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_frameoutput.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_frameoutput.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_frameoutput.h 1970-01-01 00:00:00.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_frameoutput.h 2012-03-07 08:27:40.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * vo_frameoutput.h: + * + * See the main source file 'xineliboutput.c' for copyright information and + * how to reach the author. + * + * $Id: vo_frameoutput.h,v 1.1 2012/03/07 08:27:40 phintuka Exp $ + * + */ + +#ifndef _XINELIBOUTPUT_VO_FRAMEOUTPUT_H +#define _XINELIBOUTPUT_VO_FRAMEOUTPUT_H + +vo_driver_t *vo_frameoutput_init(void *handle, void (*cb)(void*, vo_frame_t*)); + +#endif /* _XINELIBOUTPUT_VO_FRAMEOUTPUT_H */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_lastpts.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_lastpts.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_lastpts.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_lastpts.c 2012-03-10 20:56:30.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: vo_lastpts.c,v 1.5 2011/11/22 12:23:24 phintuka Exp $ + * $Id: vo_lastpts.c,v 1.7 2012/03/10 20:56:30 phintuka Exp $ * */ @@ -21,6 +21,7 @@ #define LOG_MODULENAME "[lastpts ] " #include "../logdefs.h" +#include "vo_lastpts.h" /* * lastpts_hook_t @@ -35,7 +36,7 @@ static void detect_xvdr_metronom(lastpts_hook_t *this, xine_stream_t *stream) { if (stream->metronom->get_option(stream->metronom, XVDR_METRONOM_ID) == XVDR_METRONOM_ID) { - LOGMSG("new stream is vdr stream"); + LOGDBG("new stream is vdr stream"); this->xvdr_metronom = stream->metronom; this->xvdr_stream = stream; } @@ -65,7 +66,7 @@ * This prevents flooding log with "unknown option in set_option" messages */ if (vo_img->stream != this->prev_stream) { - LOGMSG("stream changed from %p to %p", this->prev_stream, vo_img->stream); + LOGDBG("stream changed from %p to %p", this->prev_stream, vo_img->stream); this->prev_stream = vo_img->stream; detect_xvdr_metronom(this, vo_img->stream); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_osdreorder.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_osdreorder.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_osdreorder.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_osdreorder.c 2012-03-07 08:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: vo_osdreorder.c,v 1.1 2009/03/17 12:14:41 phintuka Exp $ + * $Id: vo_osdreorder.c,v 1.2 2012/03/07 08:25:37 phintuka Exp $ * */ @@ -15,6 +15,8 @@ #include "vo_props.h" #include "vo_hook.h" +#include "vo_osdreorder.h" + /* * osdreorder_hook_t */ diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_osdscaler.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_osdscaler.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/vo_osdscaler.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/vo_osdscaler.c 2013-01-16 13:25:44.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: vo_osdscaler.c,v 1.12 2010/06/01 12:08:30 phintuka Exp $ + * $Id: vo_osdscaler.c,v 1.14 2013/01/16 13:25:44 phintuka Exp $ * */ @@ -29,6 +29,8 @@ #include "../tools/rle.h" +#include "vo_osdscaler.h" + /* Make sure our properties won't overlap with xine's properties */ #if VO_NUM_PROPERTIES > VO_PROP_OSD_SCALING @@ -262,17 +264,18 @@ return 0; } -#if 0 +#ifdef VO_CAP_CUSTOM_EXTENT_OVERLAY if (this->custom_extent_supported) { /* let the "real" video driver do scaling */ + LOGOSD("let the driver to scale overlay"); + overlay->extent_width = extent_width; + overlay->extent_height = extent_height; return 0; } -#else -# ifdef VO_CAP_CUSTOM_EXTENT_OVERLAY + /* disable VDPAU HW scaler */ overlay->extent_width = 0; overlay->extent_height = 0; -# endif #endif if (extent_width < 128 || extent_height < 128) { diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/xvdr_metronom.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/xvdr_metronom.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/xvdr_metronom.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/xvdr_metronom.c 2012-03-26 18:49:34.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.c,v 1.14 2011/11/22 09:43:27 phintuka Exp $ + * $Id: xvdr_metronom.c,v 1.21 2012/03/26 18:49:34 phintuka Exp $ * */ @@ -13,26 +13,85 @@ #include #include +#include "../tools/time_ms.h" + #define LOG_MODULENAME "[metronom ] " #define SysLogLevel iSysLogLevel #include "../logdefs.h" +#include "adjustable_scr.h" + #define XVDR_METRONOM_COMPILE #include "xvdr_metronom.h" +static int warnings = 0; + +static int64_t absdiff(int64_t a, int64_t b) { int64_t diff = a-b; if (diff<0) diff = -diff; return diff; } +static int64_t min64(int64_t a, int64_t b) { return a < b ? a : b; } + +static void check_buffering_done(xvdr_metronom_t *this) +{ + /* both audio and video timestamps seen ? */ + if (this->vid_pts && this->aud_pts) { + int64_t da = this->aud_pts - this->disc_pts; + int64_t dv = this->vid_pts - this->disc_pts; + int64_t d_min = min64(da, dv); + LOGMSG(" stream A-V diff %d ms", (int)(this->vid_pts - this->aud_pts)/90); + LOGMSG(" reported stream start at pts %"PRId64, this->disc_pts); + LOGMSG(" output fifo end at: audio %"PRId64" video %"PRId64, this->aud_pts, this->vid_pts); + LOGMSG(" dA %"PRId64" dV %"PRId64, da, dv); + if (d_min < 0 && d_min > -10*90000) { + LOGMSG(" *** output is late %"PRId64" ticks (%"PRId64" ms) ***", d_min, -d_min/90); + this->scr->jump(this->scr, d_min); + } + this->buffering = 0; + this->stream_start = 0; + this->scr->set_buffering(this->scr, 0); + return; + } + + if (this->first_frame_seen_time) { + int64_t ms_since_first_frame = elapsed(this->first_frame_seen_time); + + if (ms_since_first_frame > 1000) { + + this->stream_start = 0; + + /* abort buffering if no audio */ + if (this->vid_pts && !this->aud_pts) { + LOGMSG("buffering stopped: NO AUDIO ? elapsed time %d ms", (int)ms_since_first_frame); + this->buffering = 0; + this->scr->set_buffering(this->scr, 0); + return; + } + + /* abort buffering if no video */ + if (!this->vid_pts && this->aud_pts) { + LOGMSG("buffering stopped: NO VIDEO ? elapsed time %d ms", (int)ms_since_first_frame); + this->buffering = 0; + this->scr->set_buffering(this->scr, 0); + return; + } + } + } +} static void got_video_frame(metronom_t *metronom, vo_frame_t *frame) { xvdr_metronom_t *this = (xvdr_metronom_t *)metronom; int64_t pts = frame->pts; - this->video_frames++; - - if (this->frame_decoded) - this->frame_decoded(this->handle, this->video_frames, this->audio_frames); +#if 1 /* xine-lib master-slave metronom causes some problems ... */ + if (metronom->got_video_frame != got_video_frame) { + if (!warnings++) + LOGMSG("got_video_frame: invalid object"); + return; + } + warnings = 0; +#endif if (this->still_mode) { - LOGMSG("Still frame, type %d", frame->picture_coding_type); + LOGVERBOSE("Still frame, type %d", frame->picture_coding_type); frame->pts = 0; } @@ -41,6 +100,40 @@ frame->duration *= 12; /* GOP */ } + /* initial buffering */ + pthread_mutex_lock(&this->mutex); + if (this->buffering && !frame->bad_frame) { + + /* track video pts */ + if (pts) { + if (this->vid_pts && (absdiff(this->vid_pts, pts) > 5*90000)) { + LOGMSG("buffering: video jump resetted audio pts"); + this->aud_pts = 0; + } + if (this->vid_pts && this->aud_pts && (absdiff(this->vid_pts, this->aud_pts) > 5*90000)) { + LOGMSG("buffering: A-V diff resetted audio pts"); + this->aud_pts = 0; + } + if (!this->vid_pts) { + LOGMSG("got video pts, frame type %d (@%d ms)", frame->picture_coding_type, (int)elapsed(this->buffering_start_time)); + this->first_frame_seen_time = time_ms(); + } + this->vid_pts = pts; + } + + /* some logging */ + if (!pts) { + LOGMSG("got video, pts 0, buffering, frame type %d, bad_frame %d", frame->picture_coding_type, frame->bad_frame); + } + if (pts && !frame->pts) { + LOGMSG("*** ERROR: hiding video pts while buffering ***"); + } + + check_buffering_done(this); + } + + pthread_mutex_unlock(&this->mutex); + this->orig_metronom->got_video_frame (this->orig_metronom, frame); frame->pts = pts; @@ -50,10 +143,37 @@ { xvdr_metronom_t *this = (xvdr_metronom_t *)metronom; - this->audio_frames++; + pthread_mutex_lock(&this->mutex); + + /* initial buffering */ + if (this->buffering) { - if (this->frame_decoded) - this->frame_decoded(this->handle, this->video_frames, this->audio_frames); + /* track audio pts */ + if (pts) { + if (this->aud_pts && (this->aud_pts > pts || absdiff(pts, this->aud_pts) > 5*90000)) { + LOGMSG("audio jump resetted video pts"); + this->vid_pts = 0; + } + if (this->aud_pts && this->vid_pts && (absdiff(this->vid_pts, this->aud_pts) > 5*90000)) { + LOGMSG("buffering: A-V diff resetted video pts"); + this->vid_pts = 0; + } + if (!this->aud_pts) { + LOGMSG("got audio pts (@%d ms)", (int)elapsed(this->buffering_start_time)); + this->first_frame_seen_time = time_ms(); + } + this->aud_pts = pts; + } + + /* some logging */ + if (!pts && !this->aud_pts) { + LOGMSG("got audio, pts 0, buffering"); + } + + check_buffering_done(this); + } + + pthread_mutex_unlock(&this->mutex); return this->orig_metronom->got_audio_samples (this->orig_metronom, pts, nsamples); } @@ -68,15 +188,45 @@ return this->orig_metronom->got_spu_packet(this->orig_metronom, pts); } +static void start_buffering(xvdr_metronom_t *this, int64_t disc_off) +{ + if (this->live_buffering && this->stream_start && disc_off) { + if (!this->buffering) { + LOGMSG("live mode buffering started (@%d ms)", (int)elapsed(this->buffering_start_time)); + + this->aud_pts = 0; + this->vid_pts = 0; + this->disc_pts = disc_off; + + this->first_frame_seen_time = 0; + + this->buffering = 1; + this->scr->set_buffering(this->scr, 1); + } + } else { + if (this->buffering) { + LOGMSG("live mode buffering aborted (@%d ms)", (int)elapsed(this->buffering_start_time)); + this->buffering = 0; + this->scr->set_buffering(this->scr, 0); + } + } +} + static void handle_audio_discontinuity(metronom_t *metronom, int type, int64_t disc_off) { xvdr_metronom_t *this = (xvdr_metronom_t *)metronom; + + start_buffering(this, disc_off); + this->orig_metronom->handle_audio_discontinuity(this->orig_metronom, type, disc_off); } static void handle_video_discontinuity(metronom_t *metronom, int type, int64_t disc_off) { xvdr_metronom_t *this = (xvdr_metronom_t *)metronom; + + start_buffering(this, disc_off); + this->orig_metronom->handle_video_discontinuity(this->orig_metronom, type, disc_off); } @@ -92,13 +242,38 @@ if (option == XVDR_METRONOM_LAST_VO_PTS) { if (value > 0) { - pthread_mutex_lock(&this->pts_mutex); + pthread_mutex_lock(&this->mutex); this->last_vo_pts = value; - pthread_mutex_unlock(&this->pts_mutex); + pthread_mutex_unlock(&this->mutex); } return; } + if (option == XVDR_METRONOM_LIVE_BUFFERING) { + pthread_mutex_lock(&this->mutex); + this->live_buffering = value; + pthread_mutex_unlock(&this->mutex); + return; + } + + if (option == XVDR_METRONOM_STREAM_START) { + pthread_mutex_lock(&this->mutex); + this->stream_start = 1; + this->buffering_start_time = time_ms(); + pthread_mutex_unlock(&this->mutex); + return; + } + + if (option == XVDR_METRONOM_TRICK_SPEED) { + this->trickspeed = value; + return; + } + + if (option == XVDR_METRONOM_STILL_MODE) { + this->still_mode = value; + return; + } + this->orig_metronom->set_option(this->orig_metronom, option, value); } @@ -108,9 +283,9 @@ if (option == XVDR_METRONOM_LAST_VO_PTS) { int64_t pts; - pthread_mutex_lock(&this->pts_mutex); + pthread_mutex_lock(&this->mutex); pts = this->last_vo_pts; - pthread_mutex_unlock(&this->pts_mutex); + pthread_mutex_unlock(&this->mutex); return pts; } if (option == XVDR_METRONOM_TRICK_SPEED) { @@ -154,29 +329,6 @@ * xvdr_metronom_t */ -static void xvdr_metronom_set_cb(xvdr_metronom_t *this, - void (*cb)(void*, uint, uint), - void *handle) -{ - this->handle = handle; - this->frame_decoded = cb; -} - -static void xvdr_metronom_reset_frames(xvdr_metronom_t *this) -{ - this->video_frames = this->audio_frames = 0; -} - -static void xvdr_metronom_set_trickspeed(xvdr_metronom_t *this, int trickspeed) -{ - this->trickspeed = trickspeed; -} - -static void xvdr_metronom_set_still_mode(xvdr_metronom_t *this, int still_mode) -{ - this->still_mode = still_mode; -} - static void xvdr_metronom_wire(xvdr_metronom_t *this) { if (!this->stream) { @@ -211,7 +363,7 @@ { xvdr_metronom_unwire(this); - pthread_mutex_destroy(&this->pts_mutex); + pthread_mutex_destroy(&this->mutex); free(this); } @@ -224,7 +376,7 @@ { if (stream->metronom->get_option(stream->metronom, XVDR_METRONOM_ID) == XVDR_METRONOM_ID) { LOGMSG("xvdr_metronom_init(): stream already hooked !"); - return stream->metronom; + return (xvdr_metronom_t*)stream->metronom; } xvdr_metronom_t *this = calloc(1, sizeof(xvdr_metronom_t)); @@ -232,10 +384,6 @@ this->stream = stream; this->orig_metronom = stream->metronom; - this->set_cb = xvdr_metronom_set_cb; - this->reset_frames = xvdr_metronom_reset_frames; - this->set_trickspeed = xvdr_metronom_set_trickspeed; - this->set_still_mode = xvdr_metronom_set_still_mode; this->wire = xvdr_metronom_wire; this->unwire = xvdr_metronom_unwire; this->dispose = xvdr_metronom_dispose; @@ -252,7 +400,7 @@ this->metronom.exit = metronom_exit; - pthread_mutex_init(&this->pts_mutex, NULL); + pthread_mutex_init(&this->mutex, NULL); xvdr_metronom_wire(this); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/xvdr_metronom.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/xvdr_metronom.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine/xvdr_metronom.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine/xvdr_metronom.h 2012-03-26 18:49:34.000000000 +0000 @@ -4,42 +4,45 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.h,v 1.8 2011/10/25 06:36:04 phintuka Exp $ + * $Id: xvdr_metronom.h,v 1.14 2012/03/26 18:49:34 phintuka Exp $ * */ #ifndef XVDR_METRONOM_H #define XVDR_METRONOM_H +#include -#define XVDR_METRONOM_LAST_VO_PTS 0x1001 -#define XVDR_METRONOM_TRICK_SPEED 0x1002 -#define XVDR_METRONOM_STILL_MODE 0x1003 -#define XVDR_METRONOM_ID 0x1004 +#ifdef METRONOM_INTERNAL +# error METRONOM_INTERNAL defined, struct xvdr_metronom_s size will be incorrect +#endif + +#define XVDR_METRONOM_OPTION_BASE 0x1001 +#define XVDR_METRONOM_LAST_VO_PTS (XVDR_METRONOM_OPTION_BASE) +#define XVDR_METRONOM_TRICK_SPEED (XVDR_METRONOM_OPTION_BASE + 1) +#define XVDR_METRONOM_STILL_MODE (XVDR_METRONOM_OPTION_BASE + 2) +#define XVDR_METRONOM_ID (XVDR_METRONOM_OPTION_BASE + 3) + +#define XVDR_METRONOM_LIVE_BUFFERING (XVDR_METRONOM_OPTION_BASE + 4) +#define XVDR_METRONOM_STREAM_START (XVDR_METRONOM_OPTION_BASE + 5) typedef struct xvdr_metronom_s xvdr_metronom_t; +struct adjustable_scr_s; + struct xvdr_metronom_s { /* xine-lib metronom interface */ metronom_t metronom; /* management interface */ - void (*set_cb) (xvdr_metronom_t *, - void (*cb) (void *, uint, uint), - void *); - void (*reset_frames)(xvdr_metronom_t *); void (*dispose) (xvdr_metronom_t *); - void (*set_trickspeed)(xvdr_metronom_t *, int); - void (*set_still_mode)(xvdr_metronom_t *, int); - void (*wire) (xvdr_metronom_t *); void (*unwire) (xvdr_metronom_t *); - /* accumulated frame data */ - volatile uint video_frames; - volatile uint audio_frames; + /* master SCR for buffering control */ + struct adjustable_scr_s *scr; /* private data */ @@ -49,16 +52,22 @@ metronom_t *orig_metronom; xine_stream_t *stream; - /* callback */ - void *handle; - void (*frame_decoded)(void *handle, uint video_count, uint audio_count); - int trickspeed; /* current trick speed */ int still_mode; int64_t last_vo_pts; /* last displayed video frame PTS */ int wired; /* true if currently wired to stream */ - pthread_mutex_t pts_mutex; + /* initial buffering in live mode */ + uint8_t buffering; /* buffering active */ + uint8_t live_buffering; /* live buffering enabled */ + uint8_t stream_start; + int64_t vid_pts; /* last seen video pts */ + int64_t aud_pts; /* last seen audio pts */ + int64_t disc_pts; /* reported discontinuity pts */ + uint64_t buffering_start_time; + uint64_t first_frame_seen_time; + + pthread_mutex_t mutex; #endif }; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_fbfe_frontend.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_fbfe_frontend.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_fbfe_frontend.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_fbfe_frontend.c 2012-03-19 11:51:22.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_fbfe_frontend.c,v 1.48 2011/01/17 12:29:13 phintuka Exp $ + * $Id: xine_fbfe_frontend.c,v 1.50 2012/03/19 11:51:22 phintuka Exp $ * */ @@ -120,8 +120,8 @@ int xpos, int ypos, int width, int height, int fullscreen, int hud, int opengl, int modeswitch, const char *modeline, int aspect, - fe_keypress_f keyfunc, int no_x_kbd, int gui_hotkeys, - const char *video_port, int scale_video, int field_order, + int no_x_kbd, int gui_hotkeys, + const char *video_port, int scale_video, const char *aspect_controller, int window_id) { fbfe_t *this = (fbfe_t*)this_gen; @@ -132,9 +132,8 @@ if(this->fd_tty >= 0) this->fe.fe_display_close(this_gen); - if(keyfunc) { - this->x.keypress = keyfunc; - this->x.keypress("KBD", ""); + if(this->fe.fe_message_cb) { + this->fe.fe_message_cb(this->fe.fe_message_h, "KBD", ""); } LOGDBG("fbfe_display_open(width=%d, height=%d, fullscreen=%d, display=%s)", @@ -146,7 +145,6 @@ this->x.height = height; this->x.aspect = aspect; /*this->x.cropping = 0;*/ - this->x.field_order = field_order; this->x.scale_video = scale_video; this->x.overscan = 0; this->x.display_ratio = 1.0; @@ -195,7 +193,7 @@ int xpos, int ypos, int width, int height, int fullscreen, int modeswitch, const char *modeline, - int aspect, int scale_video, int field_order) + int aspect, int scale_video) { fbfe_t *this = (fbfe_t*)this_gen; @@ -208,7 +206,6 @@ this->x.height = height >= 0 ? height : this->x.height; this->x.aspect = aspect; this->x.scale_video = scale_video; - this->x.field_order = field_order; this->fullscreen = fullscreen; /*this->vmode_switch = modeswitch;*/ #if 0 diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend.c 2012-03-19 11:51:21.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.121 2011/04/11 08:40:06 durchflieger Exp $ + * $Id: xine_frontend.c,v 1.126 2012/03/19 11:51:21 phintuka Exp $ * */ @@ -39,6 +39,7 @@ #include "xine/vo_osdscaler.h" #include "xine/vo_osdreorder.h" #include "xine/vo_lastpts.h" +#include "xine/vo_frameoutput.h" #undef MIN #define MIN(a,b) ( (a) < (b) ? (a) : (b)) @@ -316,11 +317,7 @@ *dest_width = this->width; *dest_height = this->height; *dest_x = 0; -#ifndef HAVE_XV_FIELD_ORDER - *dest_y = 0 + this->field_order; -#else *dest_y = 0; -#endif #if 1 if(!this->scale_video) { @@ -545,8 +542,10 @@ x_upd_str("audio.device.alsa_passthrough_device", audio_port); x_upd_num("audio.output.speaker_arrangement", A52_PASSTHRU); } else { +#if 0 x_upd_num("audio.output.speaker_arrangement", strstr(audio_port, "surround") ? SURROUND51 : STEREO); +#endif } } @@ -692,9 +691,16 @@ } intercept_video_driver(this->video_port); + if (this->frame_draw_cb) { + vo_driver_t *frameoutput = vo_frameoutput_init(this, this->frame_draw_cb); + if (! wire_video_driver(this->video_port, frameoutput)) { + LOGMSG("wire_video_driver() for frame output handler failed"); + frameoutput->dispose(frameoutput); + } + } this->video_port_none = NULL; - + /* re-configure display size (DirectFB driver changes display mode in init) */ if(this->update_display_size_cb) this->update_display_size_cb(this); @@ -1143,6 +1149,15 @@ LOGDBG("Post plugin %s loaded and wired", name); } +static void input_event_cb(frontend_t *this_gen, const char *keymap, const char *key) +{ + fe_t *this = (fe_t*)this_gen; + + if (this->fe.fe_message_cb) { + this->fe.fe_message_cb(this->fe.fe_message_h, keymap, key); + } +} + static int fe_xine_play(frontend_t *this_gen) { fe_t *this = (fe_t*)this_gen; @@ -1158,7 +1173,7 @@ if(!find_input_plugin(this)) return -1; - this->input_plugin->f.xine_input_event = this->keypress; + this->input_plugin->f.xine_input_event = this->fe.fe_message_cb ? input_event_cb : NULL; this->input_plugin->f.fe_control = fe_control; this->input_plugin->f.fe_handle = this_gen; @@ -1361,8 +1376,8 @@ this->shutdown_time = time(NULL) + this->shutdown_timeout; /* local mode: --> vdr callback */ - if(this->keypress) { - this->keypress(map, key); + if (this->fe.fe_message_cb) { + this->fe.fe_message_cb(this->fe.fe_message_h, map, key); return FE_OK; } @@ -1429,8 +1444,8 @@ LOGDBG("Event: %s", data); /* local mode: --> vdr callback */ - if (this->keypress) { - this->keypress(data, NULL); + if (this->fe.fe_message_cb) { + this->fe.fe_message_cb(this->fe.fe_message_h, data, NULL); return FE_OK; } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend.h 2012-03-19 11:53:04.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.h,v 1.26 2011/10/25 18:20:16 phintuka Exp $ + * $Id: xine_frontend.h,v 1.29 2012/03/19 11:53:04 phintuka Exp $ * */ @@ -17,8 +17,6 @@ #define FE_VERSION_STR XINELIBOUTPUT_VERSION /*"1.0.0pre1"*/ -typedef void (*fe_keypress_f)(const char *keymap, const char *name); - typedef struct frontend_config_s frontend_config_t; typedef struct frontend_s frontend_t; @@ -37,7 +35,6 @@ char *video_port; int scale_video; - int field_order; fe_keypress_f keypresshandler; @@ -69,6 +66,10 @@ #define WINDOW_ID_NONE -1 #define WINDOW_ID_ROOT -2 +/* Video mode switching flags */ +#define MODESWITCH_SIZE 0x1 +#define MODESWITCH_RATE 0x2 +#define MODESWITCH_INTERLACE 0x4 struct frontend_s { /* Display */ @@ -77,17 +78,17 @@ int winwidth, int winheight, int fullscreen, int hud, int opengl, int modeswitch, const char *modeline, - int aspect, fe_keypress_f keypresshandler, + int aspect, int no_x_kbd, int gui_hotkeys, const char *video_port, - int scale_video, int field_order, + int scale_video, const char *aspect_controller, int window_id); int (*fe_display_config)(frontend_t *, int xpos, int ypos, int width, int height, int fullscreen, int modeswitch, const char *modeline, - int aspect, int scale_video, int field_order); + int aspect, int scale_video); void (*fe_display_close)(frontend_t*); /* Xine engine */ @@ -121,11 +122,18 @@ char *(*grab)(frontend_t*, int *size, int jpeg, int quality, int width, int height); - /* events from frontend -> xine/vdr */ + /* frontend services: events from frontend -> xine/vdr */ int (*send_event)(frontend_t *fe, const char *data); int (*send_input_event)(frontend_t *fe, const char *map, const char *key, int repeat, int release); + + /* Control messages frontend -> VDR (local mode) + * frontend should fill following pointers + */ + void *fe_message_h; + void (*fe_message_cb)(void *, const char *keymap, const char *name); + #if 0 frontend_config_t config; #endif diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_internal.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_internal.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_internal.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_internal.h 2012-03-19 11:51:21.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_internal.h,v 1.8 2011/02/28 13:23:46 phintuka Exp $ + * $Id: xine_frontend_internal.h,v 1.11 2012/03/19 11:51:21 phintuka Exp $ * */ @@ -38,8 +38,8 @@ void (*update_display_size_cb) (struct fe_s *); void (*toggle_fullscreen_cb) (struct fe_s *, int); - /* vdr callbacks */ - fe_keypress_f keypress; + /* if set before xine_init(), will be called by video driver wrapper for each frame */ + void (*frame_draw_cb)(void *, vo_frame_t *); /* xine stuff */ xine_t *xine; @@ -79,7 +79,6 @@ uint8_t overscan; /* overscan in % (crop video borders) */ /*uint8_t cropping : 1;*/ uint8_t scale_video : 1; /* enable/disable all video scaling */ - uint8_t field_order : 1; /* invert top/bottom field order */ uint8_t playback_finished : 1; uint8_t slave_playback_finished : 1; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_kbd.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_kbd.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_kbd.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_kbd.c 2012-06-06 07:39:56.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_kbd.c,v 1.2 2011/11/13 09:51:44 phintuka Exp $ + * $Id: xine_frontend_kbd.c,v 1.4 2012/06/06 07:39:56 phintuka Exp $ * */ @@ -154,11 +154,15 @@ static void kbd_receiver_thread_cleanup(void *arg) { - int status; - tcsetattr(STDIN_FILENO, TCSANOW, &saved_tm); - status = system("setterm -cursor on"); - if (status < 0) - LOGMSG("system(\"setterm -cursor on\") failed\n"); + if (isatty(STDIN_FILENO)) { + tcsetattr(STDIN_FILENO, TCSANOW, &saved_tm); + } + if (isatty(STDOUT_FILENO)) { + int status; + status = system("setterm -cursor on"); + if (status < 0) + LOGMSG("system(\"setterm -cursor on\") failed\n"); + } LOGMSG("Keyboard thread terminated"); } @@ -167,23 +171,27 @@ frontend_t *fe = (frontend_t*)fe_gen; uint64_t code = 0; char str[64]; - int status; - status = system("setterm -cursor off"); - if (status < 0) - LOGMSG("system(\"setterm -cursor off\") failed\n"); - status = system("setterm -blank off"); - if (status < 0) - LOGMSG("system(\"setterm -blank off\") failed\n"); + if (isatty(STDOUT_FILENO)) { + int status; + status = system("setterm -cursor off"); + if (status < 0) + LOGMSG("system(\"setterm -cursor off\") failed\n"); + status = system("setterm -blank off"); + if (status < 0) + LOGMSG("system(\"setterm -blank off\") failed\n"); + } - /* Set stdin to deliver keypresses without buffering whole lines */ - tcgetattr(STDIN_FILENO, &saved_tm); - if (tcgetattr(STDIN_FILENO, &tm) == 0) { - tm.c_iflag = 0; - tm.c_lflag &= ~(ICANON | ECHO); - tm.c_cc[VMIN] = 0; - tm.c_cc[VTIME] = 0; - tcsetattr(STDIN_FILENO, TCSANOW, &tm); + if (isatty(STDIN_FILENO)) { + /* Set stdin to deliver keypresses without buffering whole lines */ + tcgetattr(STDIN_FILENO, &saved_tm); + if (tcgetattr(STDIN_FILENO, &tm) == 0) { + tm.c_iflag = 0; + tm.c_lflag &= ~(ICANON | ECHO); + tm.c_cc[VMIN] = 0; + tm.c_cc[VTIME] = 0; + tcsetattr(STDIN_FILENO, TCSANOW, &tm); + } } pthread_cleanup_push(kbd_receiver_thread_cleanup, NULL); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_lirc.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_lirc.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_lirc.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_lirc.c 2012-02-17 09:15:41.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_lirc.c,v 1.26 2011/02/28 13:42:42 phintuka Exp $ + * $Id: xine_frontend_lirc.c,v 1.27 2012/02/17 09:15:41 phintuka Exp $ * */ /* @@ -35,6 +35,8 @@ #include #include +#include "tools/time_ms.h" + #define LOG_MODULENAME "[lirc] " #include "logdefs.h" @@ -60,19 +62,6 @@ /* xine_frontend_main.c: */ extern int gui_hotkeys; -static uint64_t time_ms() -{ - struct timeval t; - if (gettimeofday(&t, NULL) == 0) - return ((uint64_t)t.tv_sec) * 1000ULL + t.tv_usec / 1000ULL; - return 0; -} - -static uint64_t elapsed(uint64_t t) -{ - return time_ms() - t; -} - static void lircd_connect(void) { struct sockaddr_un addr; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_main.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_main.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_frontend_main.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_frontend_main.c 2012-03-19 11:51:21.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend_main.c,v 1.99 2011/10/28 07:40:32 phintuka Exp $ + * $Id: xine_frontend_main.c,v 1.103 2012/03/19 11:51:21 phintuka Exp $ * */ @@ -109,25 +109,27 @@ " --aspect=auto:path_to_script\n" #ifndef IS_FBFE " -f, --fullscreen Fullscreen mode\n" -# ifdef HAVE_XRENDER - " -D, --hud[=flag[,flag]] Head Up Display OSD mode using compositing\n" +# if defined(HAVE_XRENDER) || defined(HAVE_OPENGL) + " -D, --hud[=flag[,flag]] Head Up Display OSD\n" " Optional flags:\n" -# ifdef HAVE_XCOMPOSITE +# endif +# ifdef HAVE_XRENDER +# ifdef HAVE_XCOMPOSITE " xrender Use XRender instead of compositing\n" " (no compositing manager required)\n" -# endif -# ifdef HAVE_XSHAPE +# endif +# ifdef HAVE_XSHAPE " xshape Use XShape instead of compositing\n" " (no compositing manager required)\n" -# endif -# ifdef HAVE_OPENGL +# endif +# endif // HAVE_XRENDER +# ifdef HAVE_OPENGL " opengl Use OpenGL instead of compositing\n" " (no compositing manager required)\n" -# endif -# ifdef HAVE_OPENGL +# endif +# ifdef HAVE_OPENGL " -O, --opengl Use OpenGL for video and Head Up Display OSD\n" -# endif -# endif // HAVE_XRENDER +# endif " -w, --width=x Video window width\n" " -h, --height=x Video window height\n" " -g, --geometry=WxH[+X+Y] Set output window geometry (X style)\n" @@ -359,8 +361,7 @@ case 'O': # ifdef HAVE_OPENGL opengl = 1; - hud |= HUD_OPENGL; - PRINTF("Using OpenGL to draw video and HUD OSD\n"); + PRINTF("Using OpenGL to draw video and OSD\n"); # else EXIT("OpenGL not supported\n"); # endif @@ -549,8 +550,8 @@ /* Initialize display */ if (!fe->fe_display_open(fe, xpos, ypos, width, height, fullscreen, hud, opengl, modeswitch, - "", aspect, NULL, noxkbd, gui_hotkeys, - video_port, scale_video, 0, + "", aspect, noxkbd, gui_hotkeys, + video_port, scale_video, aspect_controller, window_id)) { fprintf(stderr, "Error opening display\n"); fe->fe_free(fe); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_input_vdr.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_input_vdr.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_input_vdr.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_input_vdr.c 2013-01-15 20:33:29.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.352 2011/12/10 11:01:35 rofafor Exp $ + * $Id: xine_input_vdr.c,v 1.364 2013/01/15 20:33:29 phintuka Exp $ * */ @@ -136,7 +136,7 @@ # include /* syscall(__NR_gettid) */ #endif -static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.352 2011/12/10 11:01:35 rofafor Exp $"; +static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.364 2013/01/15 20:33:29 phintuka Exp $"; static const char log_module_input_vdr[] = "[input_vdr] "; #define LOG_MODULENAME log_module_input_vdr #define SysLogLevel iSysLogLevel @@ -580,15 +580,13 @@ if (this->scr_tuning != SCR_TUNING_PAUSED) { this->scr_tuning = SCR_TUNING_PAUSED; /* marked as paused */ - if (this->scr) - this->scr->set_speed_tuning(this->scr, 1.0); -#ifdef TEST_SCR_PAUSE - if (_x_get_fine_speed(this->stream) != XINE_SPEED_PAUSE) + this->scr->set_speed_tuning(this->scr, 1.0); + + if (_x_get_fine_speed(this->stream) != XINE_SPEED_PAUSE) { _x_set_fine_speed(this->stream, XINE_SPEED_PAUSE); -#else - _x_set_fine_speed(this->stream, 1000000 / 1000); /* -> speed to 0.1% */ -#endif + } + this->I_frames = this->P_frames = this->B_frames = 0; } } @@ -603,8 +601,8 @@ CHECK_FALSE(this->is_paused); this->scr_tuning = SCR_TUNING_OFF; /* marked as normal */ - if (this->scr) - this->scr->set_speed_tuning(this->scr, 1.0); + + this->scr->set_speed_tuning(this->scr, 1.0); if (_x_get_fine_speed(this->stream) != XINE_FINE_SPEED_NORMAL) { if (!this->is_paused) @@ -1168,7 +1166,7 @@ { if (this->fd_control < 0) { if (this->funcs.xine_input_event) { - this->funcs.xine_input_event(s, NULL); + this->funcs.xine_input_event(this->funcs.fe_handle, s, NULL); } } else { write_control(this, s); @@ -1585,7 +1583,7 @@ if (this->still_mode) reset_scr_tuning(this); - this->metronom->set_still_mode(this->metronom, still_mode); + this->stream->metronom->set_option(this->stream->metronom, XVDR_METRONOM_STILL_MODE, still_mode); } /* @@ -1619,12 +1617,7 @@ set_still_mode(this, 0); /* SCR tuning */ - if (this->live_mode) { -#ifndef TEST_SCR_PAUSE - LOGSCR("pause scr tuning by set_live_mode"); - scr_tuning_set_paused(this); -#endif - } else { + if (!this->live_mode) { LOGSCR("reset scr tuning by set_live_mode"); reset_scr_tuning(this); } @@ -1662,7 +1655,7 @@ if (this->slave.stream) backwards = 0; - this->metronom->set_trickspeed(this->metronom, backwards ? speed : 0); + this->stream->metronom->set_option(this->stream->metronom, XVDR_METRONOM_TRICK_SPEED, backwards ? speed : 0); if (speed > 1 || speed < -1) { CHECK_FALSE(this->live_mode); @@ -1994,20 +1987,44 @@ # define DEMUX_RESUME_SIGNAL pthread_cond_signal(&this->stream->demux_resume) #endif +#if XINE_VERSION_CODE < 10200 +# define RAISE_ACTION_PENDING this->stream->demux_action_pending = 1 +# define LOWER_ACTION_PENDING this->stream->demux_action_pending = 0 +#else +# define RAISE_ACTION_PENDING _x_action_raise(this->stream) +# define LOWER_ACTION_PENDING _x_action_lower(this->stream) +#endif + static void suspend_demuxer(vdr_input_plugin_t *this) { - this->stream->demux_action_pending = 1; - signal_buffer_not_empty(this); - if(this->is_paused) + if (this->is_paused) LOGMSG("WARNING: called suspend_demuxer in paused mode !"); + + /* request demuxer to release demux_lock */ + RAISE_ACTION_PENDING; + + /* signal all possible sync points to speed up this */ + pthread_cond_broadcast(&this->engine_flushed); + signal_buffer_not_empty(this); + + /* let demuxer return from vdr_plugin_read_* */ + if (pthread_mutex_unlock( &this->lock )) + LOGERR("pthread_mutex_unlock failed !"); + + /* lock demuxer */ pthread_mutex_lock( &this->stream->demux_lock ); - this->stream->demux_action_pending = 0; + + LOWER_ACTION_PENDING; + + pthread_mutex_lock( &this->lock ); + /* must be paired with resume_demuxer !!! */ } static void resume_demuxer(vdr_input_plugin_t *this) { /* must be paired with suspend_demuxer !!! */ + DEMUX_RESUME_SIGNAL; pthread_mutex_unlock( &this->stream->demux_lock ); } @@ -2068,12 +2085,7 @@ } /* suspend demuxer */ - this->stream->demux_action_pending = 1; - pthread_cond_broadcast(&this->engine_flushed); - if(pthread_mutex_unlock( &this->lock )) /* to let demuxer return from vdr_plugin_read_* */ - LOGERR("pthread_mutex_unlock failed !"); suspend_demuxer(this); - pthread_mutex_lock( &this->lock ); reset_scr_tuning(this); @@ -3506,11 +3518,10 @@ } if(this->autoplay_size < 0) { - char **list; if (this->slave.stream && this->slave.stream->input_plugin && this->slave.stream->input_plugin->input_class) - list = this->slave.stream->input_plugin->input_class-> + this->slave.stream->input_plugin->input_class-> get_autoplay_list(this->slave.stream->input_plugin->input_class, &this->autoplay_size); } err = this->autoplay_size; @@ -3591,6 +3602,11 @@ counter--; } + if (this->osd_manager && this->osd_manager->argb_supported(this->stream)) { + LOGMSG("ARGB OSD supported by video driver"); + puts_vdr(this, "INFO ARGBOSD\r\n"); + } + write_control(this, "CONFIG\r\n"); while(this->control_running) { @@ -3686,6 +3702,10 @@ cnt += snprintf(tracks+cnt, sizeof(tracks)-cnt-32, "%s%d:%s ", i==current?"*":"", i, trim_str(lang)); n++; + } else if (i < this->slave.stream->audio_track_map_entries) { + cnt += snprintf(tracks+cnt, sizeof(tracks)-cnt-32, + "%s%d:%d ", i==current?"*":"", i, i); + n++; } tracks[sizeof(tracks)-1] = 0; if(n>1) @@ -3817,7 +3837,7 @@ } if (this->funcs.xine_input_event) { /* local mode: -> VDR */ - this->funcs.xine_input_event(NULL, vdr_keymap[i].name); + this->funcs.xine_input_event(this->funcs.fe_handle, NULL, vdr_keymap[i].name); } return; } @@ -4809,6 +4829,28 @@ pthread_mutex_unlock (&this->stream->first_frame_lock); memset(&this->scr_buf, 0, sizeof(this->scr_buf)); + + this->scr->got_pcr(this->scr, -1); + } + + /* live mode clock sync input */ + if (this->live_mode || (this->fd_control >= 0 && !this->fixed_scr)) { + int64_t pcr = -1; + + if (DATA_IS_TS(buf->content) && + ts_get_pcr_n(buf->content, buf->size / TS_SIZE, &pcr) && + pcr >= 0) { + + this->scr->got_pcr(this->scr, pcr); + } + + /* PES stream has no PCR, use audio pts for vdr-1.6.0 compability */ + if (IS_AUDIO_PACKET(buf->content)) { + pcr = pes_get_pts(buf->content, buf->size); + if (pcr > 0) { + this->scr->got_pcr(this->scr, pcr); + } + } } pthread_mutex_unlock(&this->lock); @@ -4824,7 +4866,6 @@ */ static void postprocess_buf(vdr_input_plugin_t *this, buf_element_t *buf, int need_pause) { -#ifdef TEST_SCR_PAUSE if (need_pause) { pthread_mutex_lock(&this->lock); @@ -4832,11 +4873,13 @@ pthread_mutex_unlock(&this->lock); } -#endif if (buf->type != BUF_DEMUX_BLOCK || DATA_IS_TS(buf->content)) return; +#if 0 + /* this is done in demux */ + /* generated still images start with empty video PES, PTS = 0. Reset metronom pts so images will be displayed */ if(this->still_mode && buf->size == 14) { @@ -4847,6 +4890,7 @@ /*buf->content[12] = (uint8_t)((10*90) >> 7);*/ } } +#endif /* Count video frames for SCR tuning algorithm */ if(this->live_mode && this->I_frames < 4) @@ -4888,16 +4932,13 @@ if(this->scr_tuning) reset_scr_tuning(this); } else { -#ifdef TEST_SCR_PAUSE + if(this->stream_start) { reset_scr_tuning(this); need_pause = 1; } else { vdr_adjust_realtime_speed(this); } -#else - vdr_adjust_realtime_speed(this); -#endif } pthread_mutex_unlock(&this->lock); @@ -5084,7 +5125,7 @@ pthread_cond_broadcast(&this->engine_flushed); while(pthread_cond_destroy(&this->engine_flushed) == EBUSY) { - LOGMSG("discard_signal busy !"); + LOGMSG("engine_flushed signal busy !"); pthread_cond_broadcast(&this->engine_flushed); xine_usec_sleep(10); } @@ -5237,7 +5278,7 @@ e = this->class->xine->config->lookup_entry(this->class->xine->config, "engine.buffers.audio_num_buffers"); if (e && e->num_value < 500) { - LOGMSG("WARNING: xine-engine setting \"engine.buffers.audio_num_buffers\":%d is" + LOGMSG("WARNING: xine-engine setting \"engine.buffers.audio_num_buffers\":%d is " "too low for HD-playback! Please use values between 500-1000!", e->num_value); } @@ -5389,7 +5430,7 @@ { char cmd[256]; unsigned int ip0, ip1, ip2, ip3, port; - int fd=-1, one = 1, retries = 0, n; + int fd=-1, one = 1, retries = 0; struct sockaddr_in multicastAddress; struct ip_mreq mreq; struct sockaddr_in server_address, sin; @@ -5486,7 +5527,10 @@ /* check sender address */ - n = recvfrom(fd, &tmp_rtp, sizeof(tmp_rtp), 0, &sin, &len); + if (recvfrom(fd, &tmp_rtp, sizeof(tmp_rtp), 0, &sin, &len) < 0) { + LOGERR("RTP recvrom() failed"); + return -1; + } if(sin.sin_addr.s_addr != server_address.sin_addr.s_addr) { uint32_t tmp_ip = ntohl(sin.sin_addr.s_addr); LOGMSG("Received UDP/RTP multicast from unknown sender: %d.%d.%d.%d:%d", @@ -5521,7 +5565,7 @@ socklen_t len = sizeof(sin); uint32_t tmp_ip; stream_udp_header_t tmp_udp; - int n, retries = 0, port = -1, fd = -1; + int retries = 0, port = -1, fd = -1; /* get server IP address */ if(getpeername(this->fd_control, (struct sockaddr *)&server_address, &len)) { @@ -5576,12 +5620,15 @@ /* check sender address */ - n = recvfrom(fd, &tmp_udp, sizeof(tmp_udp), 0, &sin, &len); + if (recvfrom(fd, &tmp_udp, sizeof(tmp_udp), 0, &sin, &len) < 0) { + LOGERR("UDP recvrom() failed"); + return -1; + } if(sin.sin_addr.s_addr != server_address.sin_addr.s_addr) { tmp_ip = ntohl(sin.sin_addr.s_addr); LOGMSG("Received UDP packet from unknown sender: %d.%d.%d.%d:%d", - ((tmp_ip>>24)&0xff), ((tmp_ip>>16)&0xff), - ((tmp_ip>>8)&0xff), ((tmp_ip)&0xff), + ((tmp_ip>>24)&0xff), ((tmp_ip>>16)&0xff), + ((tmp_ip>>8)&0xff), ((tmp_ip)&0xff), sin.sin_port); if(XIO_READY == _x_io_select(this->stream, fd, XIO_READ_READY, 0)) @@ -5598,7 +5645,7 @@ /* store server address */ memcpy(&this->udp_data->server_address, &sin, sizeof(sin)); - + return fd; } @@ -5975,6 +6022,15 @@ } #endif +#if XINE_VERSION_CODE >= 10200 +static const char * const *vdr_plugin_get_autoplay_list(input_class_t *this_gen, int *num_files) +{ + vdr_input_class_t *this = (vdr_input_class_t *)this_gen; + *num_files = 1; + + return (const char * const *)this->mrls; +} +#else static char **vdr_plugin_get_autoplay_list(input_class_t *this_gen, int *num_files) { vdr_input_class_t *this = (vdr_input_class_t *)this_gen; @@ -5982,6 +6038,7 @@ return this->mrls; } +#endif static void vdr_class_dispose (input_class_t *this_gen) { diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_input_vdr.h vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_input_vdr.h --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_input_vdr.h 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_input_vdr.h 2012-03-10 23:51:10.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.h,v 1.11 2010/02/14 12:53:06 phintuka Exp $ + * $Id: xine_input_vdr.h,v 1.12 2012/03/10 23:51:10 phintuka Exp $ * */ @@ -31,7 +31,7 @@ int (*push_input_osd) (struct vdr_input_plugin_if_s *, struct osd_command_s *); /* input plugin --> frontend (only local mode) */ - void (*xine_input_event) (const char *, const char *); + void (*xine_input_event) (struct frontend_s *, const char *, const char *); /* input plugin --> frontend (remote mode) */ int (*intercept_osd) (struct frontend_s *, struct osd_command_s *); diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_post_audiochannel.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_post_audiochannel.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_post_audiochannel.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_post_audiochannel.c 2012-01-09 07:36:52.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_post_audiochannel.c,v 1.7 2011/10/30 16:59:02 phintuka Exp $ + * $Id: xine_post_audiochannel.c,v 1.9 2012/01/09 07:36:52 phintuka Exp $ * */ @@ -70,7 +70,7 @@ /* * Port functions */ -#if XINE_VERSION_CODE < 10200 +#if 1 static int audioch_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode) #else @@ -85,7 +85,7 @@ _x_post_inc_usage(port); port->stream = stream; -#if XINE_VERSION_CODE < 10200 +#if 1 port->bits = bits; port->rate = rate; port->mode = mode; @@ -112,7 +112,7 @@ int i; if(this->channels == 2) { -#if XINE_VERSION_CODE < 10200 +#if 1 int step = buf->format.bits / 8; #else int step = sample_bytes_table[buf->format.sample_format]; @@ -122,7 +122,7 @@ newbuf->vpts = buf->vpts; newbuf->frame_header_count = buf->frame_header_count; newbuf->first_access_unit = buf->first_access_unit; -#if XINE_VERSION_CODE < 10200 +#if 1 newbuf->format.bits = buf->format.bits; newbuf->format.rate = buf->format.rate; newbuf->format.mode = buf->format.mode; diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_sxfe_frontend.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_sxfe_frontend.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xine_sxfe_frontend.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xine_sxfe_frontend.c 2012-03-19 11:51:21.000000000 +0000 @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_sxfe_frontend.c,v 1.170 2011/10/27 07:26:21 phintuka Exp $ + * $Id: xine_sxfe_frontend.c,v 1.204 2012/03/19 11:51:21 phintuka Exp $ * */ @@ -61,6 +61,7 @@ #endif #include "tools/rle.h" +#include "tools/time_ms.h" #ifndef WIN_LAYER_NORMAL #define WIN_LAYER_NORMAL 4 @@ -72,11 +73,11 @@ #define MWM_HINTS_DECORATIONS (1L << 1) #define PROP_MWM_HINTS_ELEMENTS 5 typedef struct _mwmhints { - uint32_t flags; - uint32_t functions; - uint32_t decorations; - int32_t input_mode; - uint32_t status; + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; } MWMHints; #ifdef HAVE_XRENDER @@ -111,10 +112,13 @@ /* X11 */ Display *display; + Window root_window; Window window[2]; int screen; int window_id; /* output to another window */ - int completion_event; +#ifdef HAVE_XSHM + int xshm_completion_event; +#endif Time prev_click_time; /* time of previous mouse button click (grab double clicks) */ int mousecursor_timeout; #ifdef HAVE_XDPMS @@ -153,13 +157,11 @@ uint8_t no_border : 1; uint8_t check_move : 1; uint8_t dragging : 1; - uint8_t hud; - uint8_t xshape_hud : 1; - uint8_t opengl_always : 1; - uint8_t opengl_hud : 1; uint8_t gui_hotkeys : 1; uint8_t no_x_kbd : 1; + /* OSD Video Window */ + pthread_mutex_t video_win_mutex; uint8_t video_win_active; /* activate video window? */ uint8_t video_win_changed; uint16_t video_win_x; /* video window position, x */ @@ -167,61 +169,81 @@ uint16_t video_win_w; /* video window width */ uint16_t video_win_h; /* video window height */ - /* HUD stuff */ -#ifdef HAVE_XRENDER - uint8_t hud_visible; /* used with XShape and OpenGL */ + /* OSD */ +#if defined(HAVE_XRENDER) || defined(HAVE_OPENGL) + uint8_t osd_visible; + uint16_t osd_width; + uint16_t osd_height; +#endif + + /* OpenGL */ #ifdef HAVE_OPENGL GLXDrawable opengl_window; GLXContext opengl_context; int screen_width, screen_height; -#if 0 - int32_t opengl_frame_period; -#endif pthread_t opengl_drawing_thread; pthread_mutex_t opengl_redraw_mutex; pthread_cond_t opengl_redraw_cv; + uint32_t opengl_redraw_request_nr; + uint32_t opengl_redraw_served_nr; + pthread_mutex_t opengl_redraw_finished_mutex; + pthread_cond_t opengl_redraw_finished_cv; + pthread_mutex_t opengl_osd_texture_img_mutex; Pixmap video_frame_pixmap; GC video_frame_gc; GLuint video_frame_texture; GLuint osd_texture; + uint32_t *opengl_osd_texture_img; + uint8_t opengl_hud : 1; + uint8_t opengl_always : 1; + uint8_t opengl_osd_texture_img_updated : 1; uint8_t opengl_deinit : 1; -#endif - uint32_t *shape_mask_mem; #ifdef HAVE_XSHAPE - Pixmap shape_mask_pixmap; - GC shape_mask_gc; - Picture shape_mask_picture; + uint8_t opengl_xshape_available : 1; #endif +#endif /* HAVE_OPENGL */ + + /* HUD */ +#ifdef HAVE_XRENDER + uint8_t hud; XImage *hud_img; Visual *hud_vis; Xrender_Surf *surf_win; Xrender_Surf *surf_img; - Xrender_Surf *surf_back_img; uint32_t *hud_img_mem; GC gc; Window hud_window; +# ifdef HAVE_XSHAPE + uint8_t xshape_hud : 1; + Xrender_Surf *surf_back_img; + uint32_t *shape_mask_mem; + Pixmap shape_mask_pixmap; + GC shape_mask_gc; + Picture shape_mask_picture; +# endif # ifdef HAVE_XSHM XShmSegmentInfo hud_shminfo; # endif - - uint16_t osd_width; - uint16_t osd_height; #endif /* HAVE_XRENDER */ } sxfe_t; #ifdef HAVE_OPENGL +#if 0 typedef int (*GLXGetVideoSyncProc) (unsigned int *count); typedef int (*GLXWaitVideoSyncProc) (int divisor, int remainder, unsigned int *count); +#endif typedef void (*GLXBindTexImageProc) (Display *display, GLXDrawable drawable, int buffer, int *attribList); +#if 0 GLXGetVideoSyncProc getVideoSync; GLXWaitVideoSyncProc waitVideoSync; +#endif GLXBindTexImageProc bindTexImage; #endif @@ -362,7 +384,7 @@ { XLockDisplay(this->display); - if (!this->x.keypress) { /* handler is set only in local mode */ + if (!this->fe.fe_message_cb) { /* handler is set only in local mode */ char *name = NULL; if (XFetchName(this->display, this->window[0], &name) && name) { char *newname = NULL; @@ -493,6 +515,7 @@ */ static void set_cursor(Display *dpy, Window win, const int enable) { + XLockDisplay(dpy); if(enable) XDefineCursor(dpy, win, None); else { @@ -507,6 +530,7 @@ XDefineCursor(dpy, win, None); XDefineCursor(dpy, win, no_ptr); } + XUnlockDisplay(dpy); } static void update_xinerama_info(sxfe_t *this) @@ -564,6 +588,96 @@ } /* + * Generic OSD + */ +#if defined(HAVE_XRENDER) || defined(HAVE_OPENGL) + +static void osd_fill_lut8(uint32_t* dst, int dst_pitch, int argb, + const struct osd_command_s *cmd) +{ + uint8_t *data = cmd->raw_data; + unsigned x, y; + uint32_t lut[256]; + + if (argb) { + rle_palette_to_argb(lut, cmd->palette, cmd->colors); + } else { + rle_palette_to_rgba(lut, cmd->palette, cmd->colors); + } + + dst += cmd->y * dst_pitch + cmd->x; + + for (y = cmd->h; y; y--) { + for (x = 0; x < cmd->w; x++) { + dst[x] = lut[*data]; + ++data; + } + dst += dst_pitch; + } +} + +static void osd_set_video_window(sxfe_t *this, const struct osd_command_s *cmd) +{ + LOGDBG("unscaled video window: %d,%d %dx%d", cmd->x, cmd->y, cmd->w, cmd->h); + + // Compute the coordinates of the video window + double scale_x = (double)this->x.width / (double)this->osd_width; + double scale_y = (double)this->x.height / (double)this->osd_height; + + int x = cmd->x; + int y = cmd->y; + int w = cmd->w; + int h = cmd->h; + + x = (int)ceil((double)(x>0 ? x-1 : 0) * scale_x); + y = (int)ceil((double)(y>0 ? y-1 : 0) * scale_y); + w = (int)floor((double)(w+2) * scale_x); + h = (int)floor((double)(h+2) * scale_y); + + pthread_mutex_lock(&this->video_win_mutex); + + if (x != this->video_win_x || y != this->video_win_y || + w != this->video_win_w || h != this->video_win_h) + this->video_win_changed = 1; + + this->video_win_x = x; + this->video_win_y = y; + this->video_win_w = w; + this->video_win_h = h; + + this->video_win_active = 1; + + pthread_mutex_unlock(&this->video_win_mutex); + + LOGDBG("scaled video window: %d,%d %dx%d", this->video_win_x, this->video_win_y, this->video_win_w, this->video_win_h); +} + +static int osd_command(sxfe_t *this, struct osd_command_s *cmd) +{ + switch(cmd->cmd) { + + case OSD_Size: /* Set size of VDR OSD area */ + if (!(cmd->flags & OSDFLAG_TOP_LAYER)) + break; + + LOGVERBOSE("OSD Size %dx%d", cmd->w, cmd->h); + this->osd_width = (cmd->w > 0) ? cmd->w : OSD_DEF_WIDTH; + this->osd_height = (cmd->h > 0) ? cmd->h : OSD_DEF_HEIGHT; + break; + + case OSD_VideoWindow: + LOGVERBOSE("OSD VideoWindow %dx%d@%d,%d", cmd->w, cmd->h, cmd->x, cmd->y); + osd_set_video_window(this, cmd); + break; + + default: + break; + } + return 1; +} +#endif /* HAVE_XRENDER || HAVE_OPENGL */ + +/* * HUD OSD stuff */ @@ -686,26 +800,6 @@ return visual; } -static void hud_fill_lut8(uint32_t* dst, int dst_pitch, - const struct osd_command_s *cmd) -{ - uint8_t *data = cmd->raw_data; - unsigned x, y; - uint32_t lut[256]; - - rle_palette_to_argb(lut, cmd->palette, cmd->colors); - - dst += cmd->y * dst_pitch + cmd->x; - - for (y = cmd->h; y; y--) { - for (x = 0; x < cmd->w; x++) { - dst[x] = lut[*data]; - ++data; - } - dst += dst_pitch; - } -} - static void hud_fill_argb(uint32_t* dst, int dst_pitch, const struct osd_command_s *cmd) { @@ -748,7 +842,7 @@ int *mask_changed, const struct osd_command_s *cmd) { if (cmd->cmd == OSD_Set_LUT8) { - hud_fill_lut8(dst, dst_pitch, cmd); + osd_fill_lut8(dst, dst_pitch, 1, cmd); } else if (cmd->cmd == OSD_Set_ARGB) { hud_fill_argb(dst, dst_pitch, cmd); @@ -771,21 +865,29 @@ static void hud_osd_draw(sxfe_t *this, const struct osd_command_s *cmd) { + int x = cmd->x + cmd->dirty_area.x1; + int y = cmd->y + cmd->dirty_area.y1; + int w = cmd->dirty_area.x2 - cmd->dirty_area.x1 + 1; + int h = cmd->dirty_area.y2 - cmd->dirty_area.y1 + 1; + XDouble scale_x = (XDouble)this->x.width / (XDouble)this->osd_width; XDouble scale_y = (XDouble)this->x.height / (XDouble)this->osd_height; - int x = cmd->x + cmd->dirty_area.x1; - int y = cmd->y + cmd->dirty_area.y1; - int w = cmd->dirty_area.x2 - cmd->dirty_area.x1 + 1; - int h = cmd->dirty_area.y2 - cmd->dirty_area.y1 + 1; int mask_changed; +#ifdef HAVE_XSHAPE Xrender_Surf *dst_surf = this->surf_back_img ? this->surf_back_img : this->surf_win; Window dst_win = this->surf_back_img ? this->surf_back_img->draw : this->hud_window; + uint32_t *shape_mask_mem = this->shape_mask_mem; +#else + Xrender_Surf *dst_surf = this->surf_win; + Window dst_win = this->hud_window; + uint32_t *shape_mask_mem = NULL; +#endif #ifdef HAVE_XSHM - if (this->completion_event != -1) { + if (this->xshm_completion_event != -1) { hud_fill_img_memory((uint32_t*)(this->hud_img->data), HUD_MAX_WIDTH, - this->shape_mask_mem, HUD_MAX_WIDTH, + shape_mask_mem, HUD_MAX_WIDTH, &mask_changed, cmd); if (!cmd->scaling) { /* Place image directly onto hud window */ @@ -808,7 +910,7 @@ #endif { hud_fill_img_memory(this->hud_img_mem, HUD_MAX_WIDTH, - this->shape_mask_mem, HUD_MAX_WIDTH, + shape_mask_mem, HUD_MAX_WIDTH, &mask_changed, cmd); if (!cmd->scaling) { /* Place image directly onto hud window (always unscaled) */ @@ -829,60 +931,28 @@ #ifdef HAVE_XSHAPE if (this->xshape_hud) { if (mask_changed) { - LOGDBG("hud_osd_command(OSD_Set_RLE): Updating shape of window"); + LOGDBG("hud_osd_draw: Updating shape of window"); XRenderComposite(this->display, PictOpSrc, this->surf_back_img->pic, None, this->shape_mask_picture, x, y, 0, 0, x, y, w, h); XShapeCombineMask(this->display, this->hud_window, ShapeBounding, 0, 0, this->shape_mask_pixmap, ShapeSet); } } -#endif /* Put the image onto the hud window */ if (this->surf_back_img) XRenderComposite(this->display, PictOpSrc, this->surf_back_img->pic, None, this->surf_win->pic, x, y, 0, 0, x, y, w, h); +#endif XFlush(this->display); } -static void hud_osd_set_video_window(sxfe_t *this, const struct osd_command_s *cmd) -{ - LOGDBG("HUD osd VideoWindow: unscaled video win: %d %d %d %d", cmd->x, cmd->y, cmd->w, cmd->h); - - // Compute the coordinates of the video window - XDouble scale_x = (XDouble)this->x.width / (XDouble)this->osd_width; - XDouble scale_y = (XDouble)this->x.height / (XDouble)this->osd_height; - - int x = cmd->x; - int y = cmd->y; - int w = cmd->w; - int h = cmd->h; - - x = (int)ceil((double)(x>0 ? x-1 : 0) * scale_x); - y = (int)ceil((double)(y>0 ? y-1 : 0) * scale_y); - w = (int)floor((double)(w+2) * scale_x); - h = (int)floor((double)(h+2) * scale_y); - - if (x != this->video_win_x || y != this->video_win_y || - w != this->video_win_w || h != this->video_win_h) - this->video_win_changed = 1; - - this->video_win_x = x; - this->video_win_y = y; - this->video_win_w = w; - this->video_win_h = h; - - this->video_win_active = 1; - - LOGDBG("scaled video win: %d %d %d %d", this->video_win_x, this->video_win_y, this->video_win_w, this->video_win_h); -} - static void hud_osd_hide(sxfe_t *this) { - if (!this->hud_visible) + if (!this->osd_visible) return; - this->hud_visible = 0; + this->osd_visible = 0; this->video_win_active = 0; #ifdef HAVE_XSHAPE @@ -906,19 +976,20 @@ static void hud_osd_show(sxfe_t *this) { - if (this->hud_visible) + if (this->osd_visible) return; - this->hud_visible = 1; + this->osd_visible = 1; this->video_win_active = 0; XSetForeground(this->display, this->gc, 0x00000000); XFillRectangle(this->display, this->surf_img->draw, this->gc, 0, 0, this->osd_width+2, this->osd_height+2); + +#ifdef HAVE_XSHAPE if (this->surf_back_img) XFillRectangle(this->display, this->surf_back_img->draw, this->gc, 0, 0, this->x.width, this->x.height); -#ifdef HAVE_XSHAPE if (this->xshape_hud) { XSetForeground(this->display, this->shape_mask_gc, 0); XFillRectangle(this->display, this->shape_mask_pixmap, this->shape_mask_gc, 0, 0, this->x.width, this->x.height); @@ -936,63 +1007,53 @@ { sxfe_t *this = (sxfe_t*)this_gen; - if(this && this->hud && cmd) { + if (this && cmd) + if (this->hud) { + + osd_command(this, cmd); + + if (!(cmd->flags & OSDFLAG_TOP_LAYER)) + return 1; + XLockDisplay(this->display); - switch(cmd->cmd) { + switch (cmd->cmd) { case OSD_Nop: /* Do nothing ; used to initialize delay_ms counter */ - LOGDBG("HUD osd NOP"); + LOGVERBOSE("HUD OSD NOP"); break; case OSD_Size: /* Set size of VDR OSD area */ - LOGDBG("HUD Set Size"); - - if (!(cmd->flags & OSDFLAG_TOP_LAYER)) - break; - - this->osd_width = (cmd->w > 0) ? cmd->w : OSD_DEF_WIDTH; - this->osd_height = (cmd->h > 0) ? cmd->h : OSD_DEF_HEIGHT; - + LOGVERBOSE("HUD OSD Size"); hud_osd_show(this); break; case OSD_Set_LUT8: case OSD_Set_ARGB: case OSD_Set_RLE: /* Create/update OSD window. Data is rle-compressed. */ - LOGDBG("HUD Set RLE"); - - if (!(cmd->flags & OSDFLAG_TOP_LAYER)) - break; - + LOGVERBOSE("HUD OSD Set"); hud_osd_draw(this, cmd); break; case OSD_SetPalette: /* Modify palette of already created OSD window */ - LOGDBG("HUD osd SetPalette"); + LOGDBG("HUD OSD SetPalette"); break; case OSD_Move: /* Change x/y position of already created OSD window */ - LOGDBG("HUD osd Move"); + LOGDBG("HUD OSD Move"); break; case OSD_Set_YUV: /* Create/update OSD window. Data is in YUV420 format. */ - LOGDBG("HUD osd set YUV"); + LOGDBG("HUD OSD Set YUV"); break; case OSD_VideoWindow: - hud_osd_set_video_window(this, cmd); break; case OSD_Close: /* Close OSD window */ - LOGDBG("HUD osd Close"); - if (!(cmd->flags & OSDFLAG_TOP_LAYER)) - break; - + LOGVERBOSE("HUD OSD Close"); hud_osd_hide(this); - break; default: - LOGDBG("hud_osd_command: unknown osd command %d", cmd->cmd); break; } XUnlockDisplay(this->display); @@ -1000,16 +1061,6 @@ return 1; } -#ifdef HAVE_OPENGL -// Signals a change to the opengl drawing thread -void opengl_trigger_drawing_thread(sxfe_t *this) -{ - pthread_mutex_lock(&this->opengl_redraw_mutex); - pthread_cond_signal(&this->opengl_redraw_cv); - pthread_mutex_unlock(&this->opengl_redraw_mutex); -} -#endif - static void hud_frame_output_cb (void *data, int video_width, int video_height, double video_pixel_aspect, @@ -1020,13 +1071,6 @@ { sxfe_t *this = (sxfe_t*)data; -#ifdef HAVE_OPENGL - // Inform the opengl drawing thread - if (this->opengl_always || this->opengl_hud) { - opengl_trigger_drawing_thread(this); - } -#endif - /* Call the original handler */ this->x.frame_output_handler(data, video_width, video_height, @@ -1037,11 +1081,10 @@ win_x, win_y); /* Set the desitination position if the video window is active */ -#ifdef HAVE_OPENGL - if (!(this->opengl_always || this->opengl_hud)) -#endif if (this->video_win_active) { + pthread_mutex_lock(&this->video_win_mutex); + /* Clear the window if the size has changed */ if (this->video_win_changed) { Window win = this->window[!!this->fullscreen]; @@ -1055,9 +1098,11 @@ *dest_y = this->video_win_y; *dest_width = this->video_win_w; *dest_height = this->video_win_h; - } - this->video_win_changed = 0; + this->video_win_changed = 0; + + pthread_mutex_unlock(&this->video_win_mutex); + } } static int hud_osd_open(sxfe_t *this) @@ -1077,7 +1122,7 @@ return 1; } - this->hud_vis = find_argb_visual(this->display, DefaultScreen(this->display)); + this->hud_vis = find_argb_visual(this->display, this->screen); if(!this->hud_vis) { LOGMSG("find_argb_visual() failed. HUD OSD disabled."); this->hud = 0; @@ -1086,7 +1131,7 @@ } Colormap hud_colormap = XCreateColormap(this->display, - RootWindow(this->display, DefaultScreen(this->display)), + this->root_window, this->hud_vis, AllocNone); XSetWindowAttributes attributes; @@ -1096,7 +1141,7 @@ attributes.colormap = hud_colormap; attributes.backing_store = Always; - this->hud_window = XCreateWindow(this->display, DefaultRootWindow(this->display), + this->hud_window = XCreateWindow(this->display, this->root_window, this->x.xpos, this->x.ypos, this->x.width, this->x.height, 0, 32, InputOutput, this->hud_vis, @@ -1115,7 +1160,7 @@ this->gc = XCreateGC(this->display, this->hud_window, 0, NULL); #ifdef HAVE_XSHM - if(this->completion_event != -1) { + if(this->xshm_completion_event != -1) { this->hud_img = XShmCreateImage(this->display, this->hud_vis, 32, ZPixmap, NULL, &(this->hud_shminfo), HUD_MAX_WIDTH, HUD_MAX_HEIGHT); @@ -1138,10 +1183,6 @@ } #ifdef HAVE_XSHAPE - if (this->opengl_always || this->opengl_hud) { - this->xshape_hud = 0; - } - if (this->xshape_hud) { // Check if extension is available @@ -1167,15 +1208,17 @@ } } #endif - this->hud_visible = 0; + this->osd_visible = 0; this->surf_win = xrender_surf_adopt(this->display, this->hud_window, this->hud_vis, HUD_MAX_WIDTH, HUD_MAX_HEIGHT); this->surf_img = xrender_surf_new(this->display, this->hud_window, this->hud_vis, HUD_MAX_WIDTH, HUD_MAX_HEIGHT, 1); - if (this->xshape_hud || this->opengl_hud || this->opengl_always) +#ifdef HAVE_XSHAPE + if (this->xshape_hud) this->surf_back_img = xrender_surf_new(this->display, this->hud_window, this->hud_vis, DisplayWidth(this->display, this->screen), DisplayHeight(this->display, this->screen), 1); +#endif XUnlockDisplay(this->display); @@ -1206,7 +1249,7 @@ Window tmp_win; XLockDisplay(this->display); XTranslateCoordinates(this->display, this->window[0], - DefaultRootWindow(this->display), + this->root_window, 0, 0, &hud_x, &hud_y, &tmp_win); XResizeWindow(this->display, this->hud_window, width, height); XMoveWindow(this->display, this->hud_window, hud_x, hud_y); @@ -1236,14 +1279,12 @@ if (fev->type == FocusIn) { /* Show HUD again if sxfe window receives focus */ - if (!(this->opengl_always || this->opengl_hud)) - XMapWindow(this->display, this->hud_window); + XMapWindow(this->display, this->hud_window); } else if (fev->type == FocusOut) { /* Dismiss HUD window if focusing away from frontend window */ - if (!(this->opengl_always || this->opengl_hud)) - XUnmapWindow(this->display, this->hud_window); + XUnmapWindow(this->display, this->hud_window); } XUnlockDisplay(this->display); @@ -1257,7 +1298,7 @@ LOGDBG("closing hud window..."); #ifdef HAVE_XSHM - if(this->completion_event != -1) { + if(this->xshm_completion_event != -1) { XShmDetach(this->display, &(this->hud_shminfo)); XDestroyImage(this->hud_img); shmdt(this->hud_shminfo.shmaddr); @@ -1273,12 +1314,13 @@ if (this->shape_mask_pixmap) XFreePixmap(this->display, this->shape_mask_pixmap); free(this->shape_mask_mem); + + if (this->surf_back_img) + xrender_surf_free(this->display, this->surf_back_img); #endif if(this->surf_img) xrender_surf_free(this->display, this->surf_img); - if (this->surf_back_img) - xrender_surf_free(this->display, this->surf_back_img); if(this->surf_win) xrender_surf_free(this->display, this->surf_win); @@ -1435,12 +1477,12 @@ /* create and display our video window */ - this->window[0] = XCreateWindow (this->display, DefaultRootWindow(this->display), + this->window[0] = XCreateWindow (this->display, this->root_window, this->x.xpos, this->x.ypos, this->x.width, this->x.height, 1, CopyFromParent, InputOutput, CopyFromParent, xswa_mask, &xswa); - this->window[1] = XCreateWindow (this->display, DefaultRootWindow(this->display), + this->window[1] = XCreateWindow (this->display, this->root_window, this->xinerama_x, this->xinerama_y, this->x.width, this->x.height, 0, CopyFromParent, InputOutput, CopyFromParent, @@ -1460,7 +1502,7 @@ } /* Window name */ - const char *initial_title = (!this->x.keypress) ? "Connecting to VDR ..." : "Local VDR"; + const char *initial_title = (!this->fe.fe_message_cb) ? "Connecting to VDR ..." : "Local VDR"; XStoreName(this->display, this->window[0], initial_title); XStoreName(this->display, this->window[1], initial_title); @@ -1471,6 +1513,187 @@ #ifdef HAVE_OPENGL +/* + * OpenGL OSD + */ + +static void opengl_fill_argb(uint32_t* dst, int dst_pitch, + const struct osd_command_s *cmd) +{ + int x0 = cmd->dirty_area.x1; + int y0 = cmd->dirty_area.y1; + int w = cmd->dirty_area.x2 - cmd->dirty_area.x1 + 1; + int h = cmd->dirty_area.y2 - cmd->dirty_area.y1 + 1; + int x, y; + + uint32_t *src = (uint32_t*)cmd->raw_data; + + dst += (cmd->y + y0) * dst_pitch + cmd->x + x0; + src += y0 * cmd->w + x0; + + for (y = h; y; y--){ + for (x = 0; x < w; x++) { + uint32_t value = src[x]; + dst[x] = (value<<8)|((value>>24)&0xFF); + } + src += cmd->w; + dst += dst_pitch; + } +} + +static void opengl_osd_draw(sxfe_t *this, const struct osd_command_s *cmd) +{ + // Copy the image to the texture and inform the opengl thread + pthread_mutex_lock(&this->opengl_osd_texture_img_mutex); + + uint32_t *dst = this->opengl_osd_texture_img; + + switch (cmd->cmd) { + case OSD_Set_LUT8: + osd_fill_lut8(dst, this->osd_width, 0, cmd); + break; + + case OSD_Set_ARGB: + opengl_fill_argb(dst, this->osd_width, cmd); + break; + + case OSD_Set_RLE: + rle_uncompress_rgba(dst + cmd->y * this->osd_width + cmd->x, + cmd->w, cmd->h, this->osd_width, + cmd->data, cmd->num_rle, + cmd->palette, cmd->colors); + break; + + default: + LOGMSG("opengl_fill_img_memory(): unsupported format"); + break; + } + + this->opengl_osd_texture_img_updated = 1; + pthread_mutex_unlock(&this->opengl_osd_texture_img_mutex); +} + +static void opengl_osd_hide(sxfe_t *this) +{ + if (!this->osd_visible) + return; + + this->osd_visible = 0; + this->video_win_active = 0; +} + +static void opengl_osd_show(sxfe_t *this) +{ + if (this->osd_visible) + return; + + pthread_mutex_lock(&this->opengl_osd_texture_img_mutex); + + this->osd_visible = 1; + this->video_win_active = 0; + + free(this->opengl_osd_texture_img); + size_t size = sizeof(uint32_t) * this->osd_width * this->osd_height; + this->opengl_osd_texture_img = malloc(size); + memset(this->opengl_osd_texture_img, 0, size); + this->opengl_osd_texture_img_updated = 1; + + pthread_mutex_unlock(&this->opengl_osd_texture_img_mutex); + + XFlush(this->display); +} + +static int opengl_osd_command(frontend_t *this_gen, struct osd_command_s *cmd) +{ + sxfe_t *this = (sxfe_t*)this_gen; + + if (this && cmd) + if (this->opengl_always || this->opengl_hud) { + + osd_command(this, cmd); + + if (!(cmd->flags & OSDFLAG_TOP_LAYER)) + return 1; + + XLockDisplay(this->display); + switch (cmd->cmd) { + case OSD_Size: /* Set size of VDR OSD area */ + LOGDBG("OpenGL OSD Size"); + opengl_osd_show(this); + break; + + case OSD_Set_LUT8: + case OSD_Set_ARGB: + case OSD_Set_RLE: /* Create/update OSD window. Data is rle-compressed. */ + LOGDBG("OpenGL OSD Set"); + opengl_osd_draw(this, cmd); + break; + + case OSD_Close: /* Close OSD window */ + LOGDBG("OpenGL OSD Close"); + opengl_osd_hide(this); + break; + + default: + break; + } + XUnlockDisplay(this->display); + } + return 1; +} + +/* + * OpenGL + */ + +/* + * Signals a change to the opengl drawing thread + */ +void opengl_trigger_drawing_thread(sxfe_t *this) +{ + pthread_mutex_lock(&this->opengl_redraw_mutex); + this->opengl_redraw_request_nr++; + pthread_cond_signal(&this->opengl_redraw_cv); + pthread_mutex_unlock(&this->opengl_redraw_mutex); +} + +/* + * Wait until drawing is finished + */ +void opengl_wait_drawing_finished(sxfe_t *this) +{ + pthread_mutex_lock(&this->opengl_redraw_finished_mutex); + if (this->opengl_redraw_request_nr != this->opengl_redraw_served_nr) + pthread_cond_wait(&this->opengl_redraw_finished_cv, &this->opengl_redraw_finished_mutex); + pthread_mutex_unlock(&this->opengl_redraw_finished_mutex); +} + +static void opengl_frame_output_cb (void *data, + int video_width, int video_height, + double video_pixel_aspect, + int *dest_x, int *dest_y, + int *dest_width, int *dest_height, + double *dest_pixel_aspect, + int *win_x, int *win_y) +{ + sxfe_t *this = (sxfe_t*)data; + + /* Inform the opengl drawing thread */ + opengl_trigger_drawing_thread(this); + + /* Wait until the thrad is finished */ + opengl_wait_drawing_finished(this); + + /* Call the original handler */ + this->x.frame_output_handler(data, + video_width, video_height, + video_pixel_aspect, + dest_x, dest_y, + dest_width, dest_height, + dest_pixel_aspect, + win_x, win_y); +} + #if 0 static void time_measure_start(struct timeval *time_start) { @@ -1506,6 +1729,7 @@ if (glXGetProcAddressARB) { +#if 0 if (!(waitVideoSync = (void *)glXGetProcAddressARB((unsigned char *)"glXWaitVideoSyncSGI"))) { LOGMSG("glXGetProcAddressARB(glXWaitVideoSyncSGI) failed"); goto error; @@ -1514,6 +1738,7 @@ LOGMSG("glXGetProcAddressARB(glXGetVideoSyncSGI) failed"); goto error; } +#endif if (!(bindTexImage = (void *)glXGetProcAddressARB((unsigned char *)"glXBindTexImageEXT"))) { LOGMSG("glXGetProcAddressARB(glXBindTexImageEXT) failed"); goto error; @@ -1529,6 +1754,7 @@ LOGMSG("opengl_init(): can not get pointer to glXBindTexImageEXT"); goto error; } +#if 0 getVideoSync = dlsym(dlhand,"glXGetVideoSyncSGI"); if (dlerror() != NULL) { LOGMSG("opengl_init(): can not get pointer to glXGetVideoSyncSGI"); @@ -1539,6 +1765,7 @@ LOGMSG("opengl_init(): can not get pointer to glXWaitVideoSyncSGI"); goto error; } +#endif } dlclose(dlhand); @@ -1552,7 +1779,6 @@ static int opengl_init(sxfe_t *this) { int glx_major, glx_minor; - Window root; int n; GLXFBConfig *fbconfigs; GLXFBConfig fbcroot; @@ -1634,11 +1860,13 @@ return -1; } LOGVERBOSE("Found texture from pixmap extension"); +#if 0 if (!strstr (glxExtensions, "GLX_SGI_video_sync")) { LOGMSG("No sgi video sync extension"); return -1; } LOGVERBOSE("Found sgi video sync extension"); +#endif // Get handles to important functions if (opengl_init_dl(this) < 0) { @@ -1646,7 +1874,6 @@ } // Get properties of the root window - root = RootWindow (this->display, this->screen); this->screen_width = DisplayWidth (this->display, this->screen); this->screen_height = DisplayHeight (this->display, this->screen); @@ -1659,9 +1886,9 @@ fbcroot = fbconfigs[0]; XFree (fbconfigs); visinfo = glXChooseVisual(this->display, this->screen, fbc_attr2); - attr.colormap = XCreateColormap (this->display, root, visinfo->visual, AllocNone); + attr.colormap = XCreateColormap (this->display, this->root_window, visinfo->visual, AllocNone); attr.override_redirect = True; - this->opengl_window = XCreateWindow (this->display, root, + this->opengl_window = XCreateWindow (this->display, this->root_window, 0, 0, this->screen_width, this->screen_height, 0, visinfo->depth, InputOutput, visinfo->visual, CWColormap | CWOverrideRedirect, &attr); @@ -1720,10 +1947,8 @@ bindTexImage (this->display, glxpixmap, GLX_FRONT_LEFT_EXT, NULL); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glxpixmap = glXCreatePixmap (this->display, fbcroot, this->surf_back_img->draw, pixmapAttribs); glGenTextures (1, &this->osd_texture); glBindTexture (GL_TEXTURE_2D, this->osd_texture); - bindTexImage (this->display, glxpixmap, GLX_FRONT_LEFT_EXT, NULL); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -1758,9 +1983,9 @@ static void *opengl_draw_frame_thread(void *arg) { sxfe_t *this=(sxfe_t *) arg; - int unsigned sync; + //int unsigned sync; int draw_frame = 0, window_mapped = 0, keep_osd_open = 0; - int prev_hud_visible = 0; + int prev_osd_visible = 0; int16_t video_x0, video_y0, video_x1, video_y1; int16_t osd_x0 ,osd_y0, osd_x1, osd_y1; GLfloat osd_alpha = 0; @@ -1768,9 +1993,13 @@ static int unsigned count = 0; int16_t win_width = -1, win_height = -1; int16_t win_x = -1, win_y = -1; +#ifdef HAVE_XSHAPE XRectangle xrect; - XDouble video_tex_width, video_tex_height; +#endif + GLfloat video_tex_width, video_tex_height; int first_frame = 1; + int force_redirect = 0; + //struct timeval t; XLockDisplay (this->display); if (opengl_init(this) < 0) { @@ -1784,9 +2013,11 @@ // Wait for trigger pthread_mutex_lock(&this->opengl_redraw_mutex); + if (this->opengl_redraw_served_nr == this->opengl_redraw_request_nr) { pthread_cond_wait(&this->opengl_redraw_cv, &this->opengl_redraw_mutex); + } pthread_mutex_unlock(&this->opengl_redraw_mutex); - count++; + //time_measure_start(&t); // Check if we should exit if (this->opengl_deinit) @@ -1801,21 +2032,22 @@ win_y = this->x.ypos; win_width = this->x.width; win_height = this->x.height; + force_redirect = 1; + + // Set the shape of the opengl window +#ifdef HAVE_XSHAPE xrect.x = win_x; xrect.y = win_y; xrect.width = win_width; xrect.height = win_height; - - // Set the shape of the opengl window -#ifdef HAVE_XSHAPE - if (this->xshape_hud) + if (this->opengl_xshape_available) XShapeCombineRectangles(this->display, this->opengl_window, ShapeBounding, 0, 0, &xrect, 1, ShapeSet, 0); -#endif +#endif } LOGVERBOSE("win_x=%d win_y=%d win_width=%d win_height=%d", win_x, win_y, win_width, win_height); // Update the global alpha value of the OSD keep_osd_open = 0; - if (this->hud_visible) { + if (this->osd_visible) { if (osd_alpha < 1.0) { osd_alpha += osd_alpha_step; if (osd_alpha > 1.0) @@ -1833,20 +2065,21 @@ LOGVERBOSE("osd_alpha=%.2f keep_osd_open=%d", osd_alpha, keep_osd_open); // Decide if we need to do something - draw_frame = (this->hud_visible || keep_osd_open || this->opengl_always); - if ((this->opengl_hud && this->hud_visible && !prev_hud_visible) || - (this->opengl_always && first_frame)) { + draw_frame = (this->osd_visible || window_mapped || this->opengl_always); + if ((this->opengl_hud && this->osd_visible && (!prev_osd_visible || force_redirect)) || + (this->opengl_always && (first_frame || force_redirect))) { LOGDBG("redirecting video to opengl frame texture"); xine_port_send_gui_data(this->x.video_port, XINE_GUI_SEND_DRAWABLE_CHANGED, (void*) this->video_frame_pixmap); draw_frame = 0; // first frame not yet available in pixmap + count = 0; osd_alpha -= 2*osd_alpha_step; // delay the osd } - if (this->opengl_hud && !this->hud_visible && prev_hud_visible && !keep_osd_open && !this->opengl_always) { + if (this->opengl_hud && !this->osd_visible && prev_osd_visible && !keep_osd_open && !this->opengl_always) { LOGDBG("redirecting video to window"); xine_port_send_gui_data(this->x.video_port, XINE_GUI_SEND_DRAWABLE_CHANGED, (void*) this->window[this->fullscreen ? 1 : 0]); - draw_frame = 1; // draw the last frame + count = 0; } if (draw_frame) { LOGVERBOSE("drawing frame nr %d", count); @@ -1854,12 +2087,14 @@ video_tex_width = 1.0; video_tex_height = 1.0; if (this->video_win_active) { + pthread_mutex_lock(&this->video_win_mutex); video_x0 = win_x + this->video_win_x; video_y0 = win_y + this->video_win_y; - video_tex_width = ((XDouble)win_width) / (XDouble)this->screen_width; - video_tex_height = ((XDouble)win_height) / (XDouble)this->screen_height; + video_tex_width = ((GLfloat)win_width) / (GLfloat)this->screen_width; + video_tex_height = ((GLfloat)win_height) / (GLfloat)this->screen_height; video_x1 = video_x0 + (this->video_win_w - 1); video_y1 = video_y0 + (this->video_win_h - 1); + pthread_mutex_unlock(&this->video_win_mutex); } else { video_x0 = win_x; video_y0 = win_y; @@ -1868,8 +2103,8 @@ } osd_x0 = win_x; osd_y0 = win_y; - osd_x1 = osd_x0 + this->screen_width - 1; - osd_y1 = osd_y0 + this->screen_height - 1; + osd_x1 = osd_x0 + win_width - 1; + osd_y1 = osd_y0 + win_height - 1; video_y0 = (this->screen_height - 1) - video_y0; video_y1 = (this->screen_height - 1) - video_y1; osd_y0 = (this->screen_height - 1) - osd_y0; @@ -1885,9 +2120,23 @@ glTexCoord2f(video_tex_width, 0.0); glVertex3f(video_x1, video_y0, 0.0); glTexCoord2f(0.0, 0.0); glVertex3f(video_x0, video_y0, 0.0); glEnd(); - if (this->hud_visible || keep_osd_open) { - glColor4f(1.0f, 1.0f, 1.0f, osd_alpha); + if (this->osd_visible || keep_osd_open) { + + // Check if we need to update the image glBindTexture (GL_TEXTURE_2D, this->osd_texture); + pthread_mutex_lock(&this->opengl_osd_texture_img_mutex); + if (this->opengl_osd_texture_img_updated) { + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, this->osd_width, this->osd_height, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, this->opengl_osd_texture_img); + GLenum error = glGetError(); + if (error != GL_NO_ERROR) { + LOGERR("Can't update hud image texture"); + } + this->opengl_osd_texture_img_updated = 0; + } + pthread_mutex_unlock(&this->opengl_osd_texture_img_mutex); + + // Draw the hud + glColor4f(1.0f, 1.0f, 1.0f, osd_alpha); glBegin(GL_QUADS); glTexCoord2f(0.0, 1.0); glVertex3f(osd_x0, osd_y1 , 0.0); glTexCoord2f(1.0, 1.0); glVertex3f(osd_x1, osd_y1, 0.0); @@ -1897,10 +2146,9 @@ } glXSwapBuffers(this->display, this->opengl_window); XUnlockDisplay(this->display); + count++; } - if ((this->hud_visible && prev_hud_visible && !window_mapped) || (first_frame && this->opengl_always)) { - (*getVideoSync) (&sync); - (*waitVideoSync) (2, (sync + 1) % 2, &sync); // ensure that window shows correct frame + if ((this->osd_visible && count==2 && !window_mapped) || (first_frame && this->opengl_always) || force_redirect) { LOGDBG("mapping opengl window"); XLockDisplay(this->display); XRaiseWindow (this->display, this->opengl_window); @@ -1908,7 +2156,7 @@ XUnlockDisplay(this->display); window_mapped = 1; } - if (!this->hud_visible && !prev_hud_visible && window_mapped && !keep_osd_open && !this->opengl_always) { + if (!this->osd_visible && count==3 && window_mapped && !keep_osd_open && !this->opengl_always) { LOGDBG("unmapping opengl window"); XLockDisplay(this->display); XLowerWindow (this->display, this->opengl_window); @@ -1917,9 +2165,18 @@ window_mapped = 0; } if (!keep_osd_open) { - prev_hud_visible = this->hud_visible; + prev_osd_visible = this->osd_visible; } first_frame = 0; + force_redirect = 0; + //LOGVERBOSE("drawing time = %d",time_measure_end(&t)); + + // Drawing is finished + pthread_mutex_lock(&this->opengl_redraw_finished_mutex); + this->opengl_redraw_served_nr++; + pthread_cond_signal(&this->opengl_redraw_finished_cv); + pthread_mutex_unlock(&this->opengl_redraw_finished_mutex); + } // Free resources @@ -1932,10 +2189,34 @@ LOGDBG("sxfe_display_open: starting opengl drawing thread"); pthread_mutex_init(&this->opengl_redraw_mutex, NULL); pthread_cond_init(&this->opengl_redraw_cv, NULL); + this->opengl_redraw_request_nr = 0; + this->opengl_redraw_served_nr = 0; + pthread_mutex_init(&this->opengl_redraw_finished_mutex, NULL); + pthread_cond_init(&this->opengl_redraw_finished_cv, NULL); + pthread_mutex_init(&this->opengl_osd_texture_img_mutex, NULL); pthread_attr_t attr; + struct sched_param param; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - if (pthread_create(&this->opengl_drawing_thread, NULL, opengl_draw_frame_thread, (void *)this)) { + pthread_attr_getschedparam(&attr, ¶m); + param.sched_priority = sched_get_priority_min(SCHED_OTHER); + pthread_attr_setschedparam(&attr, ¶m); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + this->x.vis_x11.frame_output_cb = opengl_frame_output_cb; // ensure that the opengl drawing thread gets triggered + this->fe.xine_osd_command = opengl_osd_command; // opengl thread needs to get updated with the new hud image + this->osd_width = OSD_DEF_WIDTH; + this->osd_height = OSD_DEF_HEIGHT; + this->opengl_osd_texture_img = malloc(sizeof(uint32_t) * this->osd_width * this->osd_height); + memset((void*)this->opengl_osd_texture_img,0,sizeof(uint32_t)*this->osd_width*this->osd_height); + this->opengl_osd_texture_img_updated = 0; +#ifdef HAVE_XSHAPE + int dummy; + if (XShapeQueryExtension(this->display, &dummy, &dummy)) + this->opengl_xshape_available = 1; + else + this->opengl_xshape_available = 0; +#endif + if (pthread_create(&this->opengl_drawing_thread, &attr, opengl_draw_frame_thread, (void *)this)) { pthread_attr_destroy(&attr); LOGERR("sxfe_display_open: can not start OpenGL drawing thread"); this->opengl_always = this->opengl_hud = 0; /* avoid pthread_join segfault */ @@ -1957,8 +2238,8 @@ int xpos, int ypos, int width, int height, int fullscreen, int hud, int opengl, int modeswitch, const char *modeline, int aspect, - fe_keypress_f keyfunc, int no_x_kbd, int gui_hotkeys, - const char *video_port, int scale_video, int field_order, + int no_x_kbd, int gui_hotkeys, + const char *video_port, int scale_video, const char *aspect_controller, int window_id) { sxfe_t *this = (sxfe_t*)this_gen; @@ -1966,46 +2247,48 @@ if(this->display) this->fe.fe_display_close(this_gen); - if(keyfunc) { - this->x.keypress = keyfunc; - this->x.keypress("XKeySym", ""); /* triggers learning mode */ - } - LOGDBG("sxfe_display_open(width=%d, height=%d, fullscreen=%d, display=%s)", width, height, fullscreen, video_port); - if(hud) { + pthread_mutex_init(&this->video_win_mutex, NULL); + + if(this->fe.fe_message_cb) { + /* trigger key learning mode */ + this->fe.fe_message_cb(this->fe.fe_message_h, "XKeySym", ""); + } + +#if defined(HAVE_XRENDER) || defined(HAVE_OPENGL) + this->osd_width = OSD_DEF_WIDTH; + this->osd_height = OSD_DEF_HEIGHT; +#endif + + if (opengl) { +#ifdef HAVE_OPENGL + LOGDBG("sxfe_display_open: Using opengl to draw video and HUD OSD"); + this->opengl_always = 1; +#else + LOGMSG("sxfe_display_open: Application was compiled without OpenGL support."); + return 0; +#endif + } + else if (hud & HUD_OPENGL) { +#ifdef HAVE_OPENGL + LOGDBG("sxfe_display_open: Using opengl to draw HUD OSD only"); + this->opengl_hud = 1; +#else + LOGMSG("sxfe_display_open: Application was compiled without OpenGL support."); + return 0; +#endif + } else if (hud) { #ifdef HAVE_XRENDER LOGDBG("sxfe_display_open: Enabling HUD OSD"); this->hud = hud; +# ifdef HAVE_XSHAPE this->xshape_hud = !!(hud & HUD_XSHAPE); - this->opengl_hud = !!(hud & HUD_OPENGL); - this->osd_width = OSD_DEF_WIDTH; - this->osd_height = OSD_DEF_HEIGHT; - this->opengl_always = !!opengl; - if (this->opengl_always) { -# ifdef HAVE_OPENGL - LOGDBG("sxfe_display_open: Using opengl to draw video and HUD OSD"); -# else - LOGMSG("sxfe_display_open: Application was compiled without OpenGL support."); - return 0; -# endif - } - if (this->opengl_hud) { -# ifdef HAVE_OPENGL - LOGDBG("sxfe_display_open: Using opengl to draw HUD OSD only"); -# else - LOGMSG("sxfe_display_open: Application was compiled without OpenGL support."); - return 0; # endif - } #else LOGMSG("sxfe_display_open: Application was compiled without XRender support. HUD OSD disabled."); #endif - } else { - if (this->opengl_always || this->opengl_hud) { - LOGERR("sxfe_display_open: the --opengl options must be used with --hud !"); - } } this->x.xpos = xpos; @@ -2016,7 +2299,6 @@ /*this->x.cropping = 0;*/ this->x.overscan = 0; this->x.scale_video = scale_video; - this->x.field_order = field_order ? 1 : 0; this->x.aspect_controller = aspect_controller ? strdup(aspect_controller) : NULL; this->video_win_active = 0; @@ -2058,14 +2340,14 @@ XLockDisplay (this->display); this->screen = DefaultScreen(this->display); - + this->root_window = DefaultRootWindow(this->display); /* #warning sxfe_display_open: TODO: switch vmode */ /* completion event */ - this->completion_event = -1; #ifdef HAVE_XSHM + this->xshm_completion_event = -1; if (XShmQueryExtension (this->display) == True) { - this->completion_event = XShmGetEventBase (this->display) + ShmCompletion; + this->xshm_completion_event = XShmGetEventBase (this->display) + ShmCompletion; } #endif @@ -2077,7 +2359,7 @@ /* Output to existing window ? (embedded to another app) */ if (this->window_id == WINDOW_ID_ROOT) { - this->window_id = DefaultRootWindow(this->display); + this->window_id = this->root_window; } if(this->window_id > 0) { LOGMSG("sxfe_display_open(): Using X11 window %d for output", this->window_id); @@ -2104,7 +2386,7 @@ PointerMotionMask); /* Get notified when root window size changes */ - XSelectInput (this->display, XDefaultRootWindow(this->display), + XSelectInput (this->display, this->root_window, StructureNotifyMask); /* Map current window */ @@ -2148,19 +2430,22 @@ XUnlockDisplay (this->display); -#ifdef HAVE_XRENDER - // Init the osd window - if (!hud_osd_open(this)) - return 0; -# ifdef HAVE_OPENGL - // Start the drawing thread +#ifdef HAVE_OPENGL + // Shall opengl or xrender be used? if (this->opengl_always || this->opengl_hud) { + + // Start the drawing thread if (!opengl_start(this)) return 0; } -# endif // HAVE_OPENGL -#endif // HAVE_XRENDER +#endif + +#ifdef HAVE_XRENDER + // Init the osd window + if (!hud_osd_open(this)) + return 0; +#endif return 1; } @@ -2174,8 +2459,7 @@ int xpos, int ypos, int width, int height, int fullscreen, int modeswitch, const char *modeline, - int aspect, int scale_video, - int field_order) + int aspect, int scale_video) { sxfe_t *this = (sxfe_t*)this_gen; @@ -2222,7 +2506,7 @@ } XSync(this->display, False); if(XTranslateCoordinates(this->display, this->window[this->fullscreen ? 1 : 0], - DefaultRootWindow(this->display), + this->root_window, 0, 0, &tmp_x, &tmp_y, &tmp_win)) { this->x.xpos = tmp_x; this->x.ypos = tmp_y; @@ -2243,7 +2527,6 @@ /*this->vmode_switch = modeswitch;*/ this->x.aspect = aspect; this->x.scale_video = scale_video; - this->x.field_order = field_order ? 1 : 0; return 1; } @@ -2271,7 +2554,7 @@ this->fe.fe_display_config((frontend_t*)this, -1, -1, this->origwidth, this->origheight, fullscreen, 0/*this->vmode_switch*/, NULL/*this->modeline*/, - this->x.aspect, this->x.scale_video, this->x.field_order); + this->x.aspect, this->x.scale_video); this->fullscreen_state_forced = !force; } @@ -2343,7 +2626,7 @@ fe_event = "POWER_OFF"; break; case XK_Escape: - if (!this->x.keypress) /* ESC exits only in remote mode */ + if (!this->fe.fe_message_cb) /* ESC exits only in remote mode */ fe_event = "QUIT"; break; default:; @@ -2388,7 +2671,7 @@ #endif /* root window size changed ? */ - if (cev->window != (Window)this->window_id && cev->window == RootWindow(this->display, this->screen)) { + if (cev->window != (Window)this->window_id && cev->window == this->root_window) { if (this->fullscreen) { if (cev->width != this->x.width || cev->height != this->x.height) { LOGMSG("Root window size changed. Resizing video window from %dx%d to %dx%d", @@ -2438,7 +2721,7 @@ Window tmp_win; XLockDisplay(this->display); if(XTranslateCoordinates(this->display, cev->window, - DefaultRootWindow(this->display), + this->root_window, 0, 0, &tmp_x, &tmp_y, &tmp_win)) { this->x.xpos = tmp_x; this->x.ypos = tmp_y; @@ -2477,7 +2760,7 @@ while(XCheckMaskEvent(this->display, ButtonMotionMask, (XEvent*)mev)); XTranslateCoordinates(this->display, this->window[0], - DefaultRootWindow(this->display), + this->root_window, 0, 0, &xpos, &ypos, &tmp_win); this->x.xpos = (xpos += mev->x_root - this->dragging_x); @@ -2545,6 +2828,18 @@ * * - main X event loop */ + +static void check_mouse_cursor_hide(sxfe_t *this, int64_t elapsed) +{ + if (elapsed > 0 && elapsed < 500) { + this->mousecursor_timeout -= elapsed; + if (this->mousecursor_timeout <= 0) { + // hide Cursor + set_cursor(this->display, this->window[this->fullscreen ? 1 : 0], 0); + } + } +} + static int sxfe_run(frontend_t *this_gen) { sxfe_t *this = (sxfe_t*)this_gen; @@ -2555,24 +2850,29 @@ * watchdog to emergency exit ... */ if (! XPending(this->display)) { + uint64_t poll_time = 0; const int poll_timeout = 50; struct pollfd pfd = { .fd = ConnectionNumber(this->display), .events = POLLIN, }; + + if (this->mousecursor_timeout > 0) { + poll_time = time_ms(); + } + if (poll(&pfd, 1, poll_timeout) < 1 || !(pfd.revents & POLLIN)) { - // timeout expired? if (this->mousecursor_timeout > 0) { - this->mousecursor_timeout -= poll_timeout; - if (this->mousecursor_timeout <= 0) { - // hide Cursor - set_cursor(this->display, this->window[this->fullscreen ? 1 : 0], 0); - } + check_mouse_cursor_hide(this, poll_timeout); } return !this->x.fe.xine_is_finished((frontend_t*)this, 0); } + + if (poll_time) { + check_mouse_cursor_hide(this, elapsed(poll_time)); + } } while (XPending(this->display) > 0) { @@ -2634,8 +2934,10 @@ default:; // ignore other events. } - if (event.type == this->completion_event) +#ifdef HAVE_XSHM + if (event.type == this->xshm_completion_event) xine_port_send_gui_data (this->x.video_port, XINE_GUI_SEND_COMPLETION_EVENT, &event); +#endif } return !this->x.fe.xine_is_finished((frontend_t*)this, 0); @@ -2661,6 +2963,7 @@ if (pthread_join(this->opengl_drawing_thread, &status)) { LOGERR("sxfe_display_close: can not join opengl drawing thread!"); } + free(this->opengl_osd_texture_img); } #endif @@ -2686,6 +2989,8 @@ } XCloseDisplay (this->display); this->display = NULL; + + pthread_mutex_destroy(&this->video_win_mutex); } free(this->x.aspect_controller); @@ -2729,15 +3034,26 @@ int result = this->fe_xine_play(this_gen); + if (result && this->x.input_plugin) { #ifdef HAVE_XRENDER - if (result && this->x.input_plugin && this->hud) { - LOGDBG("sxfe_xine_play: Enabling HUD OSD"); - this->x.input_plugin->f.fe_handle = this_gen; - this->x.input_plugin->f.intercept_osd = hud_osd_command; + if (this->hud) { + LOGDBG("sxfe_xine_play: Enabling HUD OSD"); + this->x.input_plugin->f.fe_handle = this_gen; + this->x.input_plugin->f.intercept_osd = hud_osd_command; - this->x.fe.send_event((frontend_t*)this, "INFO ARGBOSD"); - } + this->x.fe.send_event((frontend_t*)this, "INFO ARGBOSD"); + } #endif /* HAVE_XRENDER */ +#ifdef HAVE_OPENGL + if (this->opengl_always || this->opengl_hud) { + LOGDBG("sxfe_xine_play: Enabling OpenGL OSD"); + this->x.input_plugin->f.fe_handle = this_gen; + this->x.input_plugin->f.intercept_osd = opengl_osd_command; + + this->x.fe.send_event((frontend_t*)this, "INFO ARGBOSD"); + } +#endif /* HAVE_OPENGL */ + } return result; } diff -Nru vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xineliboutput.c vdr-plugin-xineliboutput-1.0.7+cvs20130303/xineliboutput.c --- vdr-plugin-xineliboutput-1.0.7+cvs20111211.1625/xineliboutput.c 2011-12-11 16:26:03.000000000 +0000 +++ vdr-plugin-xineliboutput-1.0.7+cvs20130303/xineliboutput.c 2012-06-13 07:32:24.000000000 +0000 @@ -21,7 +21,7 @@ * * xineliboutput.c: VDR Plugin interface * - * $Id: xineliboutput.c,v 1.46 2011/04/11 08:28:32 phintuka Exp $ + * $Id: xineliboutput.c,v 1.56 2012/06/13 07:32:24 phintuka Exp $ * */ @@ -47,12 +47,11 @@ static const char *DESCRIPTION = trNOOP("X11/xine-lib output plugin"); static const char *MAINMENUENTRY = trNOOP("Media Player"); -cOsdObject *g_PendingMenuAction = NULL; - class cPluginXinelibOutput : public cPlugin { private: // Add any member variables or functions you may need here. + cXinelibDevice *m_Dev; public: cPluginXinelibOutput(void); @@ -87,6 +86,8 @@ // Initialize any member variables here. // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! + + m_Dev = NULL; } cPluginXinelibOutput::~cPluginXinelibOutput() @@ -124,19 +125,17 @@ " (example: )\n" #endif " -f --fullscreen Fullscreen mode (X11)\n" -#ifdef HAVE_XRENDER +#if defined(HAVE_XRENDER) || defined(HAVE_OPENGL) " -D --hud[=flag[,flag]]\n" " Head Up Display OSD (X11)\n" " flags:\n" -# ifdef HAVE_XSHAPE +#endif +#if defined(HAVE_XRENDER) && defined(HAVE_XSHAPE) " xshape Use XShape instead of compositing\n" -# endif -# ifdef HAVE_OPENGL -" opengl Use OpenGL instead of compositing\n" -# endif #endif #ifdef HAVE_OPENGL -" -O --opengl Use OpenGL for video and Head Up Display OSD\n" +" opengl Use OpenGL instead of compositing\n" +" -O --opengl Use OpenGL for video and Head Up Display OSD\n" #endif " -w --width=x Window width\n" " -h --height=x Window width\n" @@ -172,28 +171,36 @@ // Initialize any background activities the plugin shall perform. TRACEF("cPluginXinelibOutput::Initialize"); - cXinelibDevice::Instance(); - return true; + m_Dev = &(cXinelibDevice::Instance()); + + return m_Dev ? m_Dev->InitDevice() : false; } bool cPluginXinelibOutput::Start(void) { // Start any background activities the plugin shall perform. TRACEF("cPluginXinelibOutput::Start"); - return cXinelibDevice::Instance().StartDevice(); + + return m_Dev ? m_Dev->StartDevice() : false; } void cPluginXinelibOutput::MainThreadHook(void) { TRACEF("cPluginXinelibOutput::MainThreadHook"); - return cXinelibDevice::Instance().MainThreadHook(); + + if (m_Dev) { + m_Dev->MainThreadHook(); + } } void cPluginXinelibOutput::Stop(void) { // Start any background activities the plugin shall perform. TRACEF("cPluginXinelibOutput::Stop"); - return cXinelibDevice::Instance().StopDevice(); + + if (m_Dev) { + m_Dev->StopDevice(); + } } cOsdObject *cPluginXinelibOutput::MainMenuAction(void) @@ -201,34 +208,32 @@ // Perform the action when selected from the main VDR menu. TRACEF("cPluginXinelibOutput::MainMenuAction"); - if(xc.main_menu_mode == CloseOsd) { + if (!m_Dev) { + return NULL; + } + if (xc.main_menu_mode == CloseOsd) { xc.main_menu_mode = ShowMenu; return NULL; } - if(g_PendingMenuAction) { - cOsdObject *tmp = g_PendingMenuAction; - g_PendingMenuAction = NULL; + if (xc.pending_menu_action) { + cOsdObject *tmp = xc.pending_menu_action; + xc.pending_menu_action = NULL; return tmp; } - if(xc.hide_main_menu) + if (xc.hide_main_menu) return NULL; -#ifdef HAVE_XV_FIELD_ORDER - xc.field_order = xc.field_order ? 0 : 1; - cXinelibDevice::Instance().ConfigureWindow(xc.fullscreen, xc.width, xc.height, - xc.modeswitch, xc.modeline, xc.display_aspect, - xc.scale_video, xc.field_order); -#endif - return new cMenuXinelib(); + return m_Dev ? new cMenuXinelib(m_Dev) : NULL; } cMenuSetupPage *cPluginXinelibOutput::SetupMenu(void) { // Return a setup menu in case the plugin supports one. TRACEF("cPluginXinelibOutput::SetupMenu"); - return new cMenuSetupXinelib(); + + return m_Dev ? new cMenuSetupXinelib(m_Dev) : NULL; } bool cPluginXinelibOutput::SetupParse(const char *Name, const char *Value) @@ -245,7 +250,7 @@ if(!strcmp(Id, "MediaPlayer-1.0")) { if(CData && *CData) { LOGMSG("Service(%s, %s)", Id, CData); - cPlayerFactory::Launch(pmAudioVideo, CData); + cPlayerFactory::Launch(m_Dev, pmAudioVideo, CData); return true; } LOGMSG("Service(%s) -> true", Id); @@ -255,7 +260,7 @@ else if(!strcmp(Id, "MusicPlayer-1.0")) { if(CData && *CData) { LOGMSG("Service(%s, %s)", Id, CData); - cPlayerFactory::Launch(pmAudioOnly, CData); + cPlayerFactory::Launch(m_Dev, pmAudioOnly, CData); return true; } LOGMSG("Service(%s) -> true", Id); @@ -265,7 +270,7 @@ else if(!strcmp(Id, "DvdPlayer-1.0")) { if(Data && *CData) { LOGMSG("Service(%s, %s)", Id, CData); - cPlayerFactory::Launch(pmNone, CData); + cPlayerFactory::Launch(m_Dev, pmNone, CData); return true; } LOGMSG("Service(%s) -> true", Id); @@ -275,7 +280,7 @@ else if(!strcmp(Id, "ImagePlayer-1.0")) { if(CData && *CData) { LOGMSG("Service(%s, %s)", Id, CData); - cPlayerFactory::Launch(pmVideoOnly, CData); + cPlayerFactory::Launch(m_Dev, pmVideoOnly, CData); return true; } LOGMSG("Service(%s) -> true", Id); @@ -288,9 +293,9 @@ int local_frontend = strstra(CData, xc.s_frontends, -1); if (local_frontend >= 0 && local_frontend < FRONTEND_count && strcmp(CData, xc.local_frontend)) { strn0cpy(xc.local_frontend, xc.s_frontends[local_frontend], sizeof(xc.local_frontend)); - cXinelibDevice::Instance().ConfigureWindow( + m_Dev->ConfigureWindow( xc.fullscreen, xc.width, xc.height, xc.modeswitch, xc.modeline, - xc.display_aspect, xc.scale_video, xc.field_order); + xc.display_aspect, xc.scale_video); } return true; } @@ -327,7 +332,7 @@ if(strcasecmp(Command, "PMDA") == 0) { if(*Option) { LOGMSG("SVDRP(%s, %s)", Command, Option); - cPlayerFactory::Launch(pmAudioVideo, Option); + cPlayerFactory::Launch(m_Dev, pmAudioVideo, Option); return cString("Playing video file"); } else { ReplyCode = 550; // Requested action not taken @@ -338,9 +343,9 @@ else if(strcasecmp(Command, "PDVD") == 0) { if(*Option) { LOGMSG("SVDRP(%s, %s)", Command, Option); - cPlayerFactory::Launch(pmNone, Option); + cPlayerFactory::Launch(m_Dev, pmNone, Option); } else { - cPlayerFactory::Launch(pmNone, "dvd:/"); + cPlayerFactory::Launch(m_Dev, pmNone, "dvd:/"); } return cString("Playing DVD disc"); } @@ -348,7 +353,7 @@ else if(strcasecmp(Command, "PMSC") == 0) { if(*Option) { LOGMSG("SVDRP(%s, %s)", Command, Option); - cPlayerFactory::Launch(pmAudioOnly, Option); + cPlayerFactory::Launch(m_Dev, pmAudioOnly, Option); return cString("Playing music file"); } else { ReplyCode = 550; // Requested action not taken @@ -359,7 +364,7 @@ else if(strcasecmp(Command, "PIMG") == 0) { if(*Option) { LOGMSG("SVDRP(%s, %s)", Command, Option); - cPlayerFactory::Launch(pmVideoOnly, Option); + cPlayerFactory::Launch(m_Dev, pmVideoOnly, Option); return cString("Showing image file"); } else { ReplyCode = 550; // Requested action not taken @@ -370,7 +375,7 @@ else if(strcasecmp(Command, "QMSC") == 0) { if(*Option) { LOGMSG("SVDRP(%s, %s)", Command, Option); - cPlayerFactory::Queue(Option); + cPlayerFactory::Queue(m_Dev, Option); return cString("Queueing music file"); } else { ReplyCode = 550; // Requested action not taken