From 023ea7ef8f9abc7016f6ef33bee028f06af3be9b Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Fri, 9 Feb 2018 22:02:11 +0200 Subject: [PATCH] Rename to vaapidevice. --- .gitignore | 2 +- ChangeLog | 659 ---------------------------- HISTORY | 8 + Makefile | 5 +- README.txt => README | 155 +++---- Todo | 132 ------ audio.c | 4 +- codec.c | 4 +- codec.h | 4 +- iatomic.h | 4 +- misc.h | 4 +- po/de_DE.po | 18 +- ringbuffer.c | 4 +- ringbuffer.h | 4 +- softhddev.c | 6 +- softhddev.h | 4 +- softhddevice.h | 21 - softhddevice_service.h | 65 --- softhddevice.cpp => vaapidevice.cpp | 300 ++++--------- vdr-softhddevice-9999.ebuild | 67 --- video.c | 29 +- video.h | 7 +- 22 files changed, 188 insertions(+), 1318 deletions(-) delete mode 100644 ChangeLog create mode 100644 HISTORY rename README.txt => README (66%) delete mode 100644 Todo delete mode 100644 softhddevice.h delete mode 100644 softhddevice_service.h rename softhddevice.cpp => vaapidevice.cpp (90%) delete mode 100644 vdr-softhddevice-9999.ebuild diff --git a/.gitignore b/.gitignore index 7858ebc6..61f0ccf8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ .chaos # generated files .dependencies -libvdr-softhddevice.so* +libvdr-vaapidevice.so* diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index ab17f584..00000000 --- a/ChangeLog +++ /dev/null @@ -1,659 +0,0 @@ -User johns -Date: - - Preparations for new ffmpeg VDPAU API. - Added VDPAU multi decoder loop changes to VA-API code. - Reenabled VA-API auto detection. - Check and enforce USE_PIP is defined, for new code. - Fix comment spelling. - Disabled old code before removement. - Handle change of audio ac3 downmix direct. - Speedup queuing output surface, when decoder buffers are full. - Fix bug: info shows wrong decoded video surfaces. - Calculate queued output surfaces and show them in info message. - Add support for new API of vdr 2.3.1. - Fix bug: EnableDPMSatBlackScreen only available with USE_SCREENSAVER. - - H264_EOS_TRICKSPEED and USE_MPEG_COMPLETE enabled as default. - -User master_red -Date: Mon Aug 10 15:29:33 CEST 2015 - - Configurable enable DPMS, while black screen is displayed. - -User johns -Date: Tue Jun 30 10:12:09 CET 2015 - - Fix bug: wrong and crash, if vdr draws pixmaps outside OSD. - Fix bug: wrong version number check for av_frame_alloc(), ... - Workaround for ffmpeg 2.6 artifacts. - Fix bug: brightness and .. are calculated wrong. - Add automatic frame rate detection for older ffmpeg versions. - Fix bug: destroyed vdpau surfaces still used in queue. - Fix bug: need signed char, if compiler has unsigned chars. - Try smaller audio puffer, if default size fails. - Fix bug: center cut-out didn't use cut off pixels. - Fix bug #2058: support for Make.plgcfg. - Fix for compile with vdr 2.1.10, for older vdr versions. - -User jinx -Date: Mon Feb 16 09:58:06 CET 2015 - - Enable toggle AC3 downmix. - -User johns -Date: Thu Feb 12 10:30:50 CET 2015 - - Compile with vdr 2.1.10. - Fix bug: AVCodecContext.framerate not supported. - Use video stream frame rate for A/V sync. - -User Antti Seppälä -Date: Thu Oct 16 14:15:15 CEST 2014 - - Corrected black surface for va-api. - -User johns -Date: Thu Oct 16 14:05:17 CEST 2014 - - Newer va-api intel drivers support PutImage. - Use more portable fork for vfork. - Fix crash with VA-API vdpau backend. - -User mini73 -Date: Sat Oct 11 16:53:18 CEST 2014 - - Fix bug: random rubbish at the end of letter. - -User johns -Date: Tue Sep 23 12:36:39 CEST 2014 - - Fix audio thread close race condition. - Support ffmpeg new AVFrame API in the audio codec. - Config for automatic AES parameters. - Use GCC built-in functions for atomic operations. - -User master_red -Date: Wed Jun 4 14:44:32 CEST 2014 - - Support detach or suspend in plugin menu. - -User johns -Date: Fri May 30 10:18:20 CEST 2014 - - Fix "make clean-plugins". - Fix compile with newer libav. - Fix OSD bugs. - Add some VA-API VPP info outputs. - Remove build files for old unstable VDR. - -User hd.brummy -Date: Thu Jan 30 10:40:49 CET 2014 - - Update gentoo ebuild. - -User johns -Date: Thu Jan 30 10:36:53 CET 2014 - - Fix spelling in arguments help. - Add Workaround for alsa blocking audio device. - Improves thread handling for audio flush and close. - -User mini73 -Date: Fri Jan 24 11:30:49 CET 2014 - - Fix bug: learing x11 remote keys fails. - Add support for umlauts in input fields. - -User johns -Date: Tue Jan 14 14:59:44 CET 2014 - - Fix alternative OSD support with VDPAU bitmap surfaces. - Fix compile error with VDR 2.1.3. - Fix bug: memory leak. - PIP close clears the last used PIP channel. - Fix bug: -DOSD_DEBUG uses old (deleted) variable. - Fix bug: Option softhddevice.BlackPicture has no effect. - -User Dr. Seltsam -Date: Tue Nov 5 16:46:34 CET 2013 - - Add support to configure and clear buffers on channel switch. - -User johns -Date: Tue Oct 8 10:18:04 CET 2013 - - CLOCK_REALTIME -> CLOCK_MONOTONIC to allow time changes. - Add function VideoStreamOpen and always use VideoStreamClose. - Softer audio/video sync. - Add function GetStats to the video output module. - Add function ResetStart to the video output module. - Add function SetClosing to the video output module. - Generalize GetVaapiContext to GetHwAccelContext. - Add compile time configurable trickspeed packets dump. - Fix bug #1410: wrong spelled AC-3 and E-AC-3. - Add compile time selectable h264 trickspeed workaround. - Use ffmpeg new names AVCodecID, AV_CODEC_... . - Fix bug: video lagging behind after recording stop. - Reduce PES error messages. - Fix bug #1392: Wrong value for mixing LFE. - Fix bug: wrong grab size, introduced with AMD VDPAU. - Use VDR SPU decoder as default. - Fix bug: grab image negative quality isn't the default 100. - Support AMD VDPAU with surface size != requested size. - Add cache for auto-crop buffer. - Fix opengl and opengl threads bugs. - Initial opengl support with va-api only. - Fix "broken driver" message if empty ring buffer. - Enable seamless audio track change. - Fix bug #1302: Unsupported pixel format crash. - Fix the fix, when sillpicture is called in suspend mode. - Fix crash, when sillpicture is called in suspend mode. - Add workaround for zero width+height and ffmpeg >= 1.2. - -User johns -Date: Sun Mar 17 15:52:42 CET 2013 - - Release Version 0.6.0 - Adds H264 only hardware decoder for still-pictures. - Enable optional VDR-SPU deocder support. - -User anbr -Date: Sun Mar 17 15:49:46 CET 2013 - - Update german translation. - -User cyril -Date: Wed Mar 6 17:05:10 CET 2013 - - Adds raise softhddevice video window support. - -User johns -Date: Wed Mar 6 10:30:27 CET 2013 - - Adds optional only complete mpeg packets support. - Fixes text of EAC-3 pass-through setup. - Try to start or connect to X11 server with -xx. - Try to use HBR (High Bit-Rate) for EAC3. - Improved pass-through (PCM+EAC3) support. - Support VDR 1.7.36 new build system. - Improves VDPAU display preemption handling. - Add modifiers to X11 remote key names (from Sibbi). - Add compatibility with >=ffmpeg 1.1. - Adds PIP (Picture-in-Picture) support. - Split mpeg packets in receiver thread. - -User horchi -Date: Tue Jan 1 17:58:54 CET 2013 - - Adds VDR SeduAtmo Plugin support. - -User johns -Date: Tue Jan 1 15:21:28 CET 2013 - - Support multiple streams with ScaleVideo. - Makes 4:3 and 16:9 display format configurable. - Don't use DVB display format. - -User Zoolook -Date: Tue Jan 1 12:49:19 CET 2013 - - Add support for new vdr ScaleVideo API. - -User johns -Date: Tue Jan 1 12:40:12 CET 2013 - - Add support for old PES HDTV recording. - Disable trickspeed hack, to prevent ffmpeg crash. - Makes X11 server arguments configurable. - Add german translation. - -User FireFly -Date: Sun Nov 18 21:15:50 CET 2012 - - Add german translation. - -User johns -Date: Thu Nov 15 22:28:55 CET 2012 - - Release Version 0.5.2 - -User maverick-me -Date: Mon Nov 5 23:13:42 CET 2012 - - Fix 3d OSD position. - -User maverick-me -Date: Tue Oct 30 16:50:25 CET 2012 - - Add support to change the OSD for 3d SBS/TB streams. - -User johns -Date: Tue Oct 30 12:11:25 CEST 2012 - - Use software decoder for still-pictures. - Add Feature #1103: change audio devices without vdr restart. - Fix bug #1089: Vdpau decoder used wrong number of mpeg reference frames. - Fix bug: with some streams endless loop in pes audio parser. - Report correct video size in cSoftHdDevice::GetVideoSize. - Add picture adjustment support for vdpau. - Revert "mpeg_vdpau" back to "mpegvideo_vdpau". - Fix bug: Can't use software decoder with VDPAU. - Resume plugin, if suspend control stops. - Removes old audio code (!USE_AUDIORING). - Use -DOSD_DEBUG to debug OSD. - -User arttupii -Date: Tue Aug 7 16:46:23 2012 +0200 - - Fix bug #909: Subtitles destroy menu. - Fix bug #1003: Subtitles overlapping. - -User johns -Date: Fri Jul 27 19:15:48 CEST 2012 - - Free used X11 resources colormap, pixmap, cursor. - Fix bug: spelling USE_VAPI wrong, missing functions. - -User johns -Date: Tue Jul 3 16:35:46 CEST 2012 - - Release Version 0.5.1 - Add commandline support to disable hardware decoder. - Display frame statistics in plugin menu. - Fix bug: 100% CPU use during playback. - Fix bug: audio use 100% CPU during pause. - Guard audio skip against old PTS values. - Improved audio skip, after channel switch. - Setup add preview of collapsed tree. - Fix bug: dvd plugin times out. - Makes OSD size configurable. - Support display with non-square pixels. - Initial ADTS (AAC+) support. - Fix bug #959: log flooded with service messages. - -User durchflieger -Date: Mon Apr 30 14:46:51 CEST 2012 - - Adds VDR DFAtmo Plugin support. - -User johns -Date: Mon Apr 30 13:56:26 CEST 2012 - - Fix bug: don't normalize or compress pass-through samples. - Make audio ring buffer size a multiple of 3,5,7,8. - Add reset ring buffer support. - Fix bug: alloca wrong size for audio buffer. - Handle jump in stream like stream start. - Always compile audio drift correction. - Add audio drift correction configuration to the setup. - -User mini73 -Date: Fri Apr 20 16:51:14 CEST 2012 - - Add support for svdr command "stat". - -User johns -Date: Fri Apr 20 16:05:40 CEST 2012 - - Made showing black picture configurable. - Show black picture, if no video stream is available. - Setup split into foldable sections. - Adds show cursor on pointer move and hide after 200ms. - Adds Hot-key support for auto-crop enable/disable/toggle. - Adds detached start mode. - Fix bug: VDPAU looses preemption callback. - Fix bug: X11 server keeps sending USR1 signals, which confuses suspend. - Show message for hot-keys. - Fix bug: playback errors with old PES recordings. - Adds Hot-key support for 4:3 zoom modes. - -User johns -Date: Sat Apr 7 20:21:16 CEST 2012 - - Release Version 0.5.0 - Change audio/video delay with hot-key. - Enable/disable/toggle fullscreen with hot-key (Feature #930). - -User: CafeDelMar -Date: Thu Apr 5 22:44:06 CEST 2012 - - Cutting pixels are now configured for each resolution. - -User johns -Date: Thu Apr 5 15:47:59 CEST 2012 - - Buffer less video and audio. - Fix 100% cpu use, with mp3 plugin. - Audio/Video sync rewrite, trick-speed support moved to video. - Faster VdpauBlackSurface version. - Fix bug: VideoSetPts wrong position for multi frame packets. - -User: CafeDelMar -Date: Mon Mar 26 20:45:54 CEST 2012 - - Add VideoSkipPixels support. - -User johns -Date: Fri Mar 23 18:43:20 CET 2012 - - Add optional argument (display) to ATTA svdrp commmand. - Wakeup display to show OSD for remote learning mode. - Support switching the primary device with svdrp. - Disable and reenable screen saver and DPMS. - Video source code cleanup. - Fix fast backward with some h264 streams. - Make soft start sync setup menu configurable. - Fix bug: StillPicture NAL end of sequence is 10 and not 0x10. - Fix bug: AudioEnqueue crash without sound card. - -User johns -Date: Sun Mar 4 22:35:36 CET 2012 - - Release Version 0.4.9 - Experimental ac3 audio drift correction support. - Removes LPCM detection from TS parser. - Rewrote video/audio start code. - Add support for attach/detach plugin. - OSS needs bigger audio buffers. - Improved audio drift correction support. - Experimental audio drift correction support. - Add SVDRP HOTK command support. - Increased audio buffer time for PES packets. - Support configuration and set of video background. - Survive lost X11 display. - Fix bug: 100% cpu use with plugins like mp3. - Wakeup display thread on channel switch, osd can now be shown without - video. - Makes 60Hz display mode configurable with setup.conf. - Support downmix of AC-3 to stero. - New audio PES packet parser. - Fix bug: Grabbing a JPG image fails while suspended. - Add support for hot keys. - Add support to use characters input in edit mode. - Adds trick speed support. - -User johns -Date: Thu Feb 16 09:59:14 CET 2012 - - Release Version 0.4.8 - Fix bug: wrong start of video packet. - VDPAU: Enables inverse telecine configuration. - Find AC3 (Dolby Digital) inside PES packet. - Fix bug: audio increments invalid audio PTS. - Fix bug: dvd plugin not working. - Fix bug: used frame-> instead of video_ctx-> for old libav/ffmpeg. - -User johns -Date: Mon Feb 13 23:20:26 CET 2012 - - Release Version 0.4.7 - -User FireFly -Date: Mon Feb 13 20:14:11 CET 2012 - - Fix bug: unscaled jpeg includes PNG header. - -User johns -Date: Mon Feb 13 14:58:26 CET 2012 - - VDPAU: Studio levels could be configured in the setup menu. - Window size defaults to fullscreen, if no geometry is given. - -User m.Rcu -Date: Sun Feb 12 20:28:22 CET 2012 - - Jpeg screengrab use VDR RgbToJpeg function. - -User johns -Date: Sun Feb 12 20:14:43 CET 2012 - - Add play/pause audio support. - Fix bug: audible glitch when switching AC-3 pass-through <-> none. - Fix bug: mpeg stills not displayed. - Detect audio stream type only after stream switch. - Detect more h264 streams with leading zeros. - VDPAU: support for studio levels added. - Add support for skip chroma deinterlace to software deinterlacer. - Type of software deinterlacer now configurable from setup menu. - Mixer channel could be set through command line option. - Fix bug: LFE moved to wrong position. - Guard suspend/resume against multiple calls. - Add support for AAC LATM audio streams. - Fix bug: alsa and ffmpeg use different channel layout. - Support more LPCM sample rates and number of channels. - Quick&dirty support for mpeg LPCM streams. - Workaround for text2skin undrawn OSD areas. - Detect dvb LPCM stream and ignore it. - -User johns -Date: Thu Feb 2 23:29:35 CET 2012 - - Release Version 0.4.6 - Warn only on the first duplicated frame in sequence. - Increase audio buffer, if bigger audio delay is used. - Makes SkipLines configure in setup menu. - Auto-crop only enabled with normal 4:3 display mode. - Vaapi updates OSD when cropping changes. - Add A-V info output and compile time option. - Fix bug: VA-API intel software decoder broken by aspect commit. - Add support for 4:3 output modes. - Quicker auto-crop after channel switch. - Add auto-crop support for Intel VA-API backend. - Fix bug: Auto-Crop logo skip didn't use displayed width. - Workaround for mpeg2 FFMpeg + VA-API + Intel GPU hung. - Fix bug: Missing vaSyncSurface and vaDestroyImage. - Fix bug: Only black picture with VA-API hw decoder. - -User HelAu -Date: Mon Jan 30 16:54:47 CET 2012 - - Add support to start the plugin in suspended mode. - -User johns -Date: Mon Jan 30 15:58:21 CET 2012 - - Finished rewrite of video code, to support output modules. - Add aspect change support to software decoder path. - Repair software decoder with vaapi vdpau backend. - Add workaround for Intel VA-API MPEG GPU hung. - -User johns -Date: Sat Jan 28 13:32:12 CET 2012 - - Release Version 0.4.5 - Add configurable skip lines at video top and bottom. - Add auto-crop tolerance configuration. - Reduces audio latency, increases audio buffer time. - Made video_test working again. - Disabled VA-API Intel vaAssociateSubpicture workaround. - Fix bug: Must release lock for VideoPollEvent. - Allow faster video and audio sync. - Fix bug: Software decoder use vaPutImage with intel backend. - Fix bug: Artefacts are shown after mpeg2 channel switch. - Fix bug: VideoReleaseSurface called after VideoExit. - Support external players. - Add VDPAU display preemption support. - -User m.Rcu -Date: Tue Jan 24 22:38:30 CET 2012 - - Add support for grab jpeg image. - -User johns -Date: Tue Jan 24 22:25:33 CET 2012 - - Fix bug: VaapiOsdExit doesn't deassociate osd surface. - Fix bug: First OSD can show random pixels. - Wait for X11 exit and kill it, if not. - Fix still picture handling. - Fix for dead-lock in VdpauExit. - Workaround for dead-lock in VdpauExit. - VDPAU: Add very primitive software scaler for grab image. - VA-API: Add auto-crop support. - Suspend can close/open X11 window, connection and audio device. - -User Morone -Date: Sun Jan 22 16:43:23 CET 2012 - - Use different alsa devices for AC3/pass-through and pcm. - -User johns -Date: Sun Jan 22 11:12:57 CET 2012 - - Add dummy player and control for suspend mode. - Buffertime compile time configurable in ms. - -Date: Sat Jan 21 15:49:16 CET 2012 - - Release Version 0.4.0 - VDPAU: Add grab image support. - VDPAU: Add auto-crop support. - VDPAU: Changed OSD alpha calculation. - Fix bug: Used VideoSharpen for denoise settings. - Instant update deinterlace/... configuration changes. - Fix bug: AudioExit called without AudioInit crash. - -Date: Thu Jan 19 15:58:40 CET 2012 - - Release Version 0.3.5 - OSD improvements: - Use OSD size equal to video window. - Update only dirty area(s) of OSD. - Show/mix only used area of OSD. - Fix bug: vpdau use previous resolution for deint, ... - Fix software deinterlace with VA-API. - Fix bug: transposed digits 567 should be 576. - Audio module cleanup: - Alsa + OSS can be included/build at the same time. - Alsa or OSS can be runtime selected with -a. - Add audio thread support to OSS module. - Add polled audio support to alsa module. - Removed some debug source code. - -Date: Sun Jan 15 16:56:04 CET 2012 - - Release Version 0.3.1 - Fix bug: AudioFreeBytes didn't check if audio running/compiled. - Fix bug: snd_pcm_state: Assertion `pcm' failed. - Add support for fullscreen and fullscreen toogle. - Instant update deinterlace configuration changes. - Fix subtitle position. - Add SVDRP support. - Suspend when user is inactive. - -User Christian Rupper -Date: Tue Jan 10 22:33:14 CET 2012 - - Move objects before $LIBS to avoid link failures with --as-needed. - Do not override CFLAGS for video test. - Rearrange *FLAGS incl. some minor fixes. - Don't override VDRDIR, LIBDIR and TMPDIR in makefile. - Don't abuse LDFLAGS in makefile. - Define CC in makefile. - Include GL/gl.h for the GL_COLOR_BUFFER_BIT definition. - VideoInit() needs an argument. - -User johns -Date: Tue Jan 10 22:32:50 CET 2012 - - Add main menu entry, which suspends the plugin. - Add support for resize window. - Close window sends "close" as remote key press. - -Date: Mon Jan 9 22:09:38 CET 2012 - - Release Version 0.3.0 - Add support of resolution dependend video parameters (deint, scale, ...). - Add support for recording play back. - Add workaround for alsa crash in snd_pcm_prepare. - Fix bug: audio crash on exit. - Fix build with vdr without yaepg support. - Support yaepghd video picture output position change. - -Date: Sat Jan 7 13:20:07 CET 2012 - - Release Version 0.2.0 - Add support for ac3 audio pass through. - Add workaround for alsa not playing hdmi sound. - Fix bug: broken device plugin stop and exit. - Show transparent cursor to hide cursor. - VDPAU: Add color standard support. - VDPAU: Add denoise and sharpness support. - VDPAU: Add skip chroma deinterlace support. - VDPAU: Show OSD only if something is to display, improves performance. - VDPAU: Add deinterlace with only 4 surfaces. - -Date: Thu Jan 4 17:00:00 CET 2012 - - Release Version 0.1.5 - Adds OSS mixer support. - Fix bug: audio new stream is not thread safe. - New audio driver OSS. - Fix bug: needed down sampling of 3/5/6 to 2 channels not reported. - Search audio sync inside PES packets, for insane dvb streams. - Use only the needed number of surfaces. - -Date: Thu Dec 29 19:44:43 CET 2011 - - Release Version 0.1.4 - Prepared vdpau noise reduction support. - Vdpau also displays a black surface, when no video is available. - Fix bug: CodecVideoDecode destroys avpkt. - -Date: Thu Dec 29 00:55:57 CET 2011 - - Release Version 0.1.3 - Add missing VdpauDecoderDestroy. - Cleanup video packet ringbuffer. - Allow build without VDPAU. - Fix bug: swapped end and start. - Support other than "PCM" alsa mixer channels. - -Date: Sat Dec 24 15:26:27 CET 2011 - - Release Version 0.1.2 - Fix wrong decoder->SurfaceField again. - Remove interlaced_frame debug, it can't be used. - Fix new video stream never resets, if buffers full. - -Date: Fri Dec 23 21:31:27 CET 2011 - - Release Version 0.1.1 - Initial VDPAU decoder support. - Initial VDPAU output support. - Configurable audio delay. - Make pts monotonic. - Support old libav and ffmpeg libs. - Support xcb_icccm_set_wm_protocols with xcb-util <0.3.8. - New video/audio sync code. - Support xcb-util <0.3.8. - Use current configuration for setup menu. - Initial support of replay. - Workaround for libva-driver-intel 1080i problems. - DisplayFrame displays now only a single frame. - Add deinterlace/scaling modes to setup. - -Date: Sat Dec 10 00:06:46 CET 2011 - - Release Version 0.0.9 - Pass audio/video PTS to codec. - Fix libva-driver-intel OSD problems. - Add audio resample support. - Reduce program exit crashes. - Add libva-driver-vdpau autodetection. - Add workaround for bugs in libva-driver-vdpau. - Threaded video display handler written. - Add support for unscaled osd (f.e. supported by intel-vaapi) - Add support for 16:9 and 4:3 video streams. - Add buildin X11 server start. - Remove ffmpeg deprecated functions. - Disable display of window cursor. - Can force self as primary device. - Smaller audio buffer. - Don't trust ffmpeg or stream interlace flag. - Fix Makefile. - Add setting analog volume. - -Date: Thu Dec 1 20:48:35 CET 2011 - - Release Version 0.0.5 diff --git a/HISTORY b/HISTORY new file mode 100644 index 00000000..f0c0d431 --- /dev/null +++ b/HISTORY @@ -0,0 +1,8 @@ +========================================= +VDR Plugin 'vaapidevice' Revision History +========================================= + +2018-02-09: Version 1.0.0 + +- Initial version based on softhddevice. + diff --git a/Makefile b/Makefile index c1736fba..25423c38 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id$ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. # By default the main source file also carries this name. -PLUGIN = softhddevice +PLUGIN = vaapidevice ### Configuration (edit this for your needs) @@ -76,7 +75,7 @@ PACKAGE = vdr-$(ARCHIVE) SOFILE = libvdr-$(PLUGIN).so -### Parse softhddevice config +### Parse vaapidevice config ifeq ($(ALSA),1) CONFIG += -DUSE_ALSA diff --git a/README.txt b/README similarity index 66% rename from README.txt rename to README index efa7626f..be561ab0 100644 --- a/README.txt +++ b/README @@ -1,5 +1,3 @@ -@file README.txt @brief A software HD output device for VDR - Copyright (c) 2011 - 2013 by Johns. All Rights Reserved. Contributor(s): @@ -16,53 +14,26 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. -$Id$ - -A software and GPU emulated HD output device plugin for VDR. +A VA-API output device plugin for VDR. + o Based on softhddevice by Johns: http://projects.vdr-developer.org/projects/plg-softhddevice o Video decoder CPU / VAAPI o Video output VAAPI o Audio FFMpeg / Alsa / Analog o Audio FFMpeg / Alsa / Digital o Audio FFMpeg / OSS / Analog o HDMI/SPDIF pass-through - o Software volume, compression, normalize and channel resample o VDR ScaleVideo API - o Software deinterlacer Bob o Autocrop o Grab image o Suspend / Dettach o Letterbox, Stretch and Center cut-out video display modes - o atmo light support with plugin http://github.com/durchflieger/DFAtmo - - o planned: Improved software deinterlacer (yadif or/and ffmpeg filters) - -To compile you must have the 'requires' installed. - -Good luck -johns - -Quickstart: ------------ - -Just type make and use. Install: -------- - 1a) git - - git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git - cd vdr-plugin-softhddevice - make - make install - - 2a) tarball - - Download latest version from: - http://projects.vdr-developer.org/projects/plg-softhddevice/files - tar vxf vdr-softhddevice-*.tar.bz2 - cd softhddevice-* + git clone https://github.com/pesintta/vdr-plugin-vaapidevice.git + cd vdr-plugin-vaapidevice make make install @@ -75,10 +46,6 @@ Setup: environment DISPLAY=:0.0 x11 display name - NO_HW=1 - if set don't use the hardware decoders - NO_MPEG_HW=1 - if set don't use the hardware decoder for mpeg1/2 only if alsa is configured ALSA_DEVICE=default @@ -104,52 +71,52 @@ Setup: /etc/vdr/setup.conf ------ Following is supported: - softhddevice.MakePrimary = 0 - 0 = no change, 1 make softhddevice primary at start + vaapidevice.MakePrimary = 0 + 0 = no change, 1 make vaapidevice primary at start - softhddevice.HideMainMenuEntry = 0 - 0 = show softhddevice main menu entry, 1 = hide entry + vaapidevice.HideMainMenuEntry = 0 + 0 = show vaapidevice main menu entry, 1 = hide entry - softhddevice.Osd.Width = 0 + vaapidevice.Osd.Width = 0 0 = auto (=display, unscaled) n = fixed osd size scaled for display - softhddevice.Osd.Height = 0 + vaapidevice.Osd.Height = 0 0 = auto (=display, unscaled) n = fixed osd size scaled for display - of the next parameters is 576i, 720p, 1080i_fake or 1080i. + of the next parameters is 576i, 720p, 1080i_fake, 1080i, or UHD. 1080i_fake is 1280x1080 or 1440x1080 1080i is "real" 1920x1080 - softhddevice..Scaling = 0 + vaapidevice..Scaling = 0 0 = normal, 1 = fast, 2 = HQ, 3 = anamorphic - softhddevice..Deinterlace = 0 + vaapidevice..Deinterlace = 0 0 = bob, 1 = weave, 2 = temporal, 3 = temporal_spatial, 4 = software (only 0, 1, 4 supported with VA-API) - softhddevice..SkipChromaDeinterlace = 0 - 0 = disabled, 1 = enabled (for slower cards, poor qualität) + vaapidevice..SkipChromaDeinterlace = 0 + 0 = disabled, 1 = enabled (for slower cards, poor quality) - softhddevice..InverseTelecine = 0 + vaapidevice..InverseTelecine = 0 0 = disabled, 1 = enabled - softhddevice..Denoise = 0 + vaapidevice..Denoise = 0 0 .. 1000 noise reduction level (0 off, 1000 max) - softhddevice..Sharpness = 0 + vaapidevice..Sharpness = 0 -1000 .. 1000 noise reduction level (0 off, -1000 max blur, 1000 max sharp) - softhddevice..CutTopBottom = 0 + vaapidevice..CutTopBottom = 0 Cut 'n' pixels at at top and bottom of the video picture. - softhddevice..CutLeftRight = 0 + vaapidevice..CutLeftRight = 0 Cut 'n' pixels at at left and right of the video picture. - softhddevice.AudioDelay = 0 + vaapidevice.AudioDelay = 0 +n or -n ms delay audio or delay video - softhddevice.AudioPassthrough = 0 + vaapidevice.AudioPassthrough = 0 0 = none, 1 = PCM, 2 = MPA, 4 = AC-3, 8 = EAC-3, -X disable for PCM/AC-3/EAC-3 the pass-through device is used and the audio @@ -158,46 +125,46 @@ Setup: /etc/vdr/setup.conf note: MPA/DTS/TrueHD/... aren't supported yet negative values disable passthrough - softhddevice.AudioDownmix = 0 + vaapidevice.AudioDownmix = 0 0 = none, 1 = downmix Use ffmpeg/libav downmix of AC-3/EAC-3 audio to stereo. - softhddevice.AudioSoftvol = 0 + vaapidevice.AudioSoftvol = 0 0 = off, use hardware volume control 1 = on, use software volume control - softhddevice.AudioNormalize = 0 + vaapidevice.AudioNormalize = 0 0 = off, 1 = enable audio normalize - softhddevice.AudioMaxNormalize = 0 + vaapidevice.AudioMaxNormalize = 0 maximal volume factor/1000 of the normalize filter - softhddevice.AudioCompression = 0 + vaapidevice.AudioCompression = 0 0 = off, 1 = enable audio compression - softhddevice.AudioMaxCompression = 0 + vaapidevice.AudioMaxCompression = 0 maximal volume factor/1000 of the compression filter - softhddevice.AudioStereoDescent = 0 + vaapidevice.AudioStereoDescent = 0 reduce volume level (/1000) for stereo sources - softhddevice.AudioBufferTime = 0 + vaapidevice.AudioBufferTime = 0 0 = default (336 ms) 1 - 1000 = size of the buffer in ms - softhddevice.AutoCrop.Interval = 0 + vaapidevice.AutoCrop.Interval = 0 0 disables auto-crop n each 'n' frames auto-crop is checked. - softhddevice.AutoCrop.Delay = 0 + vaapidevice.AutoCrop.Delay = 0 if auto-crop is over 'n' intervals the same, the cropping is used. - softhddevice.AutoCrop.Tolerance = 0 + vaapidevice.AutoCrop.Tolerance = 0 if detected crop area is too small, cut max 'n' pixels at top and bottom. - softhddevice.Background = 0 + vaapidevice.Background = 0 32bit RGBA background color (Red * 16777216 + Green * 65536 + Blue * 256 + Alpha) or hex RRGGBBAA @@ -205,35 +172,35 @@ Setup: /etc/vdr/setup.conf in the setup menu this is entered as (24bit RGB and 8bit Alpha) (Red * 65536 + Green * 256 + Blue) - softhddevice.Suspend.Close = 0 + vaapidevice.Suspend.Close = 0 1 suspend closes x11 window, connection and audio device. - (use svdrpsend plug softhddevice RESU to resume, if you have no lirc) + (use svdrpsend plug vaapidevice RESU to resume, if you have no lirc) - softhddevice.Suspend.X11 = 0 + vaapidevice.Suspend.X11 = 0 1 suspend stops X11 server (not working yet) - softhddevice.60HzMode = 0 + vaapidevice.60HzMode = 0 0 disable 60Hz display mode 1 enable 60Hz display mode - softhddevice.SoftStartSync = 0 + vaapidevice.SoftStartSync = 0 0 disable soft start of audio/video sync 1 enable soft start of audio/video sync - softhddevice.BlackPicture = 0 + vaapidevice.BlackPicture = 0 0 disable black picture during channel switch 1 enable black picture during channel switch - softhddevice.ClearOnSwitch = 0 + vaapidevice.ClearOnSwitch = 0 0 keep video und audio buffers during channel switch 1 clear video and audio buffers on channel switch - softhddevice.Video4to3DisplayFormat = 1 + vaapidevice.Video4to3DisplayFormat = 1 0 pan and scan 1 letter box 2 center cut-out - softhddevice.VideoOtherDisplayFormat = 1 + vaapidevice.VideoOtherDisplayFormat = 1 0 pan and scan 1 pillar box 2 center cut-out @@ -271,8 +238,8 @@ Commandline: SVDRP: ------ - Use 'svdrpsend.pl plug softhddevice HELP' - or 'svdrpsend plug softhddevice HELP' to see the SVDRP commands help + Use 'svdrpsend.pl plug vaapidevice HELP' + or 'svdrpsend plug vaapidevice HELP' to see the SVDRP commands help and which are supported by the plugin. Keymacros: @@ -282,22 +249,22 @@ Keymacros: This are the supported key sequences: - @softhddevice Blue 1 0 disable pass-through - @softhddevice Blue 1 1 enable pass-through - @softhddevice Blue 1 2 toggle pass-through - @softhddevice Blue 1 3 decrease audio delay by 10ms - @softhddevice Blue 1 4 increase audio delay by 10ms - @softhddevice Blue 1 5 toggle ac3 mixdown - @softhddevice Blue 2 0 disable fullscreen - @softhddevice Blue 2 1 enable fullscreen - @softhddevice Blue 2 2 toggle fullscreen - @softhddevice Blue 2 3 disable auto-crop - @softhddevice Blue 2 4 enable auto-crop - @softhddevice Blue 2 5 toggle auto-crop - @softhddevice Blue 3 0 stretch 4:3 to 16:9 - @softhddevice Blue 3 1 letter box 4:3 in 16:9 - @softhddevice Blue 3 2 center cut-out 4:3 to 16:9 - @softhddevice Blue 3 9 rotate 4:3 to 16:9 zoom mode + @vaapidevice Blue 1 0 disable pass-through + @vaapidevice Blue 1 1 enable pass-through + @vaapidevice Blue 1 2 toggle pass-through + @vaapidevice Blue 1 3 decrease audio delay by 10ms + @vaapidevice Blue 1 4 increase audio delay by 10ms + @vaapidevice Blue 1 5 toggle ac3 mixdown + @vaapidevice Blue 2 0 disable fullscreen + @vaapidevice Blue 2 1 enable fullscreen + @vaapidevice Blue 2 2 toggle fullscreen + @vaapidevice Blue 2 3 disable auto-crop + @vaapidevice Blue 2 4 enable auto-crop + @vaapidevice Blue 2 5 toggle auto-crop + @vaapidevice Blue 3 0 stretch 4:3 to 16:9 + @vaapidevice Blue 3 1 letter box 4:3 in 16:9 + @vaapidevice Blue 3 2 center cut-out 4:3 to 16:9 + @vaapidevice Blue 3 9 rotate 4:3 to 16:9 zoom mode Running: -------- diff --git a/Todo b/Todo deleted file mode 100644 index a8ba2cae..00000000 --- a/Todo +++ /dev/null @@ -1,132 +0,0 @@ -@file Todo @brief A software HD output device for VDR - -Copyright (c) 2011 - 2013 by Johns. All Rights Reserved. - -Contributor(s): - -License: AGPLv3 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation, either version 3 of the -License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -$Id: $ - -missing: - documentation of the PIP hotkeys. - svdrp help page missing PIP hotkeys. - svdrp stat: add X11 crashed status. - more software deinterlace (yadif, ...) - more software decoder with software deinterlace - suspend output / energie saver: stop and restart X11 - suspend plugin didn't restore full-screen (is this wanted?) - Option deinterlace off / deinterlace force! - ColorSpace aren't configurable with the gui. - works for me: restart vdr not working, when started x11 was killed. - -video: - subtitle not cleared - subtitle could be asyncron - grab image with hardware and better scaling support - yaepghd changed position is lost on channel switch - pause (live tv) has sometime problems with SAT1 HD Pro7 HD - radio show black background - radio no need to wait on video buffers - starting with radio and own X11 server, shows no video - some low-bandwidth tv channels have hiccups. - check start with 24Hz display rate - crash with ffmpeg without vaapi. - still-picture of PES recordings should use VideoMpegEnqueue. - convert PIX_FMT_... PixelFormat to new names AV_PIX_FMT_..., AVPixelFormat. - atmo service support 3D grab - no warnings during still picture - -libva: - yaepghd (VaapiSetOutputPosition) support - can associate only displayed part of osd - grab image for va-api - remove stderr output of libva init - still many: (workaround export NO_MPEG_HW=1) - [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung - [drm:i915_wait_request] *ERROR* i915_wait_request returns -11 ... - missing OSD support for 3d SBS / Top-Bottom streams, like VPDAU. - PIP support / multistream handling - VA-AP VaapiCleanup crash after channel without video. - -libva: branch vaapi-ext / staging - add support for vaapi-ext / staging - -libva-intel-driver: - deinterlace only supported with vaapi-ext - 1080i does no v-sync (sometimes correct working with vaapi-ext) - OSD has sometimes wrong size (workaround written) - sometimes software decoder deinterlace isn't working and 1080i channels - show artefacts - -libva-vdpau-driver: - G210/GT520 OSD update too slow (needs hardware problem workaround) - hangup on exit (VaapiDelDecoder -> VaapiCleanup - -> vaDestroyContext -> pthread_rwlock_wrlock) - OSD still has some problems with auto-crop and 4:3 zoom. - -libva-xvba-driver: - -x11: - skip multiple configure-notify, handle only the last one. - support embedded mode - -audio: - Make alsa thread/polled and oss thread/polled output module runtime - selectable. - Mute should do a real mute and not only set volume to zero. - Starting suspended and muted, didn't register the mute. - Relaxed audio sync checks at end of packet and already in sync - samplerate problem resume/suspend. - only wait for video start, if video is running. - Not primary device, don't use and block audio/video. - multiple open of audio device, reduce them. - Not all channel conversions are written (f.e. 2->3 ... 5->6 ...) - -audio/alsa: - remix support of unsupported sample rates - -audio/oss: - alsa oss emulation mixer "pcm" not working - oss4 mixer channel not working - ring buffer overflow with alsa oss emulation - -HDMI/SPDIF Passthrough: - only AC-3 written - -playback of recording - pause is not reset, when replay exit (fixed?) - replay/pause need 100% cpu (fixed?) - -plugins: - mp3 plugin needs 100% cpu (bad ::Poll) - -setup: - Setup of decoder type. - Setup of output type. - Some setup parameters are not used until restart. - Can a notice be added to the setup menu? - -unsorted: - stoping vdr while plugin is suspended opens and closes a window. - svdrp prim: support plugin names for device numbers. - check compiletime and runtime ffmpeg/libav version during init. - -future features (not planed for 1.0 - 1.5) - - video out with xv - video out with opengl - software decoder for xv / opengl - save and use auto-crop with channel zapping - - upmix stereo to AC-3 (supported by alsa plugin) diff --git a/audio.c b/audio.c index f3d042ea..cb68f106 100644 --- a/audio.c +++ b/audio.c @@ -1,5 +1,4 @@ -/// -/// @file audio.c @brief Audio module +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2014 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// diff --git a/codec.c b/codec.c index 72b08879..1fe343e0 100644 --- a/codec.c +++ b/codec.c @@ -1,5 +1,4 @@ -/// -/// @file codec.c @brief Codec functions +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// diff --git a/codec.h b/codec.h index 7f253119..9a7587fb 100644 --- a/codec.h +++ b/codec.h @@ -1,5 +1,4 @@ -/// -/// @file codec.h @brief Codec module headerfile +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2013, 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @addtogroup Codec diff --git a/iatomic.h b/iatomic.h index 59e1684a..d033d83b 100644 --- a/iatomic.h +++ b/iatomic.h @@ -1,5 +1,4 @@ -/// -/// @file iatomic.h @brief Misc function header file +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2014 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @addtogroup iatomic diff --git a/misc.h b/misc.h index ec330435..00e8fa6c 100644 --- a/misc.h +++ b/misc.h @@ -1,5 +1,4 @@ -/// -/// @file misc.h @brief Misc function header file +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2012 by Lutz Sammer. All Rights Reserved. /// @@ -18,7 +17,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @addtogroup misc diff --git a/po/de_DE.po b/po/de_DE.po index 7ac028b7..5ae229ee 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-04 20:47+0200\n" +"POT-Creation-Date: 2018-02-09 22:12+0200\n" "PO-Revision-Date: blabla\n" "Last-Translator: blabla\n" "Language-Team: blabla\n" @@ -422,11 +422,11 @@ msgstr "" msgid "[softhddev] ready%s\n" msgstr "" -msgid "A software and GPU emulated HD device" -msgstr "Ein Software und GPU emulieres HD-Gerät" +msgid "VA-API output device" +msgstr "" -msgid "SoftHdDevice" -msgstr "SoftHdDevice" +msgid "VA-API Device" +msgstr "" msgid "[softhddev]: dirty area too big\n" msgstr "" @@ -603,11 +603,11 @@ msgstr "Audio Puffergröße (ms)" msgid "Enable automatic AES" msgstr "Aktiviere automatiche AES" -msgid "Detach SoftHdDevice" +msgid "Detach VA-API Device" msgstr "" -msgid "Suspend SoftHdDevice" -msgstr "Unterbreche SoftHdDevice" +msgid "Suspend VA-API Device" +msgstr "" #, c-format msgid " Frames missed(%d) duped(%d) dropped(%d) total(%d)" @@ -1024,7 +1024,7 @@ msgstr "" msgid "video: out of memory\n" msgstr "" -msgid "softhddev: grab unsupported\n" +msgid "vaapidevice: grab unsupported\n" msgstr "" #, c-format diff --git a/ringbuffer.c b/ringbuffer.c index c9497b19..05161d23 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -1,5 +1,4 @@ -/// -/// @file ringbuffer.c @brief Ringbuffer module +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009, 2011, 2014 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// diff --git a/ringbuffer.h b/ringbuffer.h index 8a2b4c17..a5a7a273 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -1,5 +1,4 @@ -/// -/// @file ringbuffer.h @brief Ringbuffer module header file +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009, 2011 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @addtogroup Ringbuffer diff --git a/softhddev.c b/softhddev.c index 4a0e8b92..d8e99e78 100644 --- a/softhddev.c +++ b/softhddev.c @@ -1,5 +1,4 @@ -/// -/// @file softhddev.c @brief A software HD device plugin for VDR. +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2011 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// #define noDUMP_TRICKSPEED ///< dump raw trickspeed packets @@ -2717,7 +2715,7 @@ int ProcessArgs(int argc, char *const argv[]) // Parse arguments. // #ifdef __FreeBSD__ - if (!strcmp(*argv, "softhddevice")) { + if (!strcmp(*argv, "vaapidevice")) { ++argv; --argc; } diff --git a/softhddev.h b/softhddev.h index aa2a7181..ba1cdef6 100644 --- a/softhddev.h +++ b/softhddev.h @@ -1,5 +1,4 @@ -/// -/// @file softhddev.h @brief software HD device plugin header file. +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2011 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/softhddevice.h b/softhddevice.h deleted file mode 100644 index 3bc44809..00000000 --- a/softhddevice.h +++ /dev/null @@ -1,21 +0,0 @@ -/// -/// @file softhddevice.h @brief software HD device plugin header file. -/// -/// Copyright (c) 2011, 2014 by Johns. All Rights Reserved. -/// -/// Contributor(s): -/// -/// License: AGPLv3 -/// -/// This program is free software: you can redistribute it and/or modify -/// it under the terms of the GNU Affero General Public License as -/// published by the Free Software Foundation, either version 3 of the -/// License. -/// -/// This program is distributed in the hope that it will be useful, -/// but WITHOUT ANY WARRANTY; without even the implied warranty of -/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -/// GNU Affero General Public License for more details. -/// -/// $Id$ -////////////////////////////////////////////////////////////////////////////// diff --git a/softhddevice_service.h b/softhddevice_service.h deleted file mode 100644 index c7c2d5e8..00000000 --- a/softhddevice_service.h +++ /dev/null @@ -1,65 +0,0 @@ -/// -/// @file softhddev_service.h @brief software HD device service header file. -/// -/// Copyright (c) 2012 by durchflieger. All Rights Reserved. -/// -/// Contributor(s): -/// -/// License: AGPLv3 -/// -/// This program is free software: you can redistribute it and/or modify -/// it under the terms of the GNU Affero General Public License as -/// published by the Free Software Foundation, either version 3 of the -/// License. -/// -/// This program is distributed in the hope that it will be useful, -/// but WITHOUT ANY WARRANTY; without even the implied warranty of -/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -/// GNU Affero General Public License for more details. -/// -/// $Id$ -////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#define ATMO_GRAB_SERVICE "SoftHDDevice-AtmoGrabService-v1.0" -#define ATMO1_GRAB_SERVICE "SoftHDDevice-AtmoGrabService-v1.1" -#define OSD_3DMODE_SERVICE "SoftHDDevice-Osd3DModeService-v1.0" - -enum -{ GRAB_IMG_RGBA_FORMAT_B8G8R8A8 }; - -typedef struct -{ - int structSize; - - // request data - int analyseSize; - int clippedOverscan; - - // reply data - int imgType; - int imgSize; - int width; - int height; - void *img; -} SoftHDDevice_AtmoGrabService_v1_0_t; - -typedef struct -{ - int Mode; -} SoftHDDevice_Osd3DModeService_v1_0_t; - -typedef struct -{ - // request/reply data - - int width; - int height; - - // reply data - - int size; - - void *img; -} SoftHDDevice_AtmoGrabService_v1_1_t; diff --git a/softhddevice.cpp b/vaapidevice.cpp similarity index 90% rename from softhddevice.cpp rename to vaapidevice.cpp index c56f7688..13f3ceda 100644 --- a/softhddevice.cpp +++ b/vaapidevice.cpp @@ -1,5 +1,4 @@ -/// -/// @file softhddevice.cpp @brief A software HD device plugin for VDR. +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2011 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// #define __STDC_CONSTANT_MACROS ///< needed for ffmpeg UINT64_C @@ -34,8 +32,6 @@ #endif #include "softhddev.h" -#include "softhddevice.h" -#include "softhddevice_service.h" extern "C" { @@ -60,7 +56,7 @@ extern "C" /// vdr-plugin version number. /// Makefile extracts the version number for generating the file name /// for the distribution archive. -static const char *const VERSION = "0.8.0" +static const char *const VERSION = "1.0.0" #ifdef GIT_REV "-GIT" GIT_REV #endif @@ -68,13 +64,13 @@ static const char *const VERSION = "0.8.0" /// vdr-plugin description. static const char *const DESCRIPTION = -trNOOP("A software and GPU emulated HD device"); +trNOOP("VA-API output device"); /// vdr-plugin text of main menu entry -static const char *MAINMENUENTRY = trNOOP("SoftHdDevice"); +static const char *MAINMENUENTRY = trNOOP("VA-API Device"); - /// single instance of softhddevice plugin device. -static class cSoftHdDevice *MyDevice; + /// single instance of vaapidevice plugin device. +static class cVaapiDevice *MyDevice; ////////////////////////////////////////////////////////////////////////////// @@ -235,7 +231,6 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat, csoft = new cSoftRemote(keymap); } - //Debug(3, "[softhddev]%s %s, %s, %s\n", __FUNCTION__, keymap, key, letter); if (key[1]) { // no single character if (!csoft->Put(key, repeat, release) && letter && !cRemote::IsLearning()) { @@ -1481,9 +1476,9 @@ void cSoftHdMenu::Create(void) SetHasHotkeys(); if (ConfigDetachFromMainMenu) { - Add(new cOsdItem(hk(tr("Detach SoftHdDevice")), osUser1)); + Add(new cOsdItem(hk(tr("Detach VA-API Device")), osUser1)); } else { - Add(new cOsdItem(hk(tr("Suspend SoftHdDevice")), osUser1)); + Add(new cOsdItem(hk(tr("Suspend VA-API Device")), osUser1)); } Add(new cOsdItem(NULL, osUnknown, false)); Add(new cOsdItem(NULL, osUnknown, false)); @@ -1640,8 +1635,6 @@ eOSState cSoftHdMenu::ProcessKey(eKeys key) { eOSState state; - //Debug(3, "[softhddev]%s: %x\n", __FUNCTION__, key); - switch (HotkeyState) { case HksInitial: // initial state, waiting for hot key if (key == kBlue) { @@ -1725,11 +1718,11 @@ eOSState cSoftHdMenu::ProcessKey(eKeys key) // cDevice ////////////////////////////////////////////////////////////////////////////// -class cSoftHdDevice:public cDevice +class cVaapiDevice:public cDevice { public: - cSoftHdDevice(void); - virtual ~ cSoftHdDevice(void); + cVaapiDevice(void); + virtual ~ cVaapiDevice(void); virtual bool HasDecoder(void) const; virtual bool CanReplay(void) const; @@ -1782,18 +1775,16 @@ class cSoftHdDevice:public cDevice /** ** Constructor device. */ -cSoftHdDevice::cSoftHdDevice(void) +cVaapiDevice::cVaapiDevice(void) { - //Debug(3, "[softhddev]%s\n", __FUNCTION__); spuDecoder = NULL; } /** ** Destructor device. */ -cSoftHdDevice::~cSoftHdDevice(void) +cVaapiDevice::~cVaapiDevice(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); delete spuDecoder; } @@ -1802,7 +1793,7 @@ cSoftHdDevice::~cSoftHdDevice(void) ** ** @param on flag if becoming or loosing primary */ -void cSoftHdDevice::MakePrimaryDevice(bool on) +void cVaapiDevice::MakePrimaryDevice(bool on) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, on); @@ -1826,7 +1817,7 @@ void cSoftHdDevice::MakePrimaryDevice(bool on) ** @returns a pointer to the device's SPU decoder (or NULL, if this ** device doesn't have an SPU decoder) */ -cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void) +cSpuDecoder *cVaapiDevice::GetSpuDecoder(void) { Debug(3, "[softhddev]%s:\n", __FUNCTION__); @@ -1839,7 +1830,7 @@ cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void) /** ** Tells whether this device has a MPEG decoder. */ -bool cSoftHdDevice::HasDecoder(void) const +bool cVaapiDevice::HasDecoder(void) const { return true; } @@ -1847,7 +1838,7 @@ bool cSoftHdDevice::HasDecoder(void) const /** ** Returns true if this device can currently start a replay session. */ -bool cSoftHdDevice::CanReplay(void) const +bool cVaapiDevice::CanReplay(void) const { return true; } @@ -1857,7 +1848,7 @@ bool cSoftHdDevice::CanReplay(void) const ** ** @param play_mode new play mode (Audio/Video/External...) */ -bool cSoftHdDevice::SetPlayMode(ePlayMode play_mode) +bool cVaapiDevice::SetPlayMode(ePlayMode play_mode) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, play_mode); @@ -1897,10 +1888,8 @@ bool cSoftHdDevice::SetPlayMode(ePlayMode play_mode) ** Gets the current System Time Counter, which can be used to ** synchronize audio, video and subtitles. */ -int64_t cSoftHdDevice::GetSTC(void) +int64_t cVaapiDevice::GetSTC(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - return::GetSTC(); } @@ -1914,14 +1903,14 @@ int64_t cSoftHdDevice::GetSTC(void) ** @param forward flag forward direction */ #if APIVERSNUM >= 20103 -void cSoftHdDevice::TrickSpeed(int speed, bool forward) +void cVaapiDevice::TrickSpeed(int speed, bool forward) { Debug(3, "[softhddev]%s: %d %d\n", __FUNCTION__, speed, forward); ::TrickSpeed(speed); } #else -void cSoftHdDevice::TrickSpeed(int speed) +void cVaapiDevice::TrickSpeed(int speed) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, speed); @@ -1932,7 +1921,7 @@ void cSoftHdDevice::TrickSpeed(int speed) /** ** Clears all video and audio data from the device. */ -void cSoftHdDevice::Clear(void) +void cVaapiDevice::Clear(void) { Debug(3, "[softhddev]%s:\n", __FUNCTION__); @@ -1943,7 +1932,7 @@ void cSoftHdDevice::Clear(void) /** ** Sets the device into play mode (after a previous trick mode) */ -void cSoftHdDevice::Play(void) +void cVaapiDevice::Play(void) { Debug(3, "[softhddev]%s:\n", __FUNCTION__); @@ -1954,7 +1943,7 @@ void cSoftHdDevice::Play(void) /** ** Puts the device into "freeze frame" mode. */ -void cSoftHdDevice::Freeze(void) +void cVaapiDevice::Freeze(void) { Debug(3, "[softhddev]%s:\n", __FUNCTION__); @@ -1965,7 +1954,7 @@ void cSoftHdDevice::Freeze(void) /** ** Turns off audio while replaying. */ -void cSoftHdDevice::Mute(void) +void cVaapiDevice::Mute(void) { Debug(3, "[softhddev]%s:\n", __FUNCTION__); @@ -1979,7 +1968,7 @@ void cSoftHdDevice::Mute(void) ** @param data pes or ts data of a frame ** @param length length of data area */ -void cSoftHdDevice::StillPicture(const uchar * data, int length) +void cVaapiDevice::StillPicture(const uchar * data, int length) { Debug(3, "[softhddev]%s: %s %p %d\n", __FUNCTION__, data[0] == 0x47 ? "ts" : "pes", data, length); @@ -2001,11 +1990,9 @@ void cSoftHdDevice::StillPicture(const uchar * data, int length) ** @retval true if ready ** @retval false if busy */ -bool cSoftHdDevice::Poll( +bool cVaapiDevice::Poll( __attribute__ ((unused)) cPoller & poller, int timeout_ms) { - //Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, timeout_ms); - return::Poll(timeout_ms); } @@ -2014,7 +2001,7 @@ bool cSoftHdDevice::Poll( ** ** @param timeout_ms timeout in ms to become ready */ -bool cSoftHdDevice::Flush(int timeout_ms) +bool cVaapiDevice::Flush(int timeout_ms) { Debug(3, "[softhddev]%s: %d ms\n", __FUNCTION__, timeout_ms); @@ -2027,7 +2014,7 @@ bool cSoftHdDevice::Flush(int timeout_ms) ** Sets the video display format to the given one (only useful if this ** device has an MPEG decoder). */ -void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat +void cVaapiDevice:: SetVideoDisplayFormat(eVideoDisplayFormat video_display_format) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, video_display_format); @@ -2043,7 +2030,7 @@ void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat ** ** @param video_format16_9 flag true 16:9. */ -void cSoftHdDevice::SetVideoFormat(bool video_format16_9) +void cVaapiDevice::SetVideoFormat(bool video_format16_9) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, video_format16_9); @@ -2058,7 +2045,7 @@ void cSoftHdDevice::SetVideoFormat(bool video_format16_9) ** ** @note the video_aspect is used to scale the subtitle. */ -void cSoftHdDevice::GetVideoSize(int &width, int &height, double &video_aspect) +void cVaapiDevice::GetVideoSize(int &width, int &height, double &video_aspect) { ::GetVideoSize(&width, &height, &video_aspect); } @@ -2068,7 +2055,7 @@ void cSoftHdDevice::GetVideoSize(int &width, int &height, double &video_aspect) ** ** FIXME: Called every second, for nothing (no OSD displayed)? */ -void cSoftHdDevice::GetOsdSize(int &width, int &height, double &pixel_aspect) +void cVaapiDevice::GetOsdSize(int &width, int &height, double &pixel_aspect) { ::GetOsdSize(&width, &height, &pixel_aspect); } @@ -2082,33 +2069,27 @@ void cSoftHdDevice::GetOsdSize(int &width, int &height, double &pixel_aspect) ** @param length length of PES packet ** @param id type of audio data this packet holds */ -int cSoftHdDevice::PlayAudio(const uchar * data, int length, uchar id) +int cVaapiDevice::PlayAudio(const uchar * data, int length, uchar id) { - //Debug(3, "[softhddev]%s: %p %p %d %d\n", __FUNCTION__, this, data, length, id); - return::PlayAudio(data, length, id); } -void cSoftHdDevice::SetAudioTrackDevice( +void cVaapiDevice::SetAudioTrackDevice( __attribute__ ((unused)) eTrackType type) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); } -void cSoftHdDevice::SetDigitalAudioDevice( __attribute__ ((unused)) bool on) +void cVaapiDevice::SetDigitalAudioDevice( __attribute__ ((unused)) bool on) { - //Debug(3, "[softhddev]%s: %s\n", __FUNCTION__, on ? "true" : "false"); } -void cSoftHdDevice::SetAudioChannelDevice( __attribute__ ((unused)) +void cVaapiDevice::SetAudioChannelDevice( __attribute__ ((unused)) int audio_channel) { - //Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, audio_channel); } -int cSoftHdDevice::GetAudioChannelDevice(void) +int cVaapiDevice::GetAudioChannelDevice(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); return 0; } @@ -2117,7 +2098,7 @@ int cSoftHdDevice::GetAudioChannelDevice(void) ** ** @param volume device volume */ -void cSoftHdDevice::SetVolumeDevice(int volume) +void cVaapiDevice::SetVolumeDevice(int volume) { Debug(3, "[softhddev]%s: %d\n", __FUNCTION__, volume); @@ -2132,9 +2113,8 @@ void cSoftHdDevice::SetVolumeDevice(int volume) ** @param data exactly one complete PES packet (which is incomplete) ** @param length length of PES packet */ -int cSoftHdDevice::PlayVideo(const uchar * data, int length) +int cVaapiDevice::PlayVideo(const uchar * data, int length) { - //Debug(3, "[softhddev]%s: %p %d\n", __FUNCTION__, data, length); return::PlayVideo(data, length); } @@ -2144,7 +2124,7 @@ int cSoftHdDevice::PlayVideo(const uchar * data, int length) ** @param data ts data buffer ** @param length ts packet length (188) */ -int cSoftHdDevice::PlayTsVideo(const uchar * data, int length) +int cVaapiDevice::PlayTsVideo(const uchar * data, int length) { return::PlayTsVideo(data, length); } @@ -2155,7 +2135,7 @@ int cSoftHdDevice::PlayTsVideo(const uchar * data, int length) ** @param data ts data buffer ** @param length ts packet length (188) */ -int cSoftHdDevice::PlayTsAudio(const uchar * data, int length) +int cVaapiDevice::PlayTsAudio(const uchar * data, int length) { if (SoftIsPlayingVideo != cDevice::IsPlayingVideo()) { SoftIsPlayingVideo = cDevice::IsPlayingVideo(); @@ -2174,7 +2154,7 @@ int cSoftHdDevice::PlayTsAudio(const uchar * data, int length) ** @param width number of horizontal pixels in the frame ** @param height number of vertical pixels in the frame */ -uchar *cSoftHdDevice::GrabImage(int &size, bool jpeg, int quality, int width, +uchar *cVaapiDevice::GrabImage(int &size, bool jpeg, int quality, int width, int height) { Debug(3, "[softhddev]%s: %d, %d, %d, %dx%d\n", __FUNCTION__, size, jpeg, @@ -2199,7 +2179,7 @@ uchar *cSoftHdDevice::GrabImage(int &size, bool jpeg, int quality, int width, ** ** @returns the real rectangle or cRect:Null if invalid. */ -cRect cSoftHdDevice::CanScaleVideo(const cRect & rect, +cRect cVaapiDevice::CanScaleVideo(const cRect & rect, __attribute__ ((unused)) int alignment) { return rect; @@ -2210,7 +2190,7 @@ cRect cSoftHdDevice::CanScaleVideo(const cRect & rect, ** ** @param rect video window rectangle */ -void cSoftHdDevice::ScaleVideo(const cRect & rect) +void cVaapiDevice::ScaleVideo(const cRect & rect) { #ifdef OSD_DEBUG Debug(3, "[softhddev]%s: %dx%d%+d%+d\n", __FUNCTION__, rect.Width(), @@ -2235,11 +2215,11 @@ extern "C" uint8_t * CreateJpeg(uint8_t * image, int *size, int quality, // cPlugin ////////////////////////////////////////////////////////////////////////////// -class cPluginSoftHdDevice:public cPlugin +class cPluginVaapiDevice:public cPlugin { public: - cPluginSoftHdDevice(void); - virtual ~ cPluginSoftHdDevice(void); + cPluginVaapiDevice(void); + virtual ~ cPluginVaapiDevice(void); virtual const char *Version(void); virtual const char *Description(void); virtual const char *CommandLineHelp(void); @@ -2264,21 +2244,16 @@ class cPluginSoftHdDevice:public cPlugin ** @note DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL ** VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! */ -cPluginSoftHdDevice::cPluginSoftHdDevice(void) +cPluginVaapiDevice::cPluginVaapiDevice(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); } /** ** Clean up after yourself! */ -cPluginSoftHdDevice::~cPluginSoftHdDevice(void) +cPluginVaapiDevice::~cPluginVaapiDevice(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - ::SoftHdDeviceExit(); - - // keep ConfigX11Display ... } /** @@ -2286,7 +2261,7 @@ cPluginSoftHdDevice::~cPluginSoftHdDevice(void) ** ** @returns version number as constant string. */ -const char *cPluginSoftHdDevice::Version(void) +const char *cPluginVaapiDevice::Version(void) { return VERSION; } @@ -2296,7 +2271,7 @@ const char *cPluginSoftHdDevice::Version(void) ** ** @returns short description as constant string. */ -const char *cPluginSoftHdDevice::Description(void) +const char *cPluginVaapiDevice::Description(void) { return tr(DESCRIPTION); } @@ -2306,7 +2281,7 @@ const char *cPluginSoftHdDevice::Description(void) ** ** @returns command line help as constant string. */ -const char *cPluginSoftHdDevice::CommandLineHelp(void) +const char *cPluginVaapiDevice::CommandLineHelp(void) { return::CommandLineHelp(); } @@ -2314,10 +2289,8 @@ const char *cPluginSoftHdDevice::CommandLineHelp(void) /** ** Process the command line arguments. */ -bool cPluginSoftHdDevice::ProcessArgs(int argc, char *argv[]) +bool cPluginVaapiDevice::ProcessArgs(int argc, char *argv[]) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - return::ProcessArgs(argc, argv); } @@ -2328,11 +2301,9 @@ bool cPluginSoftHdDevice::ProcessArgs(int argc, char *argv[]) ** ** @returns true if any devices are available. */ -bool cPluginSoftHdDevice::Initialize(void) +bool cPluginVaapiDevice::Initialize(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - - MyDevice = new cSoftHdDevice(); + MyDevice = new cVaapiDevice(); return true; } @@ -2340,16 +2311,14 @@ bool cPluginSoftHdDevice::Initialize(void) /** ** Start any background activities the plugin shall perform. */ -bool cPluginSoftHdDevice::Start(void) +bool cPluginVaapiDevice::Start(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - if (!MyDevice->IsPrimaryDevice()) { - Info("[softhddev] softhddevice %d is not the primary device!", + Info("[softhddev] vaapidevice %d is not the primary device!", MyDevice->DeviceNumber()); if (ConfigMakePrimary) { // Must be done in the main thread - Debug(3, "[softhddev] makeing softhddevice %d the primary device!", + Debug(3, "[softhddev] making vaapidevice %d the primary device!", MyDevice->DeviceNumber()); DoMakePrimary = MyDevice->DeviceNumber() + 1; } @@ -2377,51 +2346,41 @@ bool cPluginSoftHdDevice::Start(void) ** Shutdown plugin. Stop any background activities the plugin is ** performing. */ -void cPluginSoftHdDevice::Stop(void) +void cPluginVaapiDevice::Stop(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - ::Stop(); } /** ** Perform any cleanup or other regular tasks. */ -void cPluginSoftHdDevice::Housekeeping(void) +void cPluginVaapiDevice::Housekeeping(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - ::Housekeeping(); } /** ** Create main menu entry. */ -const char *cPluginSoftHdDevice::MainMenuEntry(void) +const char *cPluginVaapiDevice::MainMenuEntry(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - return ConfigHideMainMenuEntry ? NULL : tr(MAINMENUENTRY); } /** ** Perform the action when selected from the main VDR menu. */ -cOsdObject *cPluginSoftHdDevice::MainMenuAction(void) +cOsdObject *cPluginVaapiDevice::MainMenuAction(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - - return new cSoftHdMenu("SoftHdDevice"); + return new cSoftHdMenu("VA-API Device"); } /** ** Called for every plugin once during every cycle of VDR's main program ** loop. */ -void cPluginSoftHdDevice::MainThreadHook(void) +void cPluginVaapiDevice::MainThreadHook(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - if (DoMakePrimary) { Debug(3, "[softhddev]%s: switching primary device to %d\n", __FUNCTION__, DoMakePrimary); @@ -2435,10 +2394,8 @@ void cPluginSoftHdDevice::MainThreadHook(void) /** ** Return our setup menu. */ -cMenuSetupPage *cPluginSoftHdDevice::SetupMenu(void) +cMenuSetupPage *cPluginVaapiDevice::SetupMenu(void) { - //Debug(3, "[softhddev]%s:\n", __FUNCTION__); - return new cMenuSetupSoft; } @@ -2450,12 +2407,10 @@ cMenuSetupPage *cPluginSoftHdDevice::SetupMenu(void) ** ** @returns true if the parameter is supported. */ -bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value) +bool cPluginVaapiDevice::SetupParse(const char *name, const char *value) { int i; - //Debug(3, "[softhddev]%s: '%s' = '%s'\n", __FUNCTION__, name, value); - if (!strcasecmp(name, "MakePrimary")) { ConfigMakePrimary = atoi(value); return true; @@ -2698,71 +2653,8 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value) ** service protocol ** @param data custom data structure */ -bool cPluginSoftHdDevice::Service(const char *id, void *data) +bool cPluginVaapiDevice::Service(const char *id, void *data) { - //Debug(3, "[softhddev]%s: id %s\n", __FUNCTION__, id); - - if (strcmp(id, OSD_3DMODE_SERVICE) == 0) { - SoftHDDevice_Osd3DModeService_v1_0_t *r; - - r = (SoftHDDevice_Osd3DModeService_v1_0_t *) data; - VideoSetOsd3DMode(r->Mode); - return true; - } - - if (strcmp(id, ATMO_GRAB_SERVICE) == 0) { - int width; - int height; - - if (data == NULL) { - return true; - } - - if (SuspendMode != NOT_SUSPENDED) { - return false; - } - - SoftHDDevice_AtmoGrabService_v1_0_t *r = - (SoftHDDevice_AtmoGrabService_v1_0_t *) data; - if (r->structSize != sizeof(SoftHDDevice_AtmoGrabService_v1_0_t) - || r->analyseSize < 64 || r->analyseSize > 256 - || r->clippedOverscan < 0 || r->clippedOverscan > 200) { - return false; - } - - width = r->analyseSize * -1; // Internal marker for Atmo grab service - height = r->clippedOverscan; - - r->img = VideoGrabService(&r->imgSize, &width, &height); - if (r->img == NULL) { - return false; - } - r->imgType = GRAB_IMG_RGBA_FORMAT_B8G8R8A8; - r->width = width; - r->height = height; - return true; - } - - if (strcmp(id, ATMO1_GRAB_SERVICE) == 0) { - SoftHDDevice_AtmoGrabService_v1_1_t *r; - - if (!data) { - return true; - } - - if (SuspendMode != NOT_SUSPENDED) { - return false; - } - - r = (SoftHDDevice_AtmoGrabService_v1_1_t *) data; - r->img = VideoGrabService(&r->size, &r->width, &r->height); - if (!r->img) { - return false; - } - - return true; - } - return false; } @@ -2777,10 +2669,10 @@ bool cPluginSoftHdDevice::Service(const char *id, void *data) static const char *SVDRPHelpText[] = { "SUSP\n" "\040 Suspend plugin.\n\n" " The plugin is suspended to save energie. Depending on the setup\n" - " 'softhddevice.Suspend.Close = 0' only the video and audio output\n" - " is stopped or with 'softhddevice.Suspend.Close = 1' the video\n" + " 'vaapidevice.Suspend.Close = 0' only the video and audio output\n" + " is stopped or with 'vaapidevice.Suspend.Close = 1' the video\n" " and audio devices are closed.\n" - " If 'softhddevice.Suspend.X11 = 1' is set and the X11 server was\n" + " If 'vaapidevice.Suspend.X11 = 1' is set and the X11 server was\n" " started by the plugin, the X11 server would also be closed.\n" " (Stopping X11 while suspended isn't supported yet)\n", "RESU\n" "\040 Resume plugin.\n\n" @@ -2797,7 +2689,7 @@ static const char *SVDRPHelpText[] = { " -a audio\taudio device (fe. alsa: hw:0,0 oss: /dev/dsp)\n" " -p pass\t\taudio device for pass-through (hw:0,1 or /dev/dsp1)\n", "PRIM \n" " Make the primary device.\n\n" - " is the number of device. Without number softhddevice becomes\n" + " is the number of device. Without number vaapidevice becomes\n" " the primary device. If becoming primary, the plugin is attached\n" " to the devices. If loosing primary, the plugin is detached from\n" " the devices.", @@ -2825,12 +2717,9 @@ static const char *SVDRPHelpText[] = { " NOT_SUSPENDED == 0 (910)\n" " SUSPEND_NORMAL == 1 (911)\n" " SUSPEND_DETACHED == 2 (912)\n", - "3DOF\n" "\040 3D OSD off.\n", - "3DTB\n" "\040 3D OSD Top and Bottom.\n", - "3DSB\n" "\040 3D OSD Side by Side.\n", - "RAIS\n" "\040 Raise softhddevice window\n\n" - " If Xserver is not started by softhddevice, the window which\n" - " contains the softhddevice frontend will be raised to the front.\n", + "RAIS\n" "\040 Raise vaapidevice window\n\n" + " If Xserver is not started by vaapidevice, the window which\n" + " contains the vaapidevice frontend will be raised to the front.\n", NULL }; @@ -2840,7 +2729,7 @@ static const char *SVDRPHelpText[] = { ** return a pointer to a list of help strings for all of the plugin's ** SVDRP commands. */ -const char **cPluginSoftHdDevice::SVDRPHelpPages(void) +const char **cPluginVaapiDevice::SVDRPHelpPages(void) { return SVDRPHelpText; } @@ -2852,7 +2741,7 @@ const char **cPluginSoftHdDevice::SVDRPHelpPages(void) ** @param option all command arguments ** @param reply_code reply code */ -cString cPluginSoftHdDevice::SVDRPCommand(const char *command, +cString cPluginVaapiDevice::SVDRPCommand(const char *command, const char *option, __attribute__ ((unused)) int &reply_code) { if (!strcasecmp(command, "STAT")) { @@ -2870,23 +2759,23 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, } if (!strcasecmp(command, "SUSP")) { if (cSoftHdControl::Player) { // already suspended - return "SoftHdDevice already suspended"; + return "VA-API device already suspended"; } if (SuspendMode != NOT_SUSPENDED) { - return "SoftHdDevice already detached"; + return "VA-API device already detached"; } cControl::Launch(new cSoftHdControl); cControl::Attach(); Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11); SuspendMode = SUSPEND_NORMAL; - return "SoftHdDevice is suspended"; + return "VA-API device is suspended"; } if (!strcasecmp(command, "RESU")) { if (SuspendMode == NOT_SUSPENDED) { - return "SoftHdDevice already resumed"; + return "VA-API device already resumed"; } if (SuspendMode != SUSPEND_NORMAL) { - return "can't resume SoftHdDevice"; + return "can't resume VA-API device"; } if (ShutdownHandler.GetUserInactiveTime()) { ShutdownHandler.SetUserInactiveTimeout(); @@ -2896,20 +2785,20 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, } Resume(); SuspendMode = NOT_SUSPENDED; - return "SoftHdDevice is resumed"; + return "VA-API device is resumed"; } if (!strcasecmp(command, "DETA")) { if (SuspendMode == SUSPEND_DETACHED) { - return "SoftHdDevice already detached"; + return "VA-API device already detached"; } if (cSoftHdControl::Player) { // already suspended - return "can't suspend SoftHdDevice already suspended"; + return "can't suspend VA-API device already suspended"; } cControl::Launch(new cSoftHdControl); cControl::Attach(); Suspend(1, 1, 0); SuspendMode = SUSPEND_DETACHED; - return "SoftHdDevice is detached"; + return "VA-API device is detached"; } if (!strcasecmp(command, "ATTA")) { char *tmp; @@ -2918,7 +2807,7 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, char *o; if (SuspendMode != SUSPEND_DETACHED) { - return "can't attach SoftHdDevice not detached"; + return "can't attach VA-API device not detached"; } if (!(tmp = strdup(option))) { return "out of memory"; @@ -2978,7 +2867,7 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, } Resume(); SuspendMode = NOT_SUSPENDED; - return "SoftHdDevice is attached"; + return "VA-API device is attached"; } if (!strcasecmp(command, "HOTK")) { int hotk; @@ -2998,19 +2887,6 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, DoMakePrimary = primary; return "switching primary device requested"; } - if (!strcasecmp(command, "3DOF")) { - VideoSetOsd3DMode(0); - return "3d off"; - } - if (!strcasecmp(command, "3DSB")) { - VideoSetOsd3DMode(1); - return "3d sbs"; - } - if (!strcasecmp(command, "3DTB")) { - VideoSetOsd3DMode(2); - return "3d tb"; - } - if (!strcasecmp(command, "RAIS")) { if (!ConfigStartX11Server) { VideoRaiseWindow(); @@ -3023,4 +2899,4 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, return NULL; } -VDRPLUGINCREATOR(cPluginSoftHdDevice); // Don't touch this! +VDRPLUGINCREATOR(cPluginVaapiDevice); // Don't touch this! diff --git a/vdr-softhddevice-9999.ebuild b/vdr-softhddevice-9999.ebuild deleted file mode 100644 index 51f4f874..00000000 --- a/vdr-softhddevice-9999.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="5" - -inherit vdr-plugin-2 git-2 - -RESTRICT="test" - -EGIT_REPO_URI="https://github.com/pesintta/vdr-plugin-softhddevice.git" -KEYWORDS="" - -DESCRIPTION="VDR Plugin: Software and GPU emulated HD output device" -HOMEPAGE="http://projects.vdr-developer.org/projects/show/plg-softhddevice" - -LICENSE="AGPL-3" -SLOT="0" -IUSE="alsa +debug opengl oss vaapi xscreensaver" - -RDEPEND=">=media-video/vdr-2 - x11-libs/libX11 - >=x11-libs/libxcb-1.8 - x11-libs/xcb-util-wm - x11-libs/xcb-util-keysyms - x11-libs/xcb-util-renderutil - alsa? ( media-libs/alsa-lib ) - opengl? ( virtual/opengl - virtual/glu ) - vaapi? ( x11-libs/libva - virtual/ffmpeg[vaapi] )" -DEPEND="${RDEPEND} - virtual/pkgconfig - x11-libs/xcb-util" - -REQUIRED_USE="opengl? ( vaapi ) - || ( alsa oss )" - -#VDR_CONFD_FILE="${FILESDIR}/confd-0.6.0" -#VDR_RCADDON_FILE="${FILESDIR}/rc-addon-0.6.0.sh" - -pkg_setup() { - vdr-plugin-2_pkg_setup - - use debug && append-cppflags -DDEBUG -DOSD_DEBUG -} -src_prepare() { - vdr-plugin-2_src_prepare - - BUILD_PARAMS+=" ALSA=$(usex alsa 1 0)" - BUILD_PARAMS+=" OPENGL=$(usex opengl 1 0)" - BUILD_PARAMS+=" OSS=$(usex oss 1 0)" - BUILD_PARAMS+=" VAAPI=$(usex vaapi 1 0)" - - if has_version ">=media-video/ffmpeg-0.8"; then - BUILD_PARAMS+=" SWRESAMPLE=1" - fi - if has_version ">=media-video/libav-0.8"; then - BUILD_PARAMS+=" AVRESAMPLE=1" - fi -} - -src_install() { - vdr-plugin-2_src_install - - nonfatal dodoc ChangeLog Todo -} diff --git a/video.c b/video.c index 9ba1a122..606943e8 100644 --- a/video.c +++ b/video.c @@ -1,5 +1,4 @@ -/// -/// @file video.c @brief Video module +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @@ -452,7 +450,6 @@ static pthread_mutex_t VideoDisplayLockMutex; ///< video lock mutex static int OsdConfigWidth; ///< osd configured width static int OsdConfigHeight; ///< osd configured height static char OsdShown; ///< flag show osd -static char Osd3DMode; ///< 3D OSD mode static int OsdWidth; ///< osd width static int OsdHeight; ///< osd height static int OsdDirtyX; ///< osd dirty area x @@ -6853,16 +6850,6 @@ void VideoSetOsdSize(int width, int height) } } -/// -/// Set the 3d OSD mode. -/// -/// @param mode OSD mode (0=off, 1=SBS, 2=Top Bottom) -/// -void VideoSetOsd3DMode(int mode) -{ - Osd3DMode = mode; -} - /// /// Setup osd. /// @@ -7143,7 +7130,7 @@ static void VideoThreadInit(void) pthread_mutex_init(&VideoLockMutex, NULL); pthread_cond_init(&VideoWakeupCond, NULL); pthread_create(&VideoThread, NULL, VideoDisplayHandlerThread, NULL); - pthread_setname_np(VideoThread, "softhddev video"); + pthread_setname_np(VideoThread, "vaapidevice video"); } /// @@ -7516,7 +7503,7 @@ uint8_t *VideoGrab(int *size, int *width, int *height, int write_header) return rgb; } else { - Warning(_("softhddev: grab unsupported\n")); + Warning(_("vaapidevice: grab unsupported\n")); } (void)size; @@ -7540,7 +7527,7 @@ uint8_t *VideoGrabService(int *size, int *width, int *height) if (VideoUsedModule->GrabOutput) { return VideoUsedModule->GrabOutput(size, width, height); } else { - Warning(_("softhddev: grab unsupported\n")); + Warning(_("vaapidevice: grab unsupported\n")); } (void)size; @@ -7639,17 +7626,17 @@ static void VideoCreateWindow(xcb_window_t parent, xcb_visualid_t visual, #ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS // FIXME: utf _NET_WM_NAME xcb_icccm_set_wm_name(Connection, VideoWindow, XCB_ATOM_STRING, 8, - sizeof("softhddevice") - 1, "softhddevice"); + sizeof("vaapidevice") - 1, "vaapidevice"); xcb_icccm_set_wm_icon_name(Connection, VideoWindow, XCB_ATOM_STRING, 8, - sizeof("softhddevice") - 1, "softhddevice"); + sizeof("vaapidevice") - 1, "vaapidevice"); #endif // define only available with xcb-utils-0.3.6 #ifdef XCB_NUM_WM_HINTS_ELEMENTS // FIXME: utf _NET_WM_NAME xcb_set_wm_name(Connection, VideoWindow, XCB_ATOM_STRING, - sizeof("softhddevice") - 1, "softhddevice"); + sizeof("vaapidevice") - 1, "vaapidevice"); xcb_set_wm_icon_name(Connection, VideoWindow, XCB_ATOM_STRING, - sizeof("softhddevice") - 1, "softhddevice"); + sizeof("vaapidevice") - 1, "vaapidevice"); #endif // FIXME: size hints diff --git a/video.h b/video.h index ce9285c9..a30ac048 100644 --- a/video.h +++ b/video.h @@ -1,5 +1,4 @@ -/// -/// @file video.h @brief Video module header file +////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) 2009 - 2015 by Johns. All Rights Reserved. /// @@ -17,7 +16,6 @@ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// -/// $Id$ ////////////////////////////////////////////////////////////////////////////// /// @addtogroup Video @@ -205,9 +203,6 @@ extern void VideoGetOsdSize(int *, int *); /// Set OSD size. extern void VideoSetOsdSize(int, int); - /// Set Osd 3D Mode -extern void VideoSetOsd3DMode(int); - /// Set video clock. extern void VideoSetClock(VideoHwDecoder *, int64_t);