public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Markus Heiser <markus.heiser@darmarit.de>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Chris Mayo <aklhfex@gmail.com>
Subject: Re: [PATCH 2/2] v4l-utils: fixed dvbv5 vdr format
Date: Wed, 24 Aug 2016 11:49:27 -0300	[thread overview]
Message-ID: <20160824114927.3c6ab0d6@vento.lan> (raw)
In-Reply-To: <1470822739-29519-3-git-send-email-markus.heiser@darmarit.de>

Hi Markus,

Em Wed, 10 Aug 2016 11:52:19 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:

> 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 ":".

Sorry for taking too long to handle that. I usually stop handling
patches one week before the merge window, returning to merge only
after -rc1. This time, it took a little more time, due to the Sphinx
changes, as I was needing some patches to be merged upstream, in order
to change my handling scripts to work with the new way.

Anyway, with regards to this patch, not sure if you saw, but
Chris Mayo sent us a different fix for it:

	https://patchwork.linuxtv.org/patch/35803/

With is meant to support VDR format as used on version 2.2. Not sure
if this format is backward-compatible with versions 1.x, but usually
VDR just adds new parameters to the lines.

So, I'm inclined to merge Chris patch instead of yours.

So, could you please test if his patch does what's needed?

Thanks!
Mauro


> 
> 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);



Thanks,
Mauro

  parent reply	other threads:[~2016-08-24 14:50 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 [this message]
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                       ` [PATCH 1/2] " Markus Heiser
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=20160824114927.3c6ab0d6@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=aklhfex@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=markus.heiser@darmarit.de \
    /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