Skip to content

Commit

Permalink
Version 1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Reimer committed Jan 28, 2023
1 parent b3c3b80 commit d574235
Show file tree
Hide file tree
Showing 35 changed files with 153 additions and 580 deletions.
14 changes: 13 additions & 1 deletion HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,16 @@ first release of "new" plugin (see README)
-----
- fix logging of VideoAspect and PixelAspect: must be %f instead of %d
- adapt cPvr350Osd::CanHandleAreas for vdr-1.7.17
- remove videodev.h (obsolet in 2.6.38 and never needed)
- remove videodev.h (obsolet in 2.6.38 and never needed)

1.7.4
-----
- default is now to always recode mp2 audio, as there are too many problems with streams like ZDF

1.7.5
-----
- remove support for vdr < version 2.0
- support vdr-2.1.3
- remove support for ancient ivtv driver versions
- adapt Makefile to vdr's new Makefile system
- fix segfaults on exit when framebuffer device is missing
122 changes: 48 additions & 74 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,142 +1,116 @@
#
# Makefile for a Video Disk Recorder plugin
#
# -- based on pvrinput v20071028, Winfried Koehler --

#SET_VIDEO_WINDOW=1
# $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 = pvr350

### The version number of this plugin (taken from the main source file):

VERSION = $(shell grep 'static const char \*VERSION *=' pvr350.c | awk '{ print $$6 }' | sed -e 's/[";]//g')
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')

LIBS = -ltwolame -la52 -lm -lmpg123
### The directory environment:

### The C++ compiler and options:
# 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_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg)
#
TMPDIR ?= /tmp

CXX ?= g++
CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
### The compiler options:

### The directory environment:
export CFLAGS = $(call PKGCFG,cflags)
export CXXFLAGS = $(call PKGCFG,cxxflags)
export LDADD = -lm -la52 $(shell pkg-config --libs twolame libmpg123)

DVBDIR = ../../../../DVB
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
### The version number of VDR's plugin API:

### Test whether VDR has locale support
VDRLOCALE = $(shell grep 'I18N_DEFAULT_LOCALE' $(VDRDIR)/i18n.h)
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 and Defines (add further entries here):
### The name of the shared object file:

SOFILE = libvdr-$(PLUGIN).so

INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include
### Includes and Defines (add further entries here):

DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
INCLUDES +=

ifdef SET_VIDEO_WINDOW
DEFINES += -DSET_VIDEO_WINDOW
endif
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'

### The object files (add further files here):

OBJS = $(PLUGIN).o $(PLUGIN)device.o $(PLUGIN)osd.o $(PLUGIN)audio.o $(PLUGIN)tools.o $(PLUGIN)setup.o $(PLUGIN)menu.o

### The main target:

all: i18n libvdr-$(PLUGIN).so
all: $(SOFILE)

### Implicit rules:

%.o: %.c
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<

### Dependencies:

MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(subst i18n.c,,$(OBJS:%.o=%.c)) > $@
@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@

-include $(DEPFILE)

### Internationalization (I18N):

PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Ndirs = $(notdir $(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
I18Nvdrmo = vdr-$(PLUGIN).mo
ifeq ($(strip $(APIVERSION)),1.5.7)
I18Nvdrmo = $(PLUGIN).mo
endif

ifneq ($(strip $(VDRLOCALE)),)
### do gettext based i18n stuff

%.mo: %.po
msgfmt -c -o $@ $<

$(I18Npot): $(subst i18n.c,,$(wildcard *.c))
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -o $@ $(subst i18n.c,,$(wildcard *.c))

$(I18Npo): $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<

i18n: $(I18Nmo)
@mkdir -p $(LOCALEDIR)
for i in $(I18Ndirs); do\
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(I18Nvdrmo);\
done
$(I18Npot): $(wildcard *.c)
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`

i18n.c: ### nothing to do
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@

else ### do i18n.c based i18n stuff
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@

OBJS += i18n.o
.PHONY: i18n
i18n: $(I18Nmo) $(I18Npot)

i18n: $(@cp $(PODIR)/i18n.h i18n.h)
@### nothing to do
install-i18n: $(I18Nmsgs)

i18n.h: i18n.c

### i18n compatibility generator:

i18n.c: $(PODIR)/i18n-template.c po2i18n.pl $(I18Npo)
./po2i18n.pl < $(PODIR)/i18n-template.c > i18n.c
@cp $(PODIR)/i18n.h i18n.h

endif
### Targets:

$(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LDADD) -o $@

### Targets:
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)

libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ $(LIBS)
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
install: install-lib install-i18n

dist: clean
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
Expand All @@ -145,5 +119,5 @@ dist: clean
@echo Distribution package created as $(PACKAGE).tgz

clean:
@-rm -f $(OBJS) $(DEPFILE) i18n.c i18n.h *.so *.tgz core* *~
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot $(PODIR)/*~
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
10 changes: 0 additions & 10 deletions mplayer/.directory

This file was deleted.

6 changes: 0 additions & 6 deletions po/.directory

This file was deleted.

8 changes: 3 additions & 5 deletions po/ca_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
8 changes: 3 additions & 5 deletions po/cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
8 changes: 3 additions & 5 deletions po/da_DK.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
4 changes: 2 additions & 2 deletions po/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ msgid ""
msgstr ""
"Project-Id-Version: de_DE\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2010-03-28 10:18+0200\n"
"Last-Translator: Martin Dauskardt <[email protected]>\n"
"Language-Team: Deutsch <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -42,6 +43,5 @@ msgstr "Schwarzes Video für nur-Audio-Streams"
msgid "Setup.pvr350$Recode MP2"
msgstr "Recode MP2 Audio"


#~ msgid "Setup.pvr350$Recode RDS radio"
#~ msgstr "Recode RDS radio"
8 changes: 3 additions & 5 deletions po/el_GR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
8 changes: 3 additions & 5 deletions po/es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
8 changes: 3 additions & 5 deletions po/et_EE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: pvr350 plugin\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-03-28 10:03+0200\n"
"POT-Creation-Date: 2014-02-28 18:10+0100\n"
"PO-Revision-Date: 2007-10-17 21:44 MESZ\n"
"Last-Translator: Winfried Koehler <see vdr-portal.de>\n"
"Language-Team: see README\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -36,8 +37,5 @@ msgstr ""
msgid "Setup.pvr350$Black video for audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode MP2 audio-only streams"
msgstr ""

msgid "Setup.pvr350$Recode joint-stereo"
msgid "Setup.pvr350$Recode MP2"
msgstr ""
Loading

0 comments on commit d574235

Please sign in to comment.