Skip to content

Commit cd56663

Browse files
committed
new feature: radio image
1 parent 6cde7d5 commit cd56663

22 files changed

+418
-28
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ OBJS = $(PLUGIN).o common.o config.o device.o pidscanner.o \
8383
protocoludp.o sectionfilter.o setup.o sidscanner.o socket.o \
8484
protocolm3u.o protocolradio.o protocolstream.o \
8585
m3u8handler.o process.o process_unix.o ffmpeghandler.o streambasehandler.o \
86-
vlchandler.o source.o statistics.o streamer.o
86+
vlchandler.o source.o statistics.o streamer.o radioimage.o
8787

8888
### The main target:
8989

config.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cIptvConfig::cIptvConfig()
1616
useBytesM(1),
1717
sectionFilteringM(1),
1818
threadQueueSize(32),
19+
stillPicture(0),
1920
ytdlpPath("/usr/local/bin/yt-dlp") {
2021

2122
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFiltersM); ++i) {
@@ -61,11 +62,11 @@ void cIptvConfig::SetResourceDirectory(const char *directoryP) {
6162

6263
void cIptvConfig::SetYtdlpPath(const char *path) {
6364
debug1("%s (%s)", __PRETTY_FUNCTION__, path);
64-
ERROR_IF(!realpath(path, ytdlpPath), "Cannot canonicalize resource directory");
65+
ERROR_IF(!realpath(path, ytdlpPath), "Cannot canonicalize ytdlp path");
6566

6667
}
6768

6869
void cIptvConfig::SetM3uCfgPath(const char *directoryP) {
6970
debug1("%s (%s)", __PRETTY_FUNCTION__, directoryP);
70-
ERROR_IF(!realpath(directoryP, m3uCfgPath), "Cannot canonicalize resource directory");
71+
ERROR_IF(!realpath(directoryP, m3uCfgPath), "Cannot canonicalize m3ucfg directory");
7172
}

config.h

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class cIptvConfig {
1717
unsigned int useBytesM;
1818
unsigned int sectionFilteringM;
1919
unsigned int threadQueueSize;
20+
int stillPicture;
2021
int disabledFiltersM[SECTION_FILTER_TABLE_SIZE];
2122
char configDirectoryM[PATH_MAX];
2223
char resourceDirectoryM[PATH_MAX];
@@ -59,6 +60,7 @@ class cIptvConfig {
5960
const char *GetYtdlpPath() { return ytdlpPath; };
6061
const char *GetM3uCfgPath() { return m3uCfgPath; };
6162
int GetDisabledFilters(unsigned int indexP) const;
63+
int GetStillPicture() const { return stillPicture; };
6264

6365
void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); };
6466
void SetThreadQueueSize(unsigned int tqs) { threadQueueSize = tqs; };
@@ -70,6 +72,7 @@ class cIptvConfig {
7072
void SetResourceDirectory(const char *directoryP);
7173
void SetYtdlpPath(const char* path);
7274
void SetM3uCfgPath(const char* directoryP);
75+
void SetStillPicture(int s) { stillPicture = s; };
7376
};
7477

7578
extern cIptvConfig IptvConfig;

device.cpp

+16-8
Original file line numberDiff line numberDiff line change
@@ -295,28 +295,36 @@ bool cIptvDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP) {
295295
}
296296

297297
switch (itp.Protocol()) {
298-
case cIptvTransponderParameters::eProtocolUDP:protocol = pUdpProtocolM;
298+
case cIptvTransponderParameters::eProtocolUDP:
299+
protocol = pUdpProtocolM;
299300
break;
300301

301-
case cIptvTransponderParameters::eProtocolCURL:protocol = pCurlProtocolM;
302+
case cIptvTransponderParameters::eProtocolCURL:
303+
protocol = pCurlProtocolM;
302304
break;
303305

304-
case cIptvTransponderParameters::eProtocolHTTP:protocol = pHttpProtocolM;
306+
case cIptvTransponderParameters::eProtocolHTTP:
307+
protocol = pHttpProtocolM;
305308
break;
306309

307-
case cIptvTransponderParameters::eProtocolFILE:protocol = pFileProtocolM;
310+
case cIptvTransponderParameters::eProtocolFILE:
311+
protocol = pFileProtocolM;
308312
break;
309313

310-
case cIptvTransponderParameters::eProtocolEXT:protocol = pExtProtocolM;
314+
case cIptvTransponderParameters::eProtocolEXT:
315+
protocol = pExtProtocolM;
311316
break;
312317

313-
case cIptvTransponderParameters::eProtocolM3U:protocol = pM3UProtocolM;
318+
case cIptvTransponderParameters::eProtocolM3U:
319+
protocol = pM3UProtocolM;
314320
break;
315321

316-
case cIptvTransponderParameters::eProtocolRadio:protocol = pRadioProtocolM;
322+
case cIptvTransponderParameters::eProtocolRadio:
323+
protocol = pRadioProtocolM;
317324
break;
318325

319-
case cIptvTransponderParameters::eProtocolStream:protocol = pStreamProtocolM;
326+
case cIptvTransponderParameters::eProtocolStream:
327+
protocol = pStreamProtocolM;
320328
break;
321329

322330
default:error("Unrecognized IPTV protocol: %s", channelP->Parameters());

iptv.cpp

+11-6
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,24 @@ int cPluginIptv::ParseFilters(const char *valueP, int *filtersP) {
187187
bool cPluginIptv::SetupParse(const char *nameP, const char *valueP) {
188188
debug1("%s (%s, %s)", __PRETTY_FUNCTION__, nameP, valueP);
189189
// Parse your own setup parameters and store their values.
190-
if (!strcasecmp(nameP, "ExtProtocolBasePort"))
190+
if (!strcasecmp(nameP, "ExtProtocolBasePort")) {
191191
IptvConfig.SetProtocolBasePort(atoi(valueP));
192-
else if (!strcasecmp(nameP, "SectionFiltering"))
192+
} else if (!strcasecmp(nameP, "SectionFiltering")) {
193193
IptvConfig.SetSectionFiltering(atoi(valueP));
194-
else if (!strcasecmp(nameP, "DisabledFilters")) {
194+
} else if (!strcasecmp(nameP, "DisabledFilters")) {
195195
int DisabledFilters[SECTION_FILTER_TABLE_SIZE];
196-
for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i)
196+
for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i) {
197197
DisabledFilters[i] = -1;
198+
}
198199
unsigned int DisabledFiltersCount = ParseFilters(valueP, DisabledFilters);
199-
for (unsigned int i = 0; i < DisabledFiltersCount; ++i)
200+
for (unsigned int i = 0; i < DisabledFiltersCount; ++i) {
200201
IptvConfig.SetDisabledFilters(i, DisabledFilters[i]);
201-
} else
202+
}
203+
} else if (!strcasecmp(nameP, "StillPicture")) {
204+
IptvConfig.SetStillPicture(atoi(valueP));
205+
} else {
202206
return false;
207+
}
203208
return true;
204209
}
205210

iptv/radio.mpg

135 KB
Binary file not shown.

po/ca_ES.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
10+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Gabriel Bonich <[email protected]>\n"
1313
"Language-Team: Catalan <[email protected]>\n"
@@ -56,6 +56,15 @@ msgstr "Bits/Bytes"
5656
msgid "IPTV information not available!"
5757
msgstr "Informació IPTV no disponible!"
5858

59+
msgid "Use PlayPes-Function"
60+
msgstr ""
61+
62+
msgid "Use StillPicture-Function"
63+
msgstr ""
64+
65+
msgid "Off"
66+
msgstr ""
67+
5968
msgid "Protocol base port"
6069
msgstr "Port Protocol"
6170

@@ -100,6 +109,12 @@ msgstr "Filtre"
100109
msgid "Define an ill-behaving filter to be blacklisted."
101110
msgstr "Definir un filtre que no funcioni per ser inclos a la llista negre."
102111

112+
msgid "StillPicture"
113+
msgstr ""
114+
115+
msgid "Define the type of the picture to show, if a radio plugin is not found."
116+
msgstr ""
117+
103118
msgid "Help"
104119
msgstr "Ajuda"
105120

po/de_DE.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: vdr-iptv 2.4.0\n"
1010
"Report-Msgid-Bugs-To: <see README>\n"
11-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
11+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1212
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1313
"Last-Translator: Frank Neumann <[email protected]>\n"
1414
"Language-Team: German <[email protected]>\n"
@@ -57,6 +57,15 @@ msgstr "Bits/Bytes"
5757
msgid "IPTV information not available!"
5858
msgstr "Keine IPTV Informationen verfügbar!"
5959

60+
msgid "Use PlayPes-Function"
61+
msgstr ""
62+
63+
msgid "Use StillPicture-Function"
64+
msgstr ""
65+
66+
msgid "Off"
67+
msgstr ""
68+
6069
msgid "Protocol base port"
6170
msgstr "Basis Port Protokoll"
6271

@@ -101,6 +110,12 @@ msgstr "Filter"
101110
msgid "Define an ill-behaving filter to be blacklisted."
102111
msgstr "Bestimme einen fehlerhaften Filter der ausgeblendet werden soll."
103112

113+
msgid "StillPicture"
114+
msgstr ""
115+
116+
msgid "Define the type of the picture to show, if a radio plugin is not found."
117+
msgstr ""
118+
104119
msgid "Help"
105120
msgstr "Hilfe"
106121

po/es_ES.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
10+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Gabriel Bonich <[email protected]>\n"
1313
"Language-Team: Spanish <[email protected]>\n"
@@ -56,6 +56,15 @@ msgstr "Bits/Bytes"
5656
msgid "IPTV information not available!"
5757
msgstr "Información IPTV no disponible!"
5858

59+
msgid "Use PlayPes-Function"
60+
msgstr ""
61+
62+
msgid "Use StillPicture-Function"
63+
msgstr ""
64+
65+
msgid "Off"
66+
msgstr ""
67+
5968
msgid "Protocol base port"
6069
msgstr "Puerto Protocolo"
6170

@@ -100,6 +109,12 @@ msgstr "Filtro"
100109
msgid "Define an ill-behaving filter to be blacklisted."
101110
msgstr "Defina un filtro que no funcione para ser incluido en la lista negra."
102111

112+
msgid "StillPicture"
113+
msgstr ""
114+
115+
msgid "Define the type of the picture to show, if a radio plugin is not found."
116+
msgstr ""
117+
103118
msgid "Help"
104119
msgstr "Ayuda"
105120

po/fi_FI.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
10+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Rolf Ahrenberg\n"
1313
"Language-Team: Finnish <[email protected]>\n"
@@ -55,6 +55,15 @@ msgstr "Bitit/tavut"
5555
msgid "IPTV information not available!"
5656
msgstr "IPTV-tietoja ei saatavilla!"
5757

58+
msgid "Use PlayPes-Function"
59+
msgstr ""
60+
61+
msgid "Use StillPicture-Function"
62+
msgstr ""
63+
64+
msgid "Off"
65+
msgstr ""
66+
5867
msgid "Protocol base port"
5968
msgstr "Protokollan perusportti"
6069

@@ -99,6 +108,12 @@ msgstr "Suodatin"
99108
msgid "Define an ill-behaving filter to be blacklisted."
100109
msgstr "Määrittele käytöstä poistettava suodatin, joka lisätään mustalle listalle."
101110

111+
msgid "StillPicture"
112+
msgstr ""
113+
114+
msgid "Define the type of the picture to show, if a radio plugin is not found."
115+
msgstr ""
116+
102117
msgid "Help"
103118
msgstr "Opaste"
104119

po/fr_FR.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: vdr-iptv 2.4.0\n"
1010
"Report-Msgid-Bugs-To: <see README>\n"
11-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
11+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1212
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1313
"Last-Translator: NIVAL Michaël <[email protected]>\n"
1414
"Language-Team: French <[email protected]>\n"
@@ -57,6 +57,15 @@ msgstr "Bits/Bytes"
5757
msgid "IPTV information not available!"
5858
msgstr "Information sur IPTV non disponible !"
5959

60+
msgid "Use PlayPes-Function"
61+
msgstr ""
62+
63+
msgid "Use StillPicture-Function"
64+
msgstr ""
65+
66+
msgid "Off"
67+
msgstr ""
68+
6069
msgid "Protocol base port"
6170
msgstr "Port de base du protocole"
6271

@@ -101,6 +110,12 @@ msgstr "Filtre"
101110
msgid "Define an ill-behaving filter to be blacklisted."
102111
msgstr "Définit les mauvais comportement qui doivent être désactivé."
103112

113+
msgid "StillPicture"
114+
msgstr ""
115+
116+
msgid "Define the type of the picture to show, if a radio plugin is not found."
117+
msgstr ""
118+
104119
msgid "Help"
105120
msgstr "Aide"
106121

po/it_IT.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
10+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Diego Pierotto <[email protected]>\n"
1313
"Language-Team: Italian <[email protected]>\n"
@@ -56,6 +56,15 @@ msgstr "Bits/bytes"
5656
msgid "IPTV information not available!"
5757
msgstr "Informazione IPTV non disponibile!"
5858

59+
msgid "Use PlayPes-Function"
60+
msgstr ""
61+
62+
msgid "Use StillPicture-Function"
63+
msgstr ""
64+
65+
msgid "Off"
66+
msgstr ""
67+
5968
msgid "Protocol base port"
6069
msgstr "Porta base protocollo"
6170

@@ -100,6 +109,12 @@ msgstr "Filtro"
100109
msgid "Define an ill-behaving filter to be blacklisted."
101110
msgstr "Definisci un filtro corrotto che sarà messo nella lista nera."
102111

112+
msgid "StillPicture"
113+
msgstr ""
114+
115+
msgid "Define the type of the picture to show, if a radio plugin is not found."
116+
msgstr ""
117+
103118
msgid "Help"
104119
msgstr "Aiuto"
105120

po/lt_LT.po

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-17 13:56+0200\n"
10+
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Valdemaras Pipiras\n"
1313
"Language-Team: Lithuanian <[email protected]>\n"
@@ -55,6 +55,15 @@ msgstr "Bitai/baitai"
5555
msgid "IPTV information not available!"
5656
msgstr "Nėra IPTV informacijos!"
5757

58+
msgid "Use PlayPes-Function"
59+
msgstr ""
60+
61+
msgid "Use StillPicture-Function"
62+
msgstr ""
63+
64+
msgid "Off"
65+
msgstr ""
66+
5867
msgid "Protocol base port"
5968
msgstr "Numatytasis protokolo portas"
6069

@@ -99,6 +108,12 @@ msgstr "Filtrą"
99108
msgid "Define an ill-behaving filter to be blacklisted."
100109
msgstr "Nustatyti kad netinkamai veikiantis filtras būtu išjungtas."
101110

111+
msgid "StillPicture"
112+
msgstr ""
113+
114+
msgid "Define the type of the picture to show, if a radio plugin is not found."
115+
msgstr ""
116+
102117
msgid "Help"
103118
msgstr "Pagalba"
104119

0 commit comments

Comments
 (0)