Skip to content

Commit 6f5e42c

Browse files
committed
initial version
0 parents  commit 6f5e42c

31 files changed

+12104
-0
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/analyze/
2+
/.dependencies
3+
/libvdr-web.so
4+
/thirdparty/IXWebSocket/build/
5+
/.idea/

Diff for: COPYING

+340
Large diffs are not rendered by default.

Diff for: HISTORY

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VDR Plugin 'web' Revision History
2+
---------------------------------
3+
4+
2023-02-04: Version 0.0.1
5+
6+
- Initial revision.

Diff for: Makefile

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
#
2+
# Makefile for a Video Disk Recorder plugin
3+
#
4+
# $Id$
5+
6+
# The official name of this plugin.
7+
# This name will be used in the '-P...' option of VDR to load the plugin.
8+
# By default the main source file also carries this name.
9+
10+
PLUGIN = web
11+
12+
### The version number of this plugin (taken from the main source file):
13+
14+
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).cpp | awk '{ print $$6 }' | sed -e 's/[";]//g')
15+
16+
17+
mINI_DIR = thirdparty/mINI-0.9.14
18+
19+
### The directory environment:
20+
21+
# Use package data if installed...otherwise assume we're under the VDR source directory:
22+
PKG_CONFIG ?= pkg-config
23+
PKGCFG = $(if $(VDRDIR),$(shell $(PKG_CONFIG) --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." $(PKG_CONFIG) --variable=$(1) vdr))
24+
LIBDIR = $(call PKGCFG,libdir)
25+
LOCDIR = $(call PKGCFG,locdir)
26+
PLGCFG = $(call PKGCFG,plgcfg)
27+
#
28+
TMPDIR ?= /tmp
29+
30+
### The compiler options:
31+
32+
export CFLAGS = $(call PKGCFG,cflags)
33+
export CXXFLAGS = $(call PKGCFG,cxxflags)
34+
35+
# ffmpeg libswscale
36+
CXXFLAGS += $(shell pkg-config --cflags libswscale)
37+
LDFLAGS += $(shell pkg-config --libs libswscale)
38+
39+
### The version number of VDR's plugin API:
40+
41+
APIVERSION = $(call PKGCFG,apiversion)
42+
43+
### Allow user defined options to overwrite defaults:
44+
45+
-include $(PLGCFG)
46+
47+
### The name of the distribution archive:
48+
49+
ARCHIVE = $(PLUGIN)-$(VERSION)
50+
PACKAGE = vdr-$(ARCHIVE)
51+
52+
### The name of the shared object file:
53+
54+
SOFILE = libvdr-$(PLUGIN).so
55+
56+
### Includes and Defines (add further entries here):
57+
58+
INCLUDES += -I. -I$(mINI_DIR)/src/mini
59+
60+
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
61+
62+
### The object files (add further files here):
63+
64+
OBJS = $(PLUGIN).o osddelegate.o webosdmenu.o webosdpage.o sharedmemory.o browserclient.o status.o ait.o videocontrol.o
65+
66+
### The main target:
67+
68+
all: $(SOFILE) i18n
69+
70+
### Implicit rules:
71+
72+
%.o: %.c
73+
@echo CC $@
74+
$(Q)$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
75+
76+
%.o: %.cpp
77+
@echo CC $@
78+
$(Q)$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
79+
80+
### Dependencies:
81+
82+
MAKEDEP = $(CXX) -MM -MG
83+
DEPFILE = .dependencies
84+
$(DEPFILE): Makefile
85+
@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
86+
87+
-include $(DEPFILE)
88+
89+
### Internationalization (I18N):
90+
91+
PODIR = po
92+
I18Npo = $(wildcard $(PODIR)/*.po)
93+
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
94+
I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
95+
I18Npot = $(PODIR)/$(PLUGIN).pot
96+
97+
%.mo: %.po
98+
@echo MO $@
99+
$(Q)msgfmt -c -o $@ $<
100+
101+
$(I18Npot): $(wildcard *.cpp)
102+
@echo GT $@
103+
$(Q)xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
104+
105+
%.po: $(I18Npot)
106+
@echo PO $@
107+
$(Q)msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
108+
@touch $@
109+
110+
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
111+
install -D -m644 $< $@
112+
113+
.PHONY: i18n
114+
i18n: $(I18Nmo) $(I18Npot)
115+
116+
install-i18n: $(I18Nmsgs)
117+
118+
### Targets:
119+
120+
121+
$(SOFILE): $(OBJS)
122+
@echo LD $@
123+
$(Q)$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LDFLAGS) -o $@
124+
125+
install-lib: $(SOFILE)
126+
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
127+
128+
install: install-lib install-i18n
129+
130+
dist: $(I18Npo) clean
131+
@-rm -rf $(TMPDIR)/$(ARCHIVE)
132+
@mkdir $(TMPDIR)/$(ARCHIVE)
133+
@cp -a * $(TMPDIR)/$(ARCHIVE)
134+
@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
135+
@-rm -rf $(TMPDIR)/$(ARCHIVE)
136+
@echo Distribution package created as $(PACKAGE).tgz
137+
138+
clean:
139+
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
140+
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~

Diff for: README

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This is a "plugin" for the Video Disk Recorder (VDR).
2+
3+
Written by: Your Name <[email protected]>
4+
5+
Project's homepage: URL
6+
7+
Latest version available at: URL
8+
9+
This program is free software; you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation; either version 2 of the License, or
12+
(at your option) any later version.
13+
See the file COPYING for more information.
14+
15+
Description:

Diff for: README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Warning
2+
- highly instable
3+
- does not works as desired
4+
- could destroy your system
5+
- in development phase
6+
7+
8+
## vdr-plugin-web (Part 1)
9+
Works together with ```cefbrowser``` and ```remotetranscoder```
10+
11+
# Build
12+
```
13+
make; make install
14+
```
15+
16+
# Configuration
17+
A default configuration can be found in folder config: ```sockets.ini```.
18+
19+
:fire: All ports/ip addresses in ```sockets.ini``` must be the same as for ```cefbrowser``` and ```remotetranscoder```.
20+
It's safe to use the same sockets.ini for all of the three parts (vdr-plugin-web, cefbrowser, remotetranscoder).
21+
22+
# Start
23+
Like all other VDR plugins.
24+
```
25+
[web]
26+
-c /path/to/sockets.ini
27+
```
28+
29+
# Logging
30+
Uses the VDR logging mechanism. Log entries can be found in ```/var/log/syslog``` with ```[vdrweb]``` prefix.

0 commit comments

Comments
 (0)