From: Markus Heiser <markus.heiser@darmarit.de>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
Chris Mayo <aklhfex@gmail.com>
Cc: Markus Heiser <markus.heiser@darmarit.de>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Markus Heiser <markus.heiser@darmarIT.de>
Subject: [PATCH 1/2] v4l-utils: fixed dvbv5 vdr format
Date: Mon, 17 Oct 2016 14:24:31 +0200 [thread overview]
Message-ID: <1476707072-21985-2-git-send-email-markus.heiser@darmarit.de> (raw)
In-Reply-To: <1476707072-21985-1-git-send-email-markus.heiser@darmarit.de>
From: Markus Heiser <markus.heiser@darmarIT.de>
From: Heiser, Markus <markus.heiser@darmarIT.de>
The vdr format was broken, I got '(null)' entries
HD:11494:S1HC23I0M5N1O35:S:(null):22000:5101:5102,5103,5106,5108:0:0:10301:0:0:0:
0-:1----:2--------------:3:4-----:
refering to the VDR Wikis ...
* LinuxTV: http://www.linuxtv.org/vdrwiki/index.php/Syntax_of_channels.conf
* german comunity Wiki: http://www.vdr-wiki.de/wiki/index.php/Channels.conf#Parameter_ab_VDR-1.7.4
There is no field at position 4 / in between "Source" and "SRate" which
might have a value. I suppose the '(null):' is the result of pointing
to *nothing*.
An other mistake is the ending colon (":") at the line. It is not
explicit specified but adding an collon to the end of an channel entry
will prevent players (like mpv or mplayer) from parsing the line (they
will ignore these lines).
At least: generating a channel list with
dvbv5-scan --output-format=vdr ...
will result in the same defective channel entry, containing "(null):"
and the leading collon ":".
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
---
lib/libdvbv5/dvb-vdr-format.c | 45 +++++++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 14 deletions(-)
diff --git a/lib/libdvbv5/dvb-vdr-format.c b/lib/libdvbv5/dvb-vdr-format.c
index a4bd26b..ab0e5cf 100644
--- a/lib/libdvbv5/dvb-vdr-format.c
+++ b/lib/libdvbv5/dvb-vdr-format.c
@@ -309,13 +309,14 @@ int dvb_write_format_vdr(const char *fname,
fprintf(fp, "%s", entry->channel);
if (entry->vchannel)
fprintf(fp, ",%s", entry->vchannel);
+ fprintf(fp, ":");
/*
* Output frequency:
* in kHz for terrestrial/cable
* in MHz for satellite
*/
- fprintf(fp, ":%i:", freq / 1000);
+ fprintf(fp, "%i:", freq / 1000);
/* Output modulation parameters */
fmt = &formats[i];
@@ -349,20 +350,30 @@ int dvb_write_format_vdr(const char *fname,
fprintf(fp, "%s", table->table[data]);
}
-
- /* Output format type */
- fprintf(fp, ":%s:", id);
+ fprintf(fp, ":");
/*
- * Output satellite location
- * FIXME: probably require some adjustments to match the
- * format expected by VDR.
+ * Output sources configuration for VDR
+ *
+ * S (satellite) xy.z (orbital position in degrees) E or W (east or west)
+ *
+ * FIXME: in case of ATSC we use "A", this is what w_scan does
*/
- switch(delsys) {
- case SYS_DVBS:
- case SYS_DVBS2:
- fprintf(fp, "%s:", entry->location);
+
+ if (entry->location) {
+ switch(delsys) {
+ case SYS_DVBS:
+ case SYS_DVBS2:
+ fprintf(fp, "%s", entry->location);
+ break;
+ default:
+ fprintf(fp, "%s", id);
+ break;
+ }
+ } else {
+ fprintf(fp, "%s", id);
}
+ fprintf(fp, ":");
/* Output symbol rate */
srate = 27500000;
@@ -407,10 +418,16 @@ int dvb_write_format_vdr(const char *fname,
/* Output Service ID */
fprintf(fp, "%d:", entry->service_id);
- /* Output SID, NID, TID and RID */
- fprintf(fp, "0:0:0:");
+ /* Output Network ID */
+ fprintf(fp, "0:");
- fprintf(fp, "\n");
+ /* Output Transport Stream ID */
+ fprintf(fp, "0:");
+
+ /* Output Radio ID
+ * this is the last entry, tagged bei a new line (not a colon!)
+ */
+ fprintf(fp, "0\n");
line++;
};
fclose (fp);
--
2.7.4
next prev parent reply other threads:[~2016-10-17 12:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 9:52 [PATCH 0/2] v4l-utils build instruction and dvbv5 format Markus Heiser
2016-08-10 9:52 ` [PATCH 1/2] v4l-utils: add comments to the build instructions Markus Heiser
2016-08-10 9:52 ` [PATCH 2/2] v4l-utils: fixed dvbv5 vdr format Markus Heiser
2016-08-16 7:10 ` Markus Heiser
2016-08-22 9:53 ` Markus Heiser
2016-08-24 14:49 ` Mauro Carvalho Chehab
2016-08-24 14:52 ` Mauro Carvalho Chehab
2016-09-05 13:13 ` Markus Heiser
2016-09-05 13:25 ` Mauro Carvalho Chehab
2016-09-05 19:01 ` Chris Mayo
2016-09-06 9:41 ` Mauro Carvalho Chehab
2016-09-06 15:16 ` VDR User
2016-09-06 15:47 ` Mauro Carvalho Chehab
2016-09-07 9:51 ` Markus Heiser
2016-09-07 17:59 ` VDR User
2016-09-08 7:15 ` Markus Heiser
2016-09-08 15:59 ` VDR User
2016-09-08 18:33 ` Mauro Carvalho Chehab
2016-10-17 12:24 ` [PATCH 0/2] " Markus Heiser
2016-10-17 12:24 ` Markus Heiser [this message]
2016-10-17 12:24 ` [PATCH 2/2] libdvbv5: Improve vdr format output for DVB-T(2) Markus Heiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476707072-21985-2-git-send-email-markus.heiser@darmarit.de \
--to=markus.heiser@darmarit.de \
--cc=aklhfex@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox