132 Commits
0.5.1 ... 0.6.0

Author SHA1 Message Date
Johns
eab051f5e6 Release Version 0.6.0. 2013-03-17 15:53:01 +01:00
e058302a08 Update german translation. 2013-03-17 15:51:11 +01:00
Johns
efcf3a1d2d Fix Bug #1286: typo. 2013-03-12 23:27:09 +01:00
Johns
1f0d5878b1 Adds H264 only hardware decoder for still-pictures. 2013-03-11 16:32:00 +01:00
Johns
f09a37a941 Enable optional VDR-SPU deocder support. 2013-03-11 12:18:11 +01:00
Johns
a7562eb2be Removes "static" warning. 2013-03-06 17:31:01 +01:00
a747829ffb Adds raise softhddevice video window support. 2013-03-06 17:07:30 +01:00
Johns
7db63875d0 Adds optional only complete mpeg packets support. 2013-03-06 10:30:27 +01:00
Johns
637c04655a Fixes text of EAC-3 pass-through setup. 2013-03-05 14:39:13 +01:00
Johns
9954b939ef Try to connect to X11 server, when start fails. 2013-02-27 16:48:42 +01:00
Johns
e65572c2e2 Updated ebuild for new vdr-plugin-2.eclass. 2013-02-25 16:40:44 +01:00
Johns
b3ddc47cb5 Removes "unused parameter" warnings. 2013-02-25 16:39:32 +01:00
Johns
4d9e3a71f4 More informations in short description. 2013-02-25 16:34:28 +01:00
Johns
21e4f4ee04 Workaround for ffmpeg 1.1.x get_format bug. 2013-02-25 16:33:40 +01:00
Johns
746746d5b7 Workaround for ffmpeg 1.1.2 bug. 2013-02-25 16:32:52 +01:00
Johns
936566c642 Show vaapi droped/missed messages with info level. 2013-02-23 15:56:24 +01:00
Johns
d6f557c6f7 Removes warnings, when compiles without VDPAU. 2013-02-15 15:58:49 +01:00
Johns
2d2ea53d16 Quote spaces to get correct ouput. 2013-02-13 22:47:16 +01:00
Johns
bccd959833 Fix .pot file generation, support _ and _N macros. 2013-02-13 22:46:08 +01:00
Johns
240fc17471 Store pass-through on/off state in setup. 2013-02-13 17:23:18 +01:00
Johns
7b2caac901 Fix bug: still old CodecPassthroughAC3 used. 2013-02-12 22:03:52 +01:00
Johns
56aae221e7 Adds missing USE_SCREENSAVER to old Makefile. 2013-02-12 18:11:40 +01:00
Johns
54255e7b57 Try to use HBR (High Bit-Rate) for EAC3. 2013-02-11 23:40:09 +01:00
Johns
2cd667fb44 Improved pass-through (PCM+EAC3) support. 2013-02-11 16:53:51 +01:00
Johns
145d65ff01 Debug time for channel switch. 2013-02-11 15:11:52 +01:00
Johns
8faff0fd1e Try to detect wrong Makefile use. 2013-02-11 14:41:19 +01:00
Johns
d31ff55b12 Clear buffers quicker, when replay stops. 2013-02-08 21:03:06 +01:00
Johns
d4535a34c9 Fix xcb deadlock while closing PIP decoder.
Close video decoder from inside the decoder thread,
otherwise xcb hangs in a lock.
2013-02-07 16:54:16 +01:00
Johns
ebd2f85f90 Update for new Makefiles. 2013-02-07 10:17:48 +01:00
Johns
dce7ef9110 Adds PIP hot-key support. 2013-02-06 16:27:25 +01:00
Johns
780e2989ae Makes audio mixer optional. 2013-02-06 16:02:22 +01:00
Johns
2661fdf333 Plugin needs -D_GNU_SOURCE. 2013-01-30 18:04:53 +01:00
Johns
2557418e81 No longer needed. 2013-01-29 20:48:04 +01:00
Johns
b48e0d0638 Support VDR 1.7.36 new build system. 2013-01-29 17:04:50 +01:00
Johns
2c27d83b9e Makes buffers soft limit configurable. 2013-01-28 23:13:23 +01:00
Johns
8b22585748 Never trust the docs: fix ffmpeg downsample. 2013-01-26 00:18:59 +01:00
Johns
7ed6975330 Support upsampling 3,5 to 8 channels.
Improve next ring buffer handling.
Improve audio/video sync debug.
2013-01-25 17:05:53 +01:00
Johns
d5e111238d Improves VDPAU dissplay preemption handling. 2013-01-25 16:55:25 +01:00
2733e47af7 Add modifiers to X11 remote key names. 2013-01-25 16:52:23 +01:00
Johns
f9998e7664 Add audio compatibility with >=ffmpeg 1.1. 2013-01-24 21:42:39 +01:00
Johns
04286fb2ad Add video compatibility with >=ffmpeg 1.1. 2013-01-23 21:54:56 +01:00
Johns
cd82ee8e4a Fix bug: no sound with video output "none". 2013-01-22 17:18:18 +01:00
Johns
a1f17199d6 Crop setup is done by VdpauSetupOutput. 2013-01-22 17:08:44 +01:00
Johns
849ca7cfd6 Stronger H264/Mpeg detection tests. 2013-01-12 19:13:43 +01:00
Johns
308742a927 React faster only with mpeg. 2013-01-11 18:54:45 +01:00
Johns
1a730ef90b Fix build without USE_PIP. 2013-01-09 00:39:27 +01:00
Johns
d59c2ad40b Must guard CodecVideoDecode. 2013-01-08 23:52:41 +01:00
Johns
3366faece2 Fixes close PIP threading bug. 2013-01-08 21:11:46 +01:00
Johns
2bb2875cd7 Update PIP only, when visible. 2013-01-07 19:31:05 +01:00
Johns
e88403d044 Close pip before switching channel. 2013-01-07 17:47:05 +01:00
Johns
11293e8dc1 Split mpeg packets in receiver thread. 2013-01-07 16:55:42 +01:00
Johns
3bcc3d280e fprints only when building debug version. 2013-01-06 19:17:02 +01:00
Johns
55587c86f0 Switch PIP to only available channels. 2013-01-06 19:15:46 +01:00
Johns
7cc74795be Fix bug: missing external reference with -DUSE_PIP. 2013-01-06 19:14:46 +01:00
Johns
534b4094b5 Fix thread exit problem. 2013-01-06 14:47:00 +01:00
Johns
7cd025a023 Cosmetic cleanups. 2013-01-06 14:06:08 +01:00
Johns
b14a67b601 New features documented. 2013-01-05 23:16:03 +01:00
Johns
b24409323d Fix detach and attach bug. 2013-01-05 22:48:01 +01:00
Johns
9ec2716026 PIP function update. 2013-01-05 20:47:14 +01:00
Johns
fa09d940c5 Fix PIP threading problems. 2013-01-05 20:44:54 +01:00
Johns
d4702b9a9e Include softhddevice.cpp in indent target.
Fix constconst after indent.  Hello GNU who many years until it will be
fixed?
2013-01-05 19:49:59 +01:00
Johns
6a3a560857 Adds PIP channel switch functions. 2013-01-05 17:17:50 +01:00
Johns
8ee1e84b2e Restore video position, when PIP closes. 2013-01-05 16:37:25 +01:00
Johns
7e96a292eb First video surface clears complete window. 2013-01-05 15:41:57 +01:00
Johns
d89ada9aad Makes PIP+Video position configurable. 2013-01-04 21:50:55 +01:00
Johns
59d1a6b1f2 Adds function to stop PIP. 2013-01-04 18:50:14 +01:00
Johns
1a744a8eb8 Sync to audio only with the first video stream. 2013-01-04 18:04:53 +01:00
Johns
78100cba00 Use second stream for PIP. 2013-01-04 15:56:26 +01:00
Johns
b54ddd4549 Enable more than 1 vdpau video stream. 2013-01-04 15:54:32 +01:00
Johns
d42475f2dc Prepared reentrant video stream. 2013-01-03 18:52:34 +01:00
Johns
7cf6c1ab2b va-api has problems with h264 interlace. 2013-01-03 01:03:22 +01:00
Johns
06b8e3d784 Fix video size not updated for VAAPI. 2013-01-02 23:59:46 +01:00
63c22a13cf Adds VDR SeduAtmo Plugin support. 2013-01-01 17:58:54 +01:00
Johns
3d5e59a6e5 Support multiple streams with ScaleVideo. 2013-01-01 15:21:28 +01:00
Johns
acf377ec60 Makes 4:3 and 16:9 display format configurable.
Don't use DVB display format.
2013-01-01 14:48:51 +01:00
87c1c7be84 Add support for new vdr ScaleVideo API. 2013-01-01 12:51:08 +01:00
Johns
5bacd0cf7b Comments cleanup. 2013-01-01 12:40:12 +01:00
Johns
b1beb49798 Add support for old PES HDTV recording. 2013-01-01 12:09:54 +01:00
Johns
33b14be516 Change VideoSetOutputPosition to work OSD relative. 2012-12-31 17:51:43 +01:00
Johns
3907f3eb2f Change +%d to %+d, which is more general. 2012-12-31 17:11:22 +01:00
Johns
00d314dcd1 Disable trickspeed hack, to prevent ffmpeg crash. 2012-12-31 14:03:19 +01:00
Johns
9719fef55b Fix video size not updated, when window size change. 2012-12-30 17:05:42 +01:00
Johns
9b69045a20 Use 1 surface reserve. 2012-12-24 12:59:35 +01:00
Johns
966ff4229a Better video stream window position support. 2012-12-24 12:23:16 +01:00
Johns
e0c0c2021f Need LOCALEDIR to build as user. 2012-12-24 11:56:10 +01:00
Johns
a3907d11a5 Spam syslog with a/v sync infos. 2012-12-24 11:55:32 +01:00
Johns
b94d19e7b8 Make clear what downmix is enabled. 2012-12-24 11:53:16 +01:00
Johns
943ee22aa5 Makes X11 server arguments configurable. 2012-12-14 17:24:54 +01:00
Johns
b6154a988f Fix build with NO_TS_AUDIO. 2012-12-14 17:04:50 +01:00
Johns
932871dea9 Use vdr-plugin-2. 2012-11-30 20:46:13 +01:00
Johns
5ec6963398 Missing space added. 2012-11-25 00:38:32 +01:00
Johns
b04323704d Missing space added. 2012-11-25 00:35:39 +01:00
38011d51b6 Add german translation. 2012-11-18 21:17:09 +01:00
Johns
9a2b6f860a Version 0.5.2 released. 2012-11-15 22:30:55 +01:00
10075aa501 Fix 3d OSD position. 2012-11-05 23:13:42 +01:00
Johns
cb91c779d3 Correct offsets for 3D OSD. Allow 1920x1200 OSD. 2012-11-05 12:03:50 +01:00
Johns
aad3742670 Log subtitle clear. 2012-11-01 14:12:31 +01:00
Johns
1b23074de7 Ignore empty options. 2012-10-31 10:20:07 +01:00
Johns
78015d90fb 3D update. 2012-10-30 16:53:40 +01:00
0286c434b4 Add support to change OSD for 3d SBS/TB streams. 2012-10-30 16:50:31 +01:00
Johns
6e9e641453 Comment how to change the error recognition. 2012-10-30 12:11:25 +01:00
Johns
d36e4c22b6 Removes debug output slipped into GIT. 2012-10-30 12:10:25 +01:00
Johns
7e4657e615 Use software decoder for still-pictures. 2012-10-29 23:06:00 +01:00
Johns
84e8e58c91 Don't show black picture during still-pictures. 2012-10-29 19:29:43 +01:00
Johns
141eb5cf71 Flush X11 output buffer before close. 2012-10-29 17:24:58 +01:00
Johns
a9e664ac52 Add Feature #1103: change audio without vdr restart. 2012-10-29 16:00:45 +01:00
Johns
30952face4 Fix bug #1089: vdpau wrong number of mpeg refs. 2012-10-24 15:38:09 +02:00
Johns
0519aff4d8 Removed double comment. 2012-10-19 15:38:05 +02:00
Johns
92b4203644 Fix bug: possible endless loop in pes audio parser. 2012-10-19 15:36:41 +02:00
Johns
f640ebdeb5 Report correct size in cSoftHdDevice::GetVideoSize. 2012-10-10 17:26:49 +02:00
Johns
de7c4b2a96 Workaround for bug #1069.
Option -s (start in suspended mode) does not work anymore.
2012-10-06 19:16:10 +02:00
Johns
0cf4598f68 Jpeg isn't longer used. 2012-09-15 21:40:04 +02:00
Johns
80dfa4a80f Close all filehandles before exec.
Add stillpicture debug.
Some small stillpicture fixes.
2012-09-15 21:38:54 +02:00
Johns
0a78944996 Fix bug: hue menu entry changes brightness. 2012-09-14 16:53:13 +02:00
Johns
142c3b16f6 Fix bug: didn't compile without vdpau support. 2012-09-11 00:24:27 +02:00
Johns
73fe963c36 Add picture adjustment support for vdpau. 2012-09-03 16:39:33 +02:00
Johns
a61cbcb65a Add PTS to render too slow message. 2012-08-29 17:00:36 +02:00
Johns
3df9acc034 Add number of buffered video output frames to info. 2012-08-28 19:15:11 +02:00
Johns
d9c9061a7c Reset closing only, if trickspeed is set. 2012-08-18 15:53:14 +02:00
Johns
e9fbe6b54f Need get_format for software decoder. 2012-08-17 10:35:52 +02:00
Johns
5e93fb2756 Fix bug: VA-API trickspeed. 2012-08-17 10:33:10 +02:00
Johns
e02c1fa5f9 Revert "mpeg_vdpau" back to "mpegvideo_vdpau". 2012-08-14 16:02:44 +02:00
Johns
c07ec82e6d Fix bug: Can't use software decoder with VDPAU. 2012-08-13 16:57:36 +02:00
Johns
ecb48a5d63 Resume plugin, if dummy player looses control. 2012-08-09 16:22:06 +02:00
Johns
9efc73144d Removes old audio code (!USE_AUDIORING). 2012-08-08 22:58:57 +02:00
a920da652b Osd work:
Use -DOSD_DEBUG to debug OSD.
Fix bug #909: Subtitles destroy menu.
Fix bug #1003: Subtitles overlapping.
2012-08-07 16:46:23 +02:00
Johns
9ec077ec8a VA-API/XvBA backend improvements. 2012-07-27 19:15:48 +02:00
Johns
8b0d8d8446 Free used X11 resources colormap, pixmap, cursor. 2012-07-25 16:07:36 +02:00
Johns
15583a79c4 FreeBSD compatibility fix. 2012-07-09 17:17:16 +02:00
Johns
2cdce610d6 Fix bug: spelling USE_VAPI wrong, missing function. 2012-07-06 00:04:08 +02:00
Johns
2d6d151b85 Fix compiler warnings. 2012-07-05 23:59:28 +02:00
Johns
ca4f519a1f Force ffmpeg with hardware codec support. 2012-07-05 17:10:05 +02:00
20 changed files with 6076 additions and 2868 deletions

2
.gitignore vendored
View File

@@ -4,7 +4,7 @@
.*.swp
.gdb_history
# work directory
chaos
.chaos
# generated files
.dependencies
libvdr-softhddevice.so*

104
ChangeLog
View File

@@ -1,3 +1,107 @@
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

218
Makefile
View File

@@ -6,152 +6,183 @@
# 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.
# IMPORTANT: the presence of this macro is important for the Make.config
# file. So it must be defined, even if it is not used here!
#
PLUGIN = softhddevice
### Configuration (edit this for your needs)
# support alsa audio output module
ALSA ?= $(shell pkg-config --exists alsa && echo 1)
# support OSS audio output module
OSS ?= 1
# support VDPAU video output modue
VDPAU ?= $(shell pkg-config --exists vdpau && echo 1)
# support VA-API video output modue
VAAPI ?= $(shell pkg-config --exists libva && echo 1)
# screensaver disable/enable
SCREENSAVER ?= 1
# use ffmpeg libswresample
SWRESAMPLE ?= $(shell pkg-config --exists libswresample && echo 1)
CONFIG := # -DDEBUG #-DOSD_DEBUG # enable debug output+functions
#CONFIG += -DSTILL_DEBUG=2 # still picture debug verbose level
CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # info/debug a/v sync
CONFIG += -DUSE_PIP # PIP support
#CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser
#CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
#CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
ifeq ($(ALSA),1)
CONFIG += -DUSE_ALSA
_CFLAGS += $(shell pkg-config --cflags alsa)
LIBS += $(shell pkg-config --libs alsa)
endif
ifeq ($(OSS),1)
CONFIG += -DUSE_OSS
endif
ifeq ($(VDPAU),1)
CONFIG += -DUSE_VDPAU
_CFLAGS += $(shell pkg-config --cflags vdpau)
LIBS += $(shell pkg-config --libs vdpau)
endif
ifeq ($(VAAPI),1)
CONFIG += -DUSE_VAAPI
_CFLAGS += $(shell pkg-config --cflags libva-x11 libva)
LIBS += $(shell pkg-config --libs libva-x11 libva)
endif
ifeq ($(SCREENSAVER),1)
CONFIG += -DUSE_SCREENSAVER
_CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
endif
ifeq ($(SWRESAMPLE),1)
CONFIG += -DUSE_SWRESAMPLE
_CFLAGS += $(shell pkg-config --cflags libswresample)
LIBS += $(shell pkg-config --libs libswresample)
endif
_CFLAGS += $(shell pkg-config --cflags libavcodec x11 x11-xcb xcb xcb-icccm)
LIBS += -lrt $(shell pkg-config --libs libavcodec x11 x11-xcb xcb xcb-icccm)
### The version number of this plugin (taken from the main source file):
VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | awk '{ print $$7 }' | sed -e 's/[";]//g')
GIT_REV = $(shell git describe --always 2>/dev/null)
### Configuration (edit this for your needs)
CONFIG := #-DDEBUG
CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # debug a/v sync
#CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser
CONFIG += $(shell pkg-config --exists vdpau && echo "-DUSE_VDPAU")
CONFIG += $(shell pkg-config --exists libva && echo "-DUSE_VAAPI")
CONFIG += $(shell pkg-config --exists alsa && echo "-DUSE_ALSA")
CONFIG += -DUSE_OSS
### The C++ compiler and options:
CC ?= gcc
CXX ?= g++
CFLAGS ?= -g -O2 -W -Wall -Wextra -Winit-self \
-Wdeclaration-after-statement \
-ftree-vectorize -msse3 -flax-vector-conversions
CXXFLAGS ?= -g -O2 -W -Wall -Wextra -Werror=overloaded-virtual
### The directory environment:
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
# Use package data if installed...otherwise assume we're under the VDR source directory:
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg)
#
TMPDIR ?= /tmp
### Make sure that necessary options are included:
### The compiler options:
-include $(VDRDIR)/Make.global
export CFLAGS = $(call PKGCFG,cflags)
export CXXFLAGS = $(call PKGCFG,cxxflags)
ifeq ($(CFLAGS),)
$(error CFLAGS not set)
endif
ifeq ($(CXXFLAGS),)
$(error CXXFLAGS not set)
endif
### The version number of VDR's plugin API:
APIVERSION = $(call PKGCFG,apiversion)
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
### The version number of VDR's plugin API (taken from VDR's "config.h"):
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
-include $(PLGCFG)
### The name of the distribution archive:
ARCHIVE = $(PLUGIN)-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
### Includes, Defines and dependencies (add further entries here):
### The name of the shared object file:
INCLUDES += -I$(VDRDIR)/include
SOFILE = libvdr-$(PLUGIN).so
DEFINES += $(CONFIG) -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' \
### Includes and Defines (add further entries here):
INCLUDES +=
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE $(CONFIG) \
$(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"')
_CFLAGS = $(DEFINES) $(INCLUDES) \
$(shell pkg-config --cflags libavcodec) \
`pkg-config --cflags x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
`pkg-config --cflags gl glu` \
$(if $(findstring USE_VDPAU,$(CONFIG)), \
`pkg-config --cflags vdpau`) \
$(if $(findstring USE_VAAPI,$(CONFIG)), \
`pkg-config --cflags libva-x11 libva-glx libva`) \
$(if $(findstring USE_ALSA,$(CONFIG)), \
`pkg-config --cflags alsa`)
### Make it standard
#override _CFLAGS += -Werror
override CXXFLAGS += $(_CFLAGS)
override CFLAGS += $(_CFLAGS)
LIBS += -lrt \
$(shell pkg-config --libs libavcodec) \
`pkg-config --libs x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
`pkg-config --libs gl glu` \
$(if $(findstring USE_VDPAU,$(CONFIG)), \
`pkg-config --libs vdpau`) \
$(if $(findstring USE_VAAPI,$(CONFIG)), \
`pkg-config --libs libva-x11 libva-glx libva`) \
$(if $(findstring USE_ALSA,$(CONFIG)), \
`pkg-config --libs alsa`)
override CXXFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
-g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual
override CFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
-g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement
### The object files (add further files here):
OBJS = $(PLUGIN).o softhddev.o video.o audio.o codec.o ringbuffer.o
SRCS = $(wildcard $(OBJS:.o=.c)) $(PLUGIN).cpp
### The main target:
all: libvdr-$(PLUGIN).so i18n
### Implicit rules:
#
#%.o: %.cpp
# $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
all: $(SOFILE) i18n
### Dependencies:
MAKEDEP = $(CC) -MM -MG
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SRCS) >$@
$(OBJS): Makefile
@$(MAKEDEP) $(CXXFLAGS) $(SRCS) > $@
-include $(DEPFILE)
### Internationalization (I18N):
PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po
msgfmt -c -o $@ $<
$(I18Npot): $(wildcard *.cpp) $(wildcard *.c)
$(I18Npot): $(SRCS)
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \
-k_ -k_N --package-name=VDR --package-version=$(VDRVERSION) \
--msgid-bugs-address='<see README>' -o $@ $^
-k_ -k_N --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) \
--msgid-bugs-address='<see README>' -o $@ `ls $^`
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
@mkdir -p $(dir $@)
cp $< $@
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@
.PHONY: i18n
i18n: $(I18Nmsgs) $(I18Npot)
i18n: $(I18Nmo) $(I18Npot)
install-i18n: $(I18Nmsgs)
### Targets:
libvdr-$(PLUGIN).so: $(OBJS) Makefile
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC $(OBJS) -o $@ $(LIBS)
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
$(OBJS): Makefile
$(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install-i18n
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -162,19 +193,20 @@ dist: $(I18Npo) clean
@echo Distribution package created as $(PACKAGE).tgz
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
install: libvdr-$(PLUGIN).so
cp --remove-destination libvdr-$(PLUGIN).so \
/usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
## Private Targets:
HDRS= $(wildcard *.h)
indent:
for i in $(wildcard $(OBJS:.o=.c)) $(HDRS); do \
indent $$i; unexpand -a $$i > $$i.up; mv $$i.up $$i; \
for i in $(SRCS) $(HDRS); do \
indent $$i; \
unexpand -a $$i | sed -e s/constconst/const/ > $$i.up; \
mv $$i.up $$i; \
done
video_test: video.c Makefile
$(CC) -DVIDEO_TEST -DVERSION='"$(VERSION)"' $(CFLAGS) $(LDFLAGS) $< $(LIBS) \
-o $@
$(CC) -DVIDEO_TEST -DVERSION='"$(VERSION)"' $(CFLAGS) $(LDFLAGS) $< \
$(LIBS) -o $@

188
Makefile-pre1.7.36 Normal file
View File

@@ -0,0 +1,188 @@
#
# 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.
# IMPORTANT: the presence of this macro is important for the Make.config
# file. So it must be defined, even if it is not used here!
#
PLUGIN = softhddevice
### The version number of this plugin (taken from the main source file):
VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | awk '{ print $$7 }' | sed -e 's/[";]//g')
GIT_REV = $(shell git describe --always 2>/dev/null)
### Configuration (edit this for your needs)
CONFIG := #-DDEBUG #-DOSD_DEBUG
CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # debug a/v sync
CONFIG += -DUSE_PIP # PIP support
#CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser
# use ffmpeg libswresample
CONFIG += $(shell pkg-config --exists libswresample && echo "-DUSE_SWRESAMPLE")
CONFIG += -DUSE_SCREENSAVER # use functions to disable screensaver
CONFIG += $(shell pkg-config --exists vdpau && echo "-DUSE_VDPAU")
CONFIG += $(shell pkg-config --exists libva && echo "-DUSE_VAAPI")
CONFIG += $(shell pkg-config --exists alsa && echo "-DUSE_ALSA")
CONFIG += -DUSE_OSS
### The C++ compiler and options:
CC ?= gcc
CXX ?= g++
CFLAGS ?= -g -O2 -W -Wall -Wextra -Winit-self \
-Wdeclaration-after-statement \
-ftree-vectorize -msse3 -flax-vector-conversions -fPIC
CXXFLAGS ?= -g -O2 -W -Wall -Wextra -Werror=overloaded-virtual -fPIC
### The directory environment:
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
-include $(VDRDIR)/Make.global
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
### The version number of VDR's plugin API (taken from VDR's "config.h"):
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
### The name of the distribution archive:
ARCHIVE = $(PLUGIN)-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
### Includes, Defines and dependencies (add further entries here):
INCLUDES += -I$(VDRDIR)/include
DEFINES += $(CONFIG) -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' \
$(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"')
_CFLAGS = $(DEFINES) $(INCLUDES) \
$(shell pkg-config --cflags libavcodec) \
`pkg-config --cflags x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
`pkg-config --cflags gl glu` \
$(if $(findstring USE_SWRESAMPLE,$(CONFIG)), \
$(shell pkg-config --cflags libswresample)) \
$(if $(findstring USE_VAAPI,$(CONFIG)), \
`pkg-config --cflags libva-x11 libva-glx libva`) \
$(if $(findstring USE_ALSA,$(CONFIG)), \
`pkg-config --cflags alsa`)
#override _CFLAGS += -Werror
override CXXFLAGS += $(_CFLAGS)
override CFLAGS += $(_CFLAGS)
LIBS += -lrt \
$(shell pkg-config --libs libavcodec) \
`pkg-config --libs x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
`pkg-config --libs gl glu` \
$(if $(findstring USE_SWRESAMPLE,$(CONFIG)), \
$(shell pkg-config --libs libswresample)) \
$(if $(findstring USE_VDPAU,$(CONFIG)), \
`pkg-config --libs vdpau`) \
$(if $(findstring USE_VAAPI,$(CONFIG)), \
`pkg-config --libs libva-x11 libva-glx libva`) \
$(if $(findstring USE_ALSA,$(CONFIG)), \
`pkg-config --libs alsa`)
### The object files (add further files here):
OBJS = $(PLUGIN).o softhddev.o video.o audio.o codec.o ringbuffer.o
SRCS = $(wildcard $(OBJS:.o=.c)) $(PLUGIN).cpp
### The main target:
all: libvdr-$(PLUGIN).so i18n
### Implicit rules:
#
#%.o: %.cpp
# $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
### Dependencies:
MAKEDEP = $(CC) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SRCS) >$@
$(OBJS): Makefile
-include $(DEPFILE)
### Internationalization (I18N):
PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po
msgfmt -c -o $@ $<
$(I18Npot): $(wildcard *.cpp) $(wildcard *.c)
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \
-k_ -k_N --package-name=VDR --package-version=$(VDRVERSION) \
--msgid-bugs-address='<see README>' -o $@ $^
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
@touch $@
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
@mkdir -p $(dir $@)
cp $< $@
.PHONY: i18n
i18n: $(I18Nmsgs) $(I18Npot)
### Targets:
libvdr-$(PLUGIN).so: $(OBJS) Makefile
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC $(OBJS) -o $@ $(LIBS)
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
install: libvdr-$(PLUGIN).so
cp --remove-destination libvdr-$(PLUGIN).so \
/usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
HDRS= $(wildcard *.h)
indent:
for i in $(SRCS) $(HDRS); do \
indent $$i; \
unexpand -a $$i | sed -e s/constconst/const/ > $$i.up; \
mv $$i.up $$i; \
done
video_test: video.c Makefile
$(CC) -DVIDEO_TEST -DVERSION='"$(VERSION)"' $(CFLAGS) $(LDFLAGS) $< $(LIBS) \
-o $@

View File

@@ -1,6 +1,6 @@
@file README.txt @brief A software HD output device for VDR
Copyright (c) 2011, 2012 by Johns. All Rights Reserved.
Copyright (c) 2011 - 2013 by Johns. All Rights Reserved.
Contributor(s):
@@ -27,13 +27,14 @@ A software and GPU emulated HD output device plugin for VDR.
o Audio FFMpeg / OSS / Analog
o HDMI/SPDIF pass-through
o Software volume, compression, normalize and channel resample
o YaepgHD support
o YaepgHD support / new >1.7.33 VDR ScaleVideo API support
o Software deinterlacer Bob (VA-API only)
o Autocrop
o Grab image (VDPAU only)
o Suspend
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 PIP (Picture-in-Picture) (VDPAU only)
o planned: Video decoder VA-API Branch: vaapi-ext/staging
o planned: Video output XvBA / Opengl / Xv
@@ -56,8 +57,8 @@ Install:
git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
cd vdr-plugin-softhddevice
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
gentoo: make VDRDIR=/usr/include/vdr LIBDIR=.
make
make install
2a) tarball
@@ -66,10 +67,11 @@ Install:
tar vxf vdr-softhddevice-*.tar.bz2
cd softhddevice-*
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
make
make install
You can edit Makefile to enable/disable VDPAU / VA-API / Alsa / OSS
support.
support. The default is to autodetect as much as possible.
Setup: environment
------
@@ -87,8 +89,8 @@ Setup: environment
only if alsa is configured
ALSA_DEVICE=default
alsa PCM device name
ALSA_AC3_DEVICE=
alsa AC3/pass-though device name
ALSA_PASSTHROUGH_DEVICE=
alsa pass-though (AC3,EAC3,DTS,...) device name
ALSA_MIXER=default
alsa control device name
ALSA_MIXER_CHANNEL=PCM
@@ -97,8 +99,8 @@ Setup: environment
only if oss is configured
OSS_AUDIODEV=/dev/dsp
oss dsp device name
OSS_AC3_AUDIODEV=
oss AC3/pass-though device name
OSS_PASSTHROUGHDEV=
oss pass-though (AC3,EAC3,DTS,...) device name
OSS_MIXERDEV=/dev/mixer
oss mixer device name
OSS_MIXER_CHANNEL=pcm
@@ -154,13 +156,17 @@ Setup: /etc/vdr/setup.conf
delay audio or delay video
softhddevice.AudioPassthrough = 0
0 = none, 1 = AC-3
0 = none, 1 = PCM, 2 = MPA, 4 = AC-3, 8 = EAC-3, -X disable
for AC-3 the pass-through device is used.
for PCM/AC-3/EAC-3 the pass-through device is used and the audio
stream is passed undecoded to the output device.
z.b. 12 = AC-3+EAC-3, 13 = PCM+AC-3+EAC-3
note: MPA/DTS/TrueHD/... aren't supported yet
negative values disable passthrough
softhddevice.AudioDownmix = 0
0 = none, 1 = downmix
downmix AC-3 to stero.
Use ffmpeg/libav downmix of AC-3/EAC-3 audio to stereo.
softhddevice.AudioSoftvol = 0
0 = off, use hardware volume control
@@ -228,11 +234,41 @@ Setup: /etc/vdr/setup.conf
0 disable black picture during channel switch
1 enable black picture during channel switch
VideoDisplayFormat = ?
softhddevice.Video4to3DisplayFormat = 1
0 pan and scan
1 letter box
2 center cut-out
softhddevice.VideoOtherDisplayFormat = 1
0 pan and scan
1 pillar box
2 center cut-out
softhddevice.pip.X = 79
softhddevice.pip.Y = 78
softhddevice.pip.Width = 18
softhddevice.pip.Height = 18
PIP pip window position and size in percent.
softhddevice.pip.VideoX = 0
softhddevice.pip.VideoY = 0
softhddevice.pip.VideoWidth = 0
softhddevice.pip.VideoHeight = 0
PIP video window position and size in percent.
softhddevice.pip.Alt.X = 0
softhddevice.pip.Alt.Y = 50
softhddevice.pip.Alt.Width = 0
softhddevice.pip.Alt.Height = 50
PIP alternative pip window position and size in percent.
softhddevice.pip.Alt.VideoX = 0
softhddevice.pip.Alt.VideoY = 0
softhddevice.pip.Alt.VideoWidth = 0
softhddevice.pip.Alt.VideoHeight = 50
PIP alternative video window position and size in percent.
Setup: /etc/vdr/remote.conf
------
@@ -305,11 +341,16 @@ Warning:
Known Bugs:
-----------
VA-API doesn't v-sync 1080i streams
VA-API doesn't v-sync h264 interlaced streams
vdr-image not working
Requires:
---------
media-video/vdr (version >=1.7.xx)
Video Disk Recorder - turns a pc into a powerful set top box
for DVB.
http://www.tvdr.de/
media-video/ffmpeg (version >=0.7)
Complete solution to record, convert and stream audio and
video. Includes libavcodec.

15
Todo
View File

@@ -39,9 +39,12 @@ video:
some low-bandwidth tv channels have hiccups.
check start with 24Hz display rate
crash with ffmpeg without vaapi and vdpau.
still-picture of PES recordings should use VideoMpegEnqueue.
vdpau:
software decoder path not working
software deinterlace path not working.
OSD looses transparency, during channel switch.
OSD looses transparency, while moving cut marks.
libva:
yaepghd (VaapiSetOutputPosition) support
@@ -51,6 +54,9 @@ libva:
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
@@ -107,23 +113,20 @@ plugins:
setup:
Setup of decoder type.
Setup of output type.
Setup of display type.
Setup 4:3 zoom 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.
Workaround exists: hangup PipVideoStream -> Vdpau_get_format -> xcb -> poll
+ lock DecoderLockMutex
future features (not planed for 1.0 - 1.5)
video out with xv
video out with opengl
video out with xvba
software decoder for xv / opengl
multistream handling
pip support
save and use auto-crop with channel zapping
upmix stereo to AC-3 (supported by alsa plugin)

1822
audio.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
///
/// @file audio.h @brief Audio module headerfile
///
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
///
/// Contributor(s):
///
@@ -48,7 +48,9 @@ extern void AudioSetCompression(int, int); ///< set compression parameters
extern void AudioSetStereoDescent(int); ///< set stereo loudness descent
extern void AudioSetDevice(const char *); ///< set PCM audio device
extern void AudioSetDeviceAC3(const char *); ///< set pass-through device
/// set pass-through device
extern void AudioSetPassthroughDevice(const char *);
extern void AudioSetChannel(const char *); ///< set mixer channel
extern void AudioInit(void); ///< setup audio module
extern void AudioExit(void); ///< cleanup and exit audio module

733
codec.c

File diff suppressed because it is too large Load Diff

12
codec.h
View File

@@ -1,7 +1,7 @@
///
/// @file codec.h @brief Codec module headerfile
///
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
///
/// Contributor(s):
///
@@ -23,6 +23,16 @@
/// @addtogroup Codec
/// @{
//----------------------------------------------------------------------------
// Defines
//----------------------------------------------------------------------------
#define CodecPCM 0x01 ///< PCM bit mask
#define CodecMPA 0x02 ///< MPA bit mask (planned)
#define CodecAC3 0x04 ///< AC-3 bit mask
#define CodecEAC3 0x08 ///< EAC-3 bit mask
#define CodecDTS 0x10 ///< DTS bit mask (planned)
//----------------------------------------------------------------------------
// Typedefs
//----------------------------------------------------------------------------

View File

@@ -1,2 +0,0 @@
#!/bin/sh
exec make VDRDIR=/usr/include/vdr LIBDIR=. "$@"

1366
po/de_DE.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
///
/// @file softhddev.h @brief software HD device plugin header file.
///
/// Copyright (c) 2011 - 2012 by Johns. All Rights Reserved.
/// Copyright (c) 2011 - 2013 by Johns. All Rights Reserved.
///
/// Contributor(s):
///
@@ -53,6 +53,8 @@ extern "C"
extern int SetPlayMode(int);
/// C plugin get current system time counter
extern int64_t GetSTC(void);
/// C plugin get video stream size and aspect
extern void GetVideoSize(int *, int *, double *);
/// C plugin set trick speed
extern void TrickSpeed(int);
/// C plugin clears all video and audio data from the device
@@ -93,6 +95,19 @@ extern "C"
/// Get decoder statistics
extern void GetStats(int *, int *, int *, int *);
/// C plugin scale video
extern void ScaleVideo(int, int, int, int);
/// Set Pip position
extern void PipSetPosition(int, int, int, int, int, int, int, int);
/// Pip start
extern void PipStart(int, int, int, int, int, int, int, int);
/// Pip stop
extern void PipStop(void);
/// Pip play video packet
extern int PipPlayVideo(const uint8_t *, int);
extern const char *X11DisplayName; ///< x11 display name
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -23,6 +23,8 @@
#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 };
@@ -42,3 +44,22 @@ typedef struct
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;

View File

@@ -0,0 +1,74 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="4"
inherit eutils vdr-plugin-2
if [[ ${PV} == "9999" ]] ; then
inherit git-2
EGIT_REPO_URI="git://projects.vdr-developer.org/vdr-plugin-softhddevice.git"
else
SRC_URI="http://projects.vdr-developer.org/attachments/download/838/${P}.tgz"
fi
DESCRIPTION="A software and GPU emulated HD output device plugin for VDR."
HOMEPAGE="http://projects.vdr-developer.org/projects/show/plg-softhddevice"
SRC_URI=""
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="vaapi vdpau alsa oss yaepg opengl debug"
DEPEND=">=x11-libs/libxcb-1.8
x11-libs/xcb-util
x11-libs/xcb-util-wm
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/libX11
opengl? ( virtual/opengl )
>=virtual/ffmpeg-0.7
sys-devel/gettext
sys-devel/make
dev-util/pkgconfig
yaepg? ( >=media-video/vdr-1.7.23[yaepg] )
!yaepg? ( >=media-video/vdr-1.7.23 )
vdpau? ( x11-libs/libvdpau virtual/ffmpeg[vdpau] )
vaapi? ( x11-libs/libva virtual/ffmpeg[vaapi] )
alsa? ( media-libs/alsa-lib )
oss? ( sys-kernel/linux-headers )
"
src_prepare() {
vdr-plugin-2_src_prepare
}
src_compile() {
local myconf
myconf="-DHAVE_PTHREAD_NAME -DAV_INFO -DAV_INFO_TIME=15000"
use vdpau && myconf="${myconf} -DUSE_VDPAU"
use vaapi && myconf="${myconf} -DUSE_VAAPI"
use alsa && myconf="${myconf} -DUSE_ALSA"
use oss && myconf="${myconf} -DUSE_OSS"
use debug && myconf="${myconf} -DDEBUG"
#vdr-plugin-2_src_compile
cd "${S}"
BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-all}}
emake ${BUILD_PARAMS} CONFIG="${myconf}" \
${BUILD_TARGETS} \
LOCALEDIR="${TMP_LOCALE_DIR}" \
LIBDIR="${S}" \
TMPDIR="${T}" \
|| die "emake failed"
}
src_install() {
vdr-plugin-2_src_install
}

View File

@@ -2,74 +2,64 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
EAPI="5"
inherit eutils vdr-plugin
inherit flag-o-matic toolchain-funcs vdr-plugin-2 eutils
if [[ ${PV} == "9999" ]] ; then
inherit git-2
EGIT_REPO_URI="git://projects.vdr-developer.org/vdr-plugin-softhddevice.git"
if [ "${PV}" = "9999" ]; then
inherit git-2
EGIT_REPO_URI="git://projects.vdr-developer.org/vdr-plugin-softhddevice.git"
KEYWORDS=""
else
SRC_URI="http://projects.vdr-developer.org/attachments/download/838/${P}.tgz"
SRC_URI="mirror://vdr-developerorg/889/${P}.tgz"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="A software and GPU emulated HD output device plugin for VDR."
DESCRIPTION="Software and GPU emulated HD output device plugin for VDR"
HOMEPAGE="http://projects.vdr-developer.org/projects/show/plg-softhddevice"
SRC_URI=""
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="vaapi vdpau alsa oss yaepg opengl jpeg"
IUSE="alsa oss vaapi vdpau yaepg xscreensaver debug"
DEPEND=">=x11-libs/libxcb-1.8
x11-libs/xcb-util
x11-libs/xcb-util-wm
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/libX11
opengl? ( virtual/opengl )
>=virtual/ffmpeg-0.7
sys-devel/gettext
sys-devel/make
dev-util/pkgconfig
yaepg? ( >=media-video/vdr-1.7.23[yaepg] )
!yaepg? ( >=media-video/vdr-1.7.23 )
vdpau? ( x11-libs/libvdpau )
vaapi? ( x11-libs/libva )
alsa? ( media-libs/alsa-lib )
oss? ( sys-kernel/linux-headers )
jpeg? ( virtual/jpeg )
"
src_prepare() {
vdr-plugin_src_prepare
}
RDEPEND=">=media-video/vdr-1.7
>=virtual/ffmpeg-0.7[vdpau?,vaapi?]
x11-libs/libX11
>=x11-libs/libxcb-1.8
x11-libs/xcb-util-wm
alsa? ( media-libs/alsa-lib )
vdpau? ( x11-libs/libvdpau )
vaapi? ( x11-libs/libva )
alsa? ( media-libs/alsa-lib )
yaepg? ( >=media-video/vdr-1.7[yaepg] )"
DEPEND="${RDEPEND}
x11-libs/xcb-util
sys-devel/gettext
virtual/pkgconfig
oss? ( sys-kernel/linux-headers )"
src_compile() {
local myconf
local myconf
myconf="-DHAVE_PTHREAD_NAME"
use vdpau && myconf="${myconf} -DUSE_VDPAU"
use vaapi && myconf="${myconf} -DUSE_VAAPI"
use alsa && myconf="${myconf} -DUSE_ALSA"
use oss && myconf="${myconf} -DUSE_OSS"
use jpeg && myconf="${myconf} -DUSE_JPEG"
myconf+=" ALSA=$(usex alsa 1 0)"
myconf+=" OSS=$(usex oss 1 0)"
myconf+=" VDPAU=$(usex vdpau 1 0)"
myconf+=" VAAPI=$(usex vaapi 1 0)"
myconf+=" SCREENSAVER=$(usex xscreensaver 1 0)"
if has_version ">=media-video/ffmpeg-0.8" ; then
myconf+=" SWRESAMPLE=1"
fi
emake all CC="$(tc-getCC)" CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}" CONFIG="${myconf}" LIBDIR="." || die
append-cflags -DHAVE_PTHREAD_NAME -D_GNU_SOURCE
append-cxxflags -DHAVE_PTHREAD_NAME -D_GNU_SOURCE
tc-export CC CXX
BUILD_PARAMS="${myconf}"
vdr-plugin-2_src_compile
}
src_install() {
vdr-plugin_src_install
vdr-plugin-2_src_install
dodoc README.txt
#dodir /etc/vdr/plugins || die
#insinto /etc/vdr/plugins
#fowners -R vdr:vdr /etc/vdr || die
#insinto /etc/conf.d
#doins vdr.softhddevice
dodoc ChangeLog README.txt
}

1586
video.c

File diff suppressed because it is too large Load Diff

56
video.h
View File

@@ -1,7 +1,7 @@
///
/// @file video.h @brief Video module header file
///
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
///
/// Contributor(s):
///
@@ -30,6 +30,9 @@
/// Video hardware decoder typedef
typedef struct _video_hw_decoder_ VideoHwDecoder;
/// Video output stream typedef
typedef struct __video_stream__ VideoStream;
//----------------------------------------------------------------------------
// Variables
//----------------------------------------------------------------------------
@@ -37,24 +40,25 @@ typedef struct _video_hw_decoder_ VideoHwDecoder;
extern char VideoHardwareDecoder; ///< flag use hardware decoder
extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning
extern int VideoAudioDelay; ///< audio/video delay
extern char ConfigStartX11Server; ///< flag start the x11 server
//----------------------------------------------------------------------------
// Prototypes
//----------------------------------------------------------------------------
/// Allocate new video hardware decoder.
extern VideoHwDecoder *VideoNewHwDecoder(void);
extern VideoHwDecoder *VideoNewHwDecoder(VideoStream *);
/// Deallocate video hardware decoder.
extern void VideoDelHwDecoder(VideoHwDecoder *);
#ifdef LIBAVCODEC_VERSION
/// Get and allocate a video hardware surface.
extern unsigned VideoGetSurface(VideoHwDecoder *);
extern unsigned VideoGetSurface(VideoHwDecoder *, const AVCodecContext *);
/// Release a video hardware surface
extern void VideoReleaseSurface(VideoHwDecoder *, unsigned);
#ifdef LIBAVCODEC_VERSION
/// Callback to negotiate the PixelFormat.
extern enum PixelFormat Video_get_format(VideoHwDecoder *, AVCodecContext *,
const enum PixelFormat *);
@@ -82,6 +86,9 @@ extern void VideoDisplayWakeup(void);
/// Set video device.
extern void VideoSetDevice(const char *);
/// Get video driver name.
extern const char *VideoGetDriverName(void);
/// Set video geometry.
extern int VideoSetGeometry(const char *);
@@ -94,14 +101,29 @@ extern void VideoSetSoftStartSync(int);
/// Set show black picture during channel switch.
extern void VideoSetBlackPicture(int);
/// Set brightness adjustment.
extern void VideoSetBrightness(int);
/// Set contrast adjustment.
extern void VideoSetContrast(int);
/// Set saturation adjustment.
extern void VideoSetSaturation(int);
/// Set hue adjustment.
extern void VideoSetHue(int);
/// Set video output position.
extern void VideoSetOutputPosition(int, int, int, int);
extern void VideoSetOutputPosition(VideoHwDecoder *, int, int, int, int);
/// Set video mode.
extern void VideoSetVideoMode(int, int, int, int);
/// Set display format.
extern void VideoSetDisplayFormat(int);
/// Set 4:3 display format.
extern void VideoSet4to3DisplayFormat(int);
/// Set other display format.
extern void VideoSetOtherDisplayFormat(int);
/// Set video fullscreen mode.
extern void VideoSetFullscreen(int);
@@ -154,6 +176,9 @@ 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);
@@ -178,14 +203,25 @@ extern uint8_t *VideoGrabService(int *, int *, int *);
/// Get decoder statistics.
extern void VideoGetStats(VideoHwDecoder *, int *, int *, int *, int *);
/// Get video stream size
extern void VideoGetVideoSize(VideoHwDecoder *, int *, int *, int *, int *);
extern void VideoOsdInit(void); ///< Setup osd.
extern void VideoOsdExit(void); ///< Cleanup osd.
extern void VideoInit(const char *); ///< Setup video module.
extern void VideoExit(void); ///< Cleanup and exit video module.
extern int VideoPollInput(void); ///< Poll video input buffers.
extern int VideoDecodeInput(void); ///< Decode video input buffers.
extern int VideoGetBuffers(void); ///< Get number of input buffers.
/// Poll video input buffers.
extern int VideoPollInput(VideoStream *);
/// Decode video input buffers.
extern int VideoDecodeInput(VideoStream *);
/// Get number of input buffers.
extern int VideoGetBuffers(const VideoStream *);
/// Raise the frontend window
extern int VideoRaiseWindow();
/// @}