Re: [PATCH] keytable: fix BPF protocol compilation on mips

2018-11-07 Thread Gregor Jasny

On 11/7/18 4:36 PM, Sean Young wrote:

clang -idirafter /usr/local/include -idirafter
+/usr/lib/llvm-6.0/lib/clang/6.0.1/include -idirafter
+/usr/include/mips64el-linux-gnuabi64 -idirafter /usr/include
+-I../../../include -target bpf -O2 -c grundig.c

In file included from grundig.c:5:
In file included from ../../../include/linux/lirc.h:10:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from

+/usr/include/mips64el-linux-gnuabi64/asm/posix_types.h:13:

/usr/include/mips64el-linux-gnuabi64/asm/sgidefs.h:19:2: error: Use a Linux

+compiler or give up.

#error Use a Linux compiler or give up.


This requires __linux__ to be defined.


Thanks! I uploaded a new Debian package. Let's see how it goes:
https://buildd.debian.org/status/package.php?p=v4l-utils

I'll pick up your other patches soon.

-Gregor


si2168: NULL pointer dereference at unplug

2017-11-25 Thread Gregor Jasny
Hello,

when I unplug my August DVB-T230 stick I get the message below.
Is this a known issue?

If not, is there anything I could do to get you a better stack trace?

Thanks,
Gregor

[9.573636] BUG: unable to handle kernel NULL pointer dereference at
00b8
[9.573653] IP: si2168_sleep+0x26/0xd0 [si2168]
[9.573655] PGD 0 P4D 0
[9.573659] Oops:  [#1] SMP
[9.573662] Modules linked in: bnep nls_iso8859_1 cmdlinepart
intel_rapl intel_spi_platform intel_telemetry_pltdrv ir_nec_decoder
rc_total_media_in_hand_02 intel_spi intel_punit_ipc si2157 spi_nor media
intel_telemetry_core mtd intel_pmc_ipc si2168 i2c_mux
x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_hdmi snd_soc_skl
coretemp snd_soc_skl_ipc 8250_dw snd_soc_sst_ipc spi_pxa2xx_platform
kvm_intel snd_soc_sst_dsp kvm snd_hda_ext_core snd_hda_codec_realtek
snd_soc_sst_match snd_soc_rt298 snd_hda_codec_generic snd_soc_rt286
irqbypass snd_soc_rl6347a crct10dif_pclmul crc32_pclmul snd_soc_core
ghash_clmulni_intel snd_hda_intel snd_compress pcbc ac97_bus
snd_pcm_dmaengine snd_hda_codec snd_hda_core snd_hwdep snd_pcm arc4
aesni_intel aes_x86_64 crypto_simd glue_helper cryptd snd_seq_midi
snd_seq_midi_event
[9.573710]  intel_cstate snd_rawmidi intel_rapl_perf dvb_usb_cxusb
iwlmvm input_leds mac80211 serio_raw wmi_bmof btusb dib0070 btrtl
dvb_usb btbcm dvb_core btintel snd_seq bluetooth lpc_ich iwlwifi
ecdh_generic snd_seq_device snd_timer ir_rc6_decoder rtsx_pci_ms
cfg80211 idma64 virt_dma memstick intel_lpss_pci intel_lpss rc_rc6_mce
snd ir_lirc_codec mei_me lirc_dev mei shpchp ite_cir rfkill_gpio
soundcore rc_core mac_hid tpm_crb parport_pc ppdev lp parport ip_tables
x_tables autofs4 hid_apple usbhid hid i915 rtsx_pci_sdmmc i2c_algo_bit
drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops r8169 ahci
psmouse drm mii libahci rtsx_pci wmi video pinctrl_broxton pinctrl_intel
[9.573768] CPU: 2 PID: 723 Comm: kdvb-ad-0-fe-0 Not tainted
4.14.0-041400-generic #201711122031
[9.573770] Hardware name:  /NUC6CAYB, BIOS
AYAPLCEL.86A.0041.2017.0825.1152 08/25/2017
[9.573772] task: 90e130a8da00 task.stack: a1c2021a4000
[9.573775] RIP: 0010:si2168_sleep+0x26/0xd0 [si2168]
[9.573777] RSP: :a1c2021a7e18 EFLAGS: 00010246
[9.573779] RAX:  RBX:  RCX:
90e12e1f89e8
[9.573781] RDX: 0001 RSI: 0292 RDI:
90e1328da028
[9.573783] RBP: a1c2021a7e60 R08: 90e13fd12278 R09:
0001
[9.573785] R10: a1c2021a7e90 R11: 0321 R12:
90e133e852e0
[9.573786] R13:  R14: 90e12e1f89e0 R15:
90e12e1f8800
[9.573789] FS:  () GS:90e13fd0()
knlGS:
[9.573791] CS:  0010 DS:  ES:  CR0: 80050033
[9.573792] CR2: 00b8 CR3: 000273b3c000 CR4:
003406e0
[9.573794] Call Trace:
[9.573802]  ? call_timer_fn+0x130/0x130
[9.573809]  dvb_usb_fe_sleep+0x37/0x60 [dvb_usb]
[9.573818]  dvb_frontend_thread+0x282/0x6d0 [dvb_core]
[9.573823]  ? wait_woken+0x80/0x80
[9.573827]  kthread+0x125/0x140
[9.573833]  ? dtv_set_frontend+0x410/0x410 [dvb_core]
[9.573836]  ? kthread_create_on_node+0x70/0x70
[9.573840]  ret_from_fork+0x25/0x30
[9.573842] Code: 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 54 53
48 83 ec 38 48 8b 9f 18 03 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 e8
31 c0 <4c> 8b a3 b8 00 00 00 0f 1f 44 00 00 41 81 bc 24 4c 05 00 00 0b
[9.573883] RIP: si2168_sleep+0x26/0xd0 [si2168] RSP: a1c2021a7e18
[9.573885] CR2: 00b8
[9.573888] ---[ end trace c8685d2947f0e803 ]---

[   14.198372] BUG: unable to handle kernel NULL pointer dereference at
0180
[   14.198393] IP: _raw_spin_lock_irqsave+0x22/0x40
[   14.198396] PGD 0 P4D 0
[   14.198402] Oops: 0002 [#2] SMP
[   14.198405] Modules linked in: ccm bnep nls_iso8859_1 cmdlinepart
intel_rapl intel_spi_platform intel_telemetry_pltdrv ir_nec_decoder
rc_total_media_in_hand_02 intel_spi intel_punit_ipc si2157 spi_nor media
intel_telemetry_core mtd intel_pmc_ipc si2168 i2c_mux
x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_hdmi snd_soc_skl
coretemp snd_soc_skl_ipc 8250_dw snd_soc_sst_ipc spi_pxa2xx_platform
kvm_intel snd_soc_sst_dsp kvm snd_hda_ext_core snd_hda_codec_realtek
snd_soc_sst_match snd_soc_rt298 snd_hda_codec_generic snd_soc_rt286
irqbypass snd_soc_rl6347a crct10dif_pclmul crc32_pclmul snd_soc_core
ghash_clmulni_intel snd_hda_intel snd_compress pcbc ac97_bus
snd_pcm_dmaengine snd_hda_codec snd_hda_core snd_hwdep snd_pcm arc4
aesni_intel aes_x86_64 crypto_simd glue_helper cryptd snd_seq_midi
snd_seq_midi_event
[   14.198471]  intel_cstate snd_rawmidi intel_rapl_perf dvb_usb_cxusb
iwlmvm input_leds mac80211 serio_raw wmi_bmof btusb dib0070 btrtl
dvb_usb btbcm dvb_core btintel snd_seq bluetooth lpc_ich iwlwifi
ecdh_generic snd_seq_device snd_timer ir_rc6_decoder 

Re: dvbv5-scan: Missing NID, TID, and RID in VDR channel output

2017-11-25 Thread Gregor Jasny
Hello Mauro,

On 11/25/17 12:54 PM, Mauro Carvalho Chehab wrote:
> Em Sat, 25 Nov 2017 09:08:19 -0200
> Mauro Carvalho Chehab <mche...@osg.samsung.com> escreveu:
>> Em Wed, 22 Nov 2017 20:50:56 +0100
>> Gregor Jasny <gja...@googlemail.com> escreveu:
>>>
>>> Mauro, do you think it would be possible to parse / output NID, TID, and
>>> RID from dvbv5_scan? It would greatly improve usability.  
>>
>> It is possible. Not sure how much efforts it would take. Could you please
>> send me, in priv, a capture of ~30-60 seconds of a recent DVB-T2 channel
>> in Germany with those fields, and the corresponding output from w_scan,
>> for all channels at the same frequency?
>>
>> I'll use it to test it with my RF generator here, and see if I can tweak
>> dvbv5-scan to produce the same output.
>>
>> The syntax to capture the full MPEG-TS is:
>>
>>  $ dvbv5-zap -P -o channel.ts -t 60 scan_file.conf

I captured all DVB-T2 frequencies I observed so far:
https://drive.google.com/open?id=1As5Ek0iN0n9FgH7xU-HsrFIRBE0hGOWQ
(that is in Germany / Saxony / Dresden)

> Btw, it follows a quick hack that should output network and transport ID.
> 
> Please test. It should be noticed that it adds two new fields on a struct
> that it is part of the API. I didn't care to check if this patch would break
> userspace API.

That works like a charm! Thank you for writing it.

Thanks,
Gregor


dvbv5-scan: Missing NID, TID, and RID in VDR channel output

2017-11-22 Thread Gregor Jasny
Hello Mauro and list,

since some days my region in Germany finally got DVB-T2 coverage.
Something in the broadcasted tabled makes w_scan only find a subset each
time. dvbv5-scan is somewhat more reliable.  But with the VDR compatible
channel list exported from dvbv5-scan I cannot make VDR produce any EPG.
>From skimming over the VDR code I think this is due to missing NID and TID.

The upper one is from dvbv5-scan, the lower one from w_scan:

>   VPID
> APID   TPID  CA SID  NID   TIDRID
> arte HD:618000:B8 C999 D999 G19128 I999 M999 S1 T16 Y0   :T:27500 :210
> :220,221   :0:0 :770 :0:0 :0
> arte HD;ARD:618000:B8  D0   G19256   S1 T32 Y0 P0:T:27500 :210=36 
> :220=deu@17,221=fra:230  :0 :770 :8468 :15106 :0

Mauro, do you think it would be possible to parse / output NID, TID, and
RID from dvbv5_scan? It would greatly improve usability. Now that w_scan
is unmaintained, dvb5-scan is the only maintained DVB-T2 scanning app:

https://linuxtv.org/wiki/index.php/Frequency_scan#Comparison_of_DVB_frequency_scanning_commandline_utilities

Thanks,
Gregor


Re: [PATCH v2] Build libv4lconvert helper support only when fork() is available.

2017-07-26 Thread Gregor Jasny
On 7/26/17 2:51 PM, Hugues Fruchet wrote:
> Build libv4lconvert helper support only when fork() is available.
> This fix the build issue reported here:
> http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe/build-end.log
> 
> More details on buildroot mailing list here:
> http://lists.buildroot.org/pipermail/buildroot/2017-July/199093.html

Applied. Thanks!


Re: Problems pushing to v4l-utils

2017-07-26 Thread Gregor Jasny
On 7/26/17 8:15 PM, Gregor Jasny wrote:
> I'm having problems to push to v4l-utils:

Please ignore. It was the wrong clone of v4l-utils.

Thanks,
Gregor



Problems pushing to v4l-utils

2017-07-26 Thread Gregor Jasny
Hello Mauro & list,

I'm having problems to push to v4l-utils:

Did the setup recently change?

gjasny@sid:~/src/v4l-utils$ git remote -v
origin  git://linuxtv.org/v4l-utils.git (fetch)
origin  git://linuxtv.org/v4l-utils.git (push)

gjasny@sid:~/src/v4l-utils$ git push -v
Pushing to git://linuxtv.org/v4l-utils.git
Looking up linuxtv.org ... done.
Connecting to linuxtv.org (port 9418) ... 130.149.80.248 done.
fatal: remote error: access denied or repository not exported:
/v4l-utils.git

The SSH key is working and I can access the shell on linuxtv.org.

Thanks,
Gregor


Re: [PATCH] libdvbv5: T2 delivery descriptor: fix wrong size of bandwidth field

2017-05-04 Thread Gregor Jasny

Hello Mauro,

On 04.05.17 00:33, Mauro Carvalho Chehab wrote:

Em Wed, 3 May 2017 09:53:03 -0300
Mauro Carvalho Chehab <mche...@osg.samsung.com> escreveu:

Em Tue, 2 May 2017 22:30:29 +0200
Gregor Jasny <gja...@googlemail.com> escreveu:

I just used your patch and another to hopefully fix
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859008

But I'm a little bit hesitant to merge it to v4l-utils git without
Mauros acknowledgement.



Patches look correct, but the T2 parser has a more serious issue that
will require breaking ABI/API compatibility.



I'll cherry-pick the corresponding patches to the stable branch.


Reinhard, could you please test the latest patches on
https://git.linuxtv.org/v4l-utils.git/log/?h=stable-1.12

If they work for you, I'd release a new stable version and upload it to 
Debian Sid afterwards.


Thanks,
Gregor


Re: [PATCH] libdvbv5: T2 delivery descriptor: fix wrong size of bandwidth field

2017-05-02 Thread Gregor Jasny
Hello Clemens,

On 4/1/17 5:50 PM, Clemens Ladisch wrote:
> ETSI EN 300 468 V1.11.1 § 6.4.4.2 defines the bandwith field as having
> four bits.

I just used your patch and another to hopefully fix
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859008

But I'm a little bit hesitant to merge it to v4l-utils git without
Mauros acknowledgement.

Thanks,
Gregor


Re: dvb-tools: dvbv5-scan segfaults with DVB-T2 HD service that just started in Germany

2017-03-30 Thread Gregor Jasny
Hello Mauro,

could you please take a look?

Thanks,
Gregor

On 3/30/17 9:36 PM, Frank Heckenbach wrote:
> I got the same problem, only on some channels though, e.g. ZDF using
> this input:
> 
> [CH34]
> DELIVERY_SYSTEM = DVBT2
> FREQUENCY = 57800
> BANDWIDTH_HZ = 800
> MODULATION = QAM/16
> 
> *** Error in `dvbv5-scan': malloc(): memory corruption: 0x00fe13c0 ***
> 
> I did some debugging with gdb and valgrind (using the upstream
> version v4l-utils-1.12.3.tar.bz2 since I needed to recompile anyway
> to get debug info).
> 
> I found an invalid access in descriptors/desc_t2_delivery.c:55
> 
>   memcpy(>centre_frequency, p, len);
> 
> Before this, dvb_extension_descriptor_init had
> 
>   desc_type == 4 (T2_delivery_system_descriptor)
> 
> and
> 
>   dvb_ext_descriptors[4].size == sizeof(struct dvb_desc_t2_delivery) (23)
> 
> so it allocated only 23 bytes, but didn't change desc_len which was
> still 68, causing the overflow.
> 
> Setting desc_len to 23 didn't help, but just allocating 68 bytes
> did:
> 
> --- v4l-utils-1.12.3/lib/libdvbv5/descriptors/desc_extension.c
> +++ v4l-utils-1.12.3/lib/libdvbv5/descriptors/desc_extension.c
> @@ -149,7 +149,7 @@
>   if (!size)
>   size = desc_len;
>  
> - ext->descriptor = calloc(1, size);
> + ext->descriptor = calloc(1, desc_len);
>  
>   if (init) {
>   if (init(parms, p, ext, ext->descriptor) != 0)
> 
> NOTE: This is probably not a proper fix, just a bandaid. Since
> scanning channels is mostly a one-off job, I'm happy now that I got
> my channels list and don't plan to invest more time resarching the
> issue.
> 



Re: dvb-tools: dvbv5-scan segfaults with DVB-T2 HD service that just started in Germany

2017-03-29 Thread Gregor Jasny
Hello Mauro & list,

could you please have a look at the dvbv5-scan crash report below?
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859008

Is there anything else you need to debug this?

Thanks,
Gregor

On 3/29/17 4:42 PM, Tino Mettler wrote:
> 
> $ gdb --args ./utils/dvb/dvbv5-scan ~/tmp/dvb-t2/init2 
> GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
> Copyright (C) 2016 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> .
> Find the GDB manual and other documentation resources online at:
> .
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./utils/dvb/dvbv5-scan...done.
> (gdb) run
> Starting program: /home/scorpion/build/9643/v4l-utils/utils/dvb/dvbv5-scan 
> /home/scorpion/tmp/dvb-t2/init2
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Scanning frequency #1 55400
> Lock   (0x1f) C/N= 23.75dB
> Service Das Erste HD, provider BR: reserved
> Service arte HD, provider BR: reserved
> Service PHOENIX HD, provider BR: reserved
> Service tagesschau24 HD, provider BR: reserved
> Service ONE HD, provider BR: reserved
> New transponder/channel found: #11: -1776415946
> New transponder/channel found: #12: 504706590
> New transponder/channel found: #13: 523640360
> New transponder/channel found: #14: 907948854
> New transponder/channel found: #15: -397832490
> New transponder/channel found: #16: 0
> New transponder/channel found: #17: 0
> New transponder/channel found: #18: 0
> New transponder/channel found: #19: 0
> New transponder/channel found: #20: 0
> New transponder/channel found: #21: 0
> New transponder/channel found: #22: 0
> New transponder/channel found: #23: 0
> New transponder/channel found: #24: 0
> New transponder/channel found: #25: 0
> New transponder/channel found: #26: 0
> New transponder/channel found: #27: 0
> New transponder/channel found: #28: 0
> New transponder/channel found: #29: 0
> New transponder/channel found: #30: 0
> New transponder/channel found: #31: 0
> New transponder/channel found: #32: 0
> New transponder/channel found: #33: 0
> New transponder/channel found: #34: 0
> New transponder/channel found: #35: 0
> New transponder/channel found: #36: 0
> New transponder/channel found: #37: 0
> New transponder/channel found: #38: 0
> New transponder/channel found: #39: 0
> New transponder/channel found: #40: 0
> New transponder/channel found: #41: 0
> New transponder/channel found: #42: 0
> New transponder/channel found: #43: 0
> New transponder/channel found: #44: 0
> New transponder/channel found: #45: 0
> New transponder/channel found: #46: 0
> New transponder/channel found: #47: 0
> New transponder/channel found: #48: 0
> New transponder/channel found: #49: 0
> New transponder/channel found: #50: 0
> New transponder/channel found: #51: 0
> New transponder/channel found: #52: 0
> New transponder/channel found: #53: 0
> New transponder/channel found: #54: 0
> New transponder/channel found: #55: 0
> New transponder/channel found: #56: 0
> New transponder/channel found: #57: 0
> New transponder/channel found: #58: 0
> New transponder/channel found: #59: 0
> New transponder/channel found: #60: 0
> New transponder/channel found: #61: 0
> New transponder/channel found: #62: 0
> New transponder/channel found: #63: 0
> New transponder/channel found: #64: 0
> New transponder/channel found: #65: 0
> New transponder/channel found: #66: 0
> New transponder/channel found: #67: 0
> New transponder/channel found: #68: 0
> New transponder/channel found: #69: 0
> New transponder/channel found: #70: 0
> New transponder/channel found: #71: 0
> New transponder/channel found: #72: 0
> New transponder/channel found: #73: 0
> New transponder/channel found: #74: 0
> New transponder/channel found: #75: 0
> Scanning frequency #2 65000
>(0x00) Signal= -69.00dBm
> Scanning frequency #3 73800
>(0x00) Signal= -76.00dBm
> Scanning frequency #4 57800
> Lock   (0x1f) Signal= -76.00dBm C/N= 27.25dB
> *** Error in `/home/scorpion/build/9643/v4l-utils/utils/dvb/dvbv5-scan': 
> malloc(): memory corruption: 0x557a6b70 ***
> === Backtrace: =
> /lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7759fbcb]
> /lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x775a5f96]
> /lib/x86_64-linux-gnu/libc.so.6(+0x78f69)[0x775a7f69]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_calloc+0x27b)[0x775aa99b]
> 

Re: Bug#854100: libdvbv5-0: fails to tune / scan

2017-02-10 Thread Gregor Jasny
Hello Mauro & DVB-S maintainers,

could you please have a look at the bug report below? Marcel was so kind
to bisect the problem to the following commit:

https://git.linuxtv.org/v4l-utils.git/commit/?id=d982b0d03b1f929269104bb716c9d4b50c945125

Bug report against libdvbv5 is here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854100

On 2/4/17 5:43 PM, Marcel Heinz wrote:
> Am 04.02.2017 um 15:57 schrieb Gregor Jasny:
>> Thanks for sharing! Maybe you could try to bisect to find the breaking
>> commit?
> 
> OK, I ended up with
> 
> d982b0d03b1f929269104bb716c9d4b50c945125 is the first bad commit
> commit d982b0d03b1f929269104bb716c9d4b50c945125
> Author: Mauro Carvalho Chehab <mche...@s-opensource.com>
> Date:   Tue Dec 13 16:43:28 2016 -0200
> 
> dvb-sat: change the LNBf logic to make it more generic
> 
> There are some new LNBf models with more than two frequency
> ranges. Change the logic there to allow adding those new
> LNBf types.
> 
> Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
> 
> :04 04 5c0591da94959207f4b1573a40383b8143d12278
> 34df9c19cb42119706fce20dec00d18552ddf058 M  lib
> 
> 
> This looks very related to the frequency range error I got from the kernel:
> 
>> | [42607.855196] b2c2_flexcop_pci :09:00.0: DVB: adapter 0 frontend
>> 0 frequency 12551500 out of range (95..215)
>>
>> This frequency range doesn't look like DVB-S at all...

Thanks,
Gregor

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Bug#854100: libdvbv5-0: fails to tune / scan

2017-02-04 Thread Gregor Jasny
Hello,

On 2/4/17 3:35 AM, Marcel Heinz wrote:
> After the upgrade from libdvbv5-0 1.10.1-1 to 1.12.2-2, any applications
> using libdvbv5-0 fail to work with my DVB-S card.
> 
> Output with old dvb-tools / libdvbv5-0 1.10.1-1:
> 
> |$ dvbv5-scan -l UNIVERSAL /usr/share/dvb/dvb-s/Astra-19.2e
> |Using LNBf UNIVERSAL
> |Europe
> |10800 to 11800 MHz and 11600 to 12700 MHz
> |  Dual LO, IF = lowband 9750 MHz, highband 10600 MHz
> |ERRORcommand BANDWIDTH_HZ (5) not found during retrieve
> |Cannot calc frequency shift. Either bandwidth/symbol-rate is unavailable 
> (yet).
> |Scanning frequency #1 12551500
> |Lock   (0x1f) Signal= 85,55% C/N= 99,84% postBER= 0
> | [scan runs normally from then on]
> 
> Output with new dvb-tools / libdvbv5-0 1.12.2-2:
> 
> |$ dvbv5-scan -l UNIVERSAL /usr/share/dvb/dvb-s/Astra-19.2e
> |Using LNBf UNIVERSAL
> |Europe
> |10800 to 11800 MHz and 11600 to 12700 MHz
> |  Dual LO, IF = lowband 9750 MHz, highband 10600 MHz
> |ERRORcommand BANDWIDTH_HZ (5) not found during retrieve
> |Cannot calc frequency shift. Either bandwidth/symbol-rate is unavailable 
> (yet).
> |Scanning frequency #1 12551500
> |ERRORFE_SET_PROPERTY: Invalid argument
> |ERRORdvb_fe_set_parms failed: Invalid argument
> 
> Similarily, kaffeine fails to tune to any channel, or to do a scan.
> Other applications not using libdvbv5-0 (mplayer, tvheadend) still
> work fine with the card.
> 
> DVB device is:
> 
> |$ dmesg | grep DVB
> | [8.641450] DVB: registering new adapter (FlexCop Digital TV device)
> | [8.662380] b2c2_flexcop_pci :09:00.0: DVB: registering adapter 0 
> frontend 0 (Conexant CX24123/CX24109)...
> | [8.662664] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 
> 2.8' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
> 
> -- System Information:
> Debian Release: 9.0
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)

Mauro, do you have an idea why tuning broke?

Thanks,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Time for a v4l-utils 1.12 release

2017-01-16 Thread Gregor Jasny
On 16/01/2017 11:06, Sean Young wrote:
> On Mon, Jan 16, 2017 at 09:10:36AM +0100, Gregor Jasny wrote:
>> Hello,
>>
>> I'd like to do a new v4l-utils release before the Debian freeze. Is master
>> in a releasable state? Or should I wait for some more patches to land?
> 
> This pull request is still waiting to be merged.
> 
> https://patchwork.linuxtv.org/patch/38830/

As far as I can tell this looks good. Merged.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Time for a v4l-utils 1.12 release

2017-01-16 Thread Gregor Jasny
On 16/01/2017 09:10, Gregor Jasny wrote:
> I'd like to do a new v4l-utils release before the Debian freeze. Is
> master in a releasable state? Or should I wait for some more patches to
> land?

Mauro, could you please check the pot files? It looks like they need a
re-build and translation of some strings.

Thanks,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Time for a v4l-utils 1.12 release

2017-01-16 Thread Gregor Jasny
On 16/01/2017 12:01, Arnaud Vrac wrote:
> Also, make dist is failing.

Thanks, fixed.


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Time for a v4l-utils 1.12 release

2017-01-16 Thread Gregor Jasny

Hello,

I'd like to do a new v4l-utils release before the Debian freeze. Is 
master in a releasable state? Or should I wait for some more patches to 
land?


Thanks,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [v4l-utils PATCH 2/2] Add --with-static-binaries option to link binaries statically

2016-09-26 Thread Gregor Jasny
On 19/09/2016 16:21, Mauro Carvalho Chehab wrote:
> Em Mon, 19 Sep 2016 16:22:30 +0300
> Sakari Ailus  escreveu:
> 
>> Add a new variable STATIC_LDFLAGS to add the linker flags required for
>> static linking for each binary built.
>>
>> Static and dynamic libraries are built by default but the binaries are
>> otherwise linked dynamically. --with-static-binaries requires that static
>> libraries are built.
>>
> Instead of adding STATIC_LDFLAGS to all LDFLAGS, wouldn't be better to
> add the flags to LDFLAGS on configure.ac?

I don't really like adding all those build variants into the configure
script itself. It is already way too complex and adding another
dimension does not make it better.

Why is passing --disable-shared --enable-static LDLAGS="--static
-static" to configure not sufficient?

Thanks,
Gregor

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Need help with ir-keytable imon bug report

2016-06-15 Thread Gregor Jasny
Hello,

could someone please help me triaging the following ir-keytable bug? The
reporter complains that the 'other' IR protocol results in double clicks
and we should set the device to RC6 instead:

https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1579760

This is what we have in v4l-utils:
https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/rc_keymaps/imon_pad

Thanks for you help,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [v4l-utils PATCH 1/1] Allow building static binaries

2015-12-16 Thread Gregor Jasny
Hello,

On 10/12/15 14:21, Sakari Ailus wrote:
> I discussed with Hans and he thought you'd be the best person to take a look
> at this.
> 
> The case is that I'd like to build static binaries and that doesn't seem to
> work with what's in Makefile.am for libv4l1 and libv4l2 at the moment.

Sorry for the late reply. Didi not notice this email earlier. Your patch
does not do what you'd like to achieve. Both v4l1compat and v4l2convert
are libraries which only purpose is to get preloaded by the loader. So
build them statically does not make sense. Instead they should not be
built at all. To achieve this the WITH_V4L_WRAPPERS variable should
evaluate to false. This is triggered by

AM_CONDITIONAL([WITH_V4L_WRAPPERS], [test x$enable_libv4l != xno -a
x$enable_shared != xno])

So changing

LDFLAGS="--static -static" ./configure --enable-static

to

LDFLAGS="--static -static" ./configure --enable-static --disabled-shared

should do the trick. Does this help?

Thanks,
Gregor


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Time for a v4l-utils 1.8.0 release

2015-09-14 Thread Gregor Jasny

Hello,

On 05/05/15 22:22, Mauro Carvalho Chehab wrote:

Em Tue, 05 May 2015 21:08:49 +0200
Gregor Jasny <gja...@googlemail.com> escreveu:


Hello,

It's already more than half a year since the last v4l-utils release. Do
you have any pending commits or objections? If no one vetos I'd like to
release this weekend.


There is are a additions I'd like to add to v4l-utils:

1) on DVB, ioctls may fail with -EAGAIN. Some parts of the libdvbv5 don't
handle it well. I made one quick hack for it, but didn't have time to
add a timeout to avoid an endless loop. The patch is simple. I just need
some time to do that;

2) The Media Controller control util (media-ctl) doesn't support DVB.

The patchset adding DVB support on media-ctl is ready, and I'm merging
right now, and matches what's there at Kernel version 4.1-rc1 and upper.

Yet, Laurent and Sakari want to do some changes at the Kernel API, before
setting it into a stone at Kernel v 4.1 release.

This has to happen on the next 4 weeks.

So, I suggest to postpone the release of 1.8.0 until the end of this month.


I'd like to release v4l-utils 1.8.0 during the upcoming weekend. Please 
postpone any disruptive fixes until the release has been tagged.


Thanks,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] v4l-utils: new configure options

2015-09-14 Thread Gregor Jasny

Hi,

On 03/09/15 17:23, Hans Verkuil wrote:

Gregor,

Can you take a look at this to see if I did this correctly? I'm no
autoconf hero, so before I push I'd like some feedback.

The main reason for these changes is that I need to build v4l2-ctl for
an embedded system and rather than having to hack on my side, I prefer
to add configure options that do what I (and probably others) want.


sorry for the delay. I will take a look at these patches this week.

Thanks,
Gregor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 1/4] Use off_t and off64_t instead of __off_t and __off64_t

2015-05-09 Thread Gregor Jasny
Hello,

Due to complete lack of unit / integration tests I feel uncomfortable
merging this patch without the ACK of Hans de Goede.

On 05/05/15 21:02, Felix Janda wrote:
 Since _LARGEFILE64_SOURCE is 1, these types coincide if defined.

This statement is only partially true:

$ git grep _LARGEFILE64_SOURCE
lib/libv4l1/v4l1compat.c:#define _LARGEFILE64_SOURCE 1
lib/libv4l2/v4l2convert.c:#define _LARGEFILE64_SOURCE 1

So LARGEFILE64_SOURCE will be only defined within the wrappers.
But libv4lsyscall-priv.h / SYS_MMAP is also used elsewhere.

But I wonder why SYS_MMAP is there in the first place? Maybe because in
the LD_PRELOAD case the default mmap symbol resolves to our wrapper?
But in that case can't we gently ask the loader to give us the next
symbol in the chain via dlsym(RTLD_NEXT, mmap)?

Thanks,
Gregor


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch]: v4l-utils/util/dvb add -C to manpages

2015-05-09 Thread Gregor Jasny
On 08/05/15 16:16, Vincent McIntyre wrote:
 I noticed the -C option was in the help from the -? option
 but not in the manpages.

Thanks. Applied.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] Wrap LFS64 functions only if __GLIBC__

2015-05-05 Thread Gregor Jasny
On 05/05/15 14:34, Mauro Carvalho Chehab wrote:
 Em Sun, 25 Jan 2015 21:36:36 +0100
 Felix Janda felix.ja...@posteo.de escreveu:
 -#ifdef linux
 +#ifdef __GLIBC__
 
 Hmm... linux was added here to avoid breaking on FreeBSD, on this
 changeset:
 
 So, either we should get an ack from Hans Peter, or you should
 change the tests to:
 
   #if linux  __GLIBC__

That would be needed to not break Debian/kFreeBSD which is a FreeBSD
Kernel with GNU C library.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Time for a v4l-utils 1.8.0 release

2015-05-05 Thread Gregor Jasny
Hello,

It's already more than half a year since the last v4l-utils release. Do
you have any pending commits or objections? If no one vetos I'd like to
release this weekend.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 11/11] Add a libv4l plugin for Exynos4 camera

2015-03-15 Thread Gregor Jasny
 diff --git a/lib/libv4l-exynos4-camera/Makefile.am 
 b/lib/libv4l-exynos4-camera/Makefile.am
 new file mode 100644
 index 000..23c60c6
 --- /dev/null
 +++ b/lib/libv4l-exynos4-camera/Makefile.am
 @@ -0,0 +1,7 @@
 +if WITH_V4L_PLUGINS
 +libv4l2plugin_LTLIBRARIES = libv4l-exynos4-camera.la
 +endif
 +
 +libv4l_exynos4_camera_la_SOURCES = libv4l-exynos4-camera.c 
 ../../utils/media-ctl/libmediactl.c ../../utils/media-ctl/libv4l2subdev.c 
 ../../utils/media-ctl/libv4l2media_ioctl.c ../../utils/media-ctl/mediatext.c
 +libv4l_exynos4_camera_la_CFLAGS = -fvisibility=hidden -std=gnu99

Please use $(CFLAG_VISIBILITY) instead of -fvisibility=hidden. Also c99
is default. If you don't need GNU extensions, please drop the -std=gnu99.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 11/11] Add a libv4l plugin for Exynos4 camera

2015-03-15 Thread Gregor Jasny
On 21/11/14 17:14, Jacek Anaszewski wrote:

 diff --git a/lib/Makefile.am b/lib/Makefile.am
 index 3a0e19c..56b3a9f 100644
 --- a/lib/Makefile.am
 +++ b/lib/Makefile.am
 @@ -5,7 +5,12 @@ SUBDIRS = \
   libv4l2rds \
   libv4l-mplane
  
 +if WITH_V4LUTILS
 +SUBDIRS += \
 + libv4l-exynos4-camera
 +endif

Why do you depend on WITH_V4LUTILS for a libv4l plugin? This looks
wrong. WITH_V4LUTILS is intended to only switch off the utilities in
utils (see root Makefile.am).

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l-utils stable release 1.6.2

2014-11-21 Thread Gregor Jasny
I just released v4l-utils 1.6.1 and 1.6.2 with these changes:

 v4l-utils-1.6.2
 ---
 
 Hans Verkuil (5):
   v4l2-ctl: fix sliced vbi mode parsing
   v4l2-compliance: when streaming used at least 2 buffers.
   v4l2-compliance: add initial checks for VIDIOC_QUERY_EXT_CTRL
   v4l2-ctl: add support for U32 control type.
   v4l2-ctl: fix array handling
 
 
 v4l-utils-1.6.1
 ---
 
 Gregor Jasny (5):
   man: remove duplicate backslash from NAME section
   man: Use Unicode character for ellipsis and fall back to ...
   man: add generated files to .gitignore
   v4l2-compliance: Explicitely link against rt library
   v4l2-ctl: Explicitely link against rt library
 
 Hans Verkuil (1):
   qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg.
 
 Hans de Goede (2):
   rc_keymaps: allwinner: S/KEY_HOME/KEY_HOMEPAGE/
   v4lconvert: Fix decoding of jpeg data with no vertical sub-sampling
 
 Mauro Carvalho Chehab (4):
   libdvbv5: properly represent Satellite frequencies
   README: better document the package
   ir-keytable: fix a regression introduced by fe2aa5f767eba
   rc: Update the protocol name at RC6 tables
 
 Niels Ole Salscheider (1):
   qv4l2: Fix out-of-source build

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


v4l-utils stable release 1.6.1

2014-11-20 Thread Gregor Jasny

Hello,

do you consider something from these commits as important enough for a 
bugfix release?


Thanks,
Gregor


Akihiro Tsukada (9):
  libdvbv5, dvbv5-scan: generalize channel duplication check
  libdvbv5: add as many channels as possible in scanning DVB-T2
  libdvbv5: wrong frequency in the output of satellite delsys scans
  libdvbv5: add support for ISDB-S tuning
  libdvbv5: add support for ISDB-S scanning
  libdvbv5: add COUNTRY property
  v4l-utils/libdvbv5: restore deleted functions to keep API/ABI compatible
  v4l-utils/libdvbv5: fix memory leak in dvb_guess_user_country()
  v4l-utils/libdvbv5: add gconv module for the text conversions of ISDB-S/T.

Gregor Jasny (7):
  Start v4l-utils 1.7.0 development cycle
  man: remove duplicate backslash from NAME section
  man: Use Unicode character for ellipsis and fall back to ...
  man: add generated files to .gitignore
  libdvbv5: Remove stray semicolon
  v4l2-compliance: Explicitely link against rt library
  v4l2-ctl: Explicitely link against rt library

Hans Verkuil (10):
  qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg.
  v4l2-ctl: fix sliced vbi mode parsing
  v4l2-compliance: when streaming used at least 2 buffers.
  v4l2-compliance: add initial checks for VIDIOC_QUERY_EXT_CTRL
  v4l2-ctl: add support for U32 control type.
  v4l2-ctl: fix array handling
  v4l2-compliance: allow the V4L2_IN_ST_NO_SYNC status flag.
  qv4l2: add single step support
  qv4l2: don't select alsa device for video output.
  v4l2-compliance: select(): split ret = 0 test in two

Hans de Goede (2):
  rc_keymaps: allwinner: S/KEY_HOME/KEY_HOMEPAGE/
  v4lconvert: Fix decoding of jpeg data with no vertical sub-sampling

Mauro Carvalho Chehab (41):
  libdvbv5: properly represent Satellite frequencies
  README: better document the package
  libdvbv5: Fix some Doxygen warnings at dvb-fe.h
  Doxygen: Document libdvbv5 countries.h
  configure.ac: Fix gconv compilation with 64 bits
  parse_tcpdump_log.pl: only adjust direction for control EP
  contrib: add a parser for af9035
  parse_af9035.pl: properly handle URB errors
  parse_af9035.pl: Add two other commands from ITE driver
  parse_af9035.pl: add arguments to show timestamp and debug
  parse_af9035.pl: group write/read URBs
  parse_af9035.pl: create a routine to print send/race
  parse_af9035.pl: print read/write as C lines
  parse_af9035.pl: add support for firmware commands
  parse_af9035.pl: fix firmware write size
  ir-keytable: fix a regression introduced by fe2aa5f767eba
  gen_keytables.pl: Fix a regression at RC map file generation
  rc: Update the protocol name at RC6 tables
  rc_maps.cfg: reorder entries alphabetically
  rc: sync with Kernel
  rc: copy userspace-only maps to a separate dir
  README: Add the steps needed to syncronize with the Kernel tree
  vivid-tpg.h.patch: update to match current upstream tree
  Synchronize with the Kernel
  parse_af9035.pl: proper handle when stack is not filled
  parse_af9035.pl: add support for CMD_IR_GET
  parse_af9035.pl: add options to hide part of the messages
  parse_af9035.pl: Add firmware boot message to the parser
  parse_af9035.pl: improve IR handling
  parse_af9035.pl: add support for generic I2C read/write
  parse_af9035.pl: better handle the read data
  parse_af9035.pl: allow to hide parsing errors
  parse_af9035.pl: add support for standard I2C commands
  parse_af9035.pl: some cleanups
  parse_af9035.pl: Fix decoding order at I2C read/write
  parse_af9035.pl: Fix size on rd/wr regs prints
  parse_af9035.pl: Fix some hide conditions
  parse_af9035.pl: Improve argument handling
  libdvbv5: add experimental DTMB support
  parse_tcpdump_log.pl: simplify non-control data
  parse_tcpdump_log.pl: remove some leftovers

Niels Ole Salscheider (1):
  qv4l2: Fix out-of-source build

Patrick Boettcher (4):
  parse_tcpdump_log.pl: skip filtered frames and remove them from pending
  parse_tcpdump_log.pl: show transfer-direction for non-ctrl-transfers
  parse_tcpdump_log.pl: add external frame_processor-option
  parse_tcpdump_log.pl: remove --all option which was not documented and 
not working as expected


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 6/7] v4l-utils/dvb: add COUNTRY property

2014-11-02 Thread Gregor Jasny
Hello,

Hello Coverity detected that dvb_guess_user_country introduces a
resource leak (CID 1250445).

On 31/10/14 14:13, tsk...@gmail.com wrote:
 +enum dvb_country_t dvb_guess_user_country(void)
 +{
 + char * buf, * pch, * pbuf;
 + unsigned cat;
 + enum dvb_country_t id = COUNTRY_UNKNOWN;
 +
 + for (cat = 0; cat  sizeof(cats)/sizeof(cats[0]); cat++) {
 +
 + // the returned char * should be C, POSIX or something 
 valid.
 + // If valid, we can only *guess* which format is returned.
 + // Assume here something like de_DE.iso8859-1@euro or 
 de_DE.utf-8
 + buf = secure_getenv(cats[cat]);
 + if (! buf || strlen(buf)  2)
 + continue;
 +
 + buf = strdup(buf);
 + pbuf= buf;
 +
 + if (! strncmp(buf, POSIX, MIN(strlen(buf), 5)) ||
 + ! (strncmp(buf, en, MIN(strlen(buf), 2))  
 !isalpha(buf[2])) )
 + continue;
 +
 + // assuming 'language_country.encoding@variant'
 +
 + // country after '_', if given
 + if ((pch = strchr(buf, '_')))
 + pbuf = pch + 1;
 +
 + // remove all after '@', including '@'
 + if ((pch = strchr(pbuf, '@')))
 + *pch = 0;
 +
 + // remove all after '.', including '.'
 + if ((pch = strchr(pbuf, '.')))
 + *pch = 0;
 +
 + if (strlen(pbuf) == 2)
 + id = dvb_country_a2_to_id(pbuf);
 + free(buf);
 + if (id != COUNTRY_UNKNOWN)
 + return id;
 + }
 +
 + return COUNTRY_UNKNOWN;
 +}

pbuf / buf may get leaked due to the continue statement.

Could you please post a patch?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [git:v4l-utils/master] libdvbv5, dvbv5-scan: generalize channel duplication check

2014-11-02 Thread Gregor Jasny
On 02/11/14 10:41, Mauro Carvalho Chehab wrote:
 Em Sun, 02 Nov 2014 18:30:46 +0900
 Akihiro TSUKADA tsk...@gmail.com escreveu:
 
 Hi,

 After I re-checked the source,
 I noticed that dvb_scan_add_entry() also breaks API/ABI compatibility
 as well as dvb_new_freq_is_needed(), and those functions are
 marked as ancillary functions used internally inside the library
 in dvb-scan.h.
 So I think it would rather be better to move those funcs to a private
 header (dvb-scan-priv.h?).
 Which way should we go? ver bump/compat-soname.c/dvb-scan-priv.h ?
 
 I would keep them exported. It shouldn't be hard to provide a backward
 compatible function with the same name where the extra parameter would
 be filled internally, and passed to a new function with one extra argument.

As far as I understand dvb-scan uses these functions, so they are not
that internal like intended. Providing a backward compatible function
would be the way to go.

FYI: The Ubuntu buildbot discovered the breakage:
 https://launchpad.net/~libv4l/+archive/ubuntu/development/+build/6528719/+files/buildlog_ubuntu-trusty-i386.v4l-utils_1.6.0%2Br2607-66%7Eubuntu14.04.1_FAILEDTOBUILD.txt.gz

Thanks,
-Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] v4l-utils/libdvbv5: restore deleted functions to keep API/ABI compatible

2014-11-02 Thread Gregor Jasny
On 02/11/14 13:01, tsk...@gmail.com wrote:
 From: Akihiro Tsukada tsk...@gmail.com
 
 dvb_new_freq_is_needed() was integrated to dvb_new_entry_is_needed(),
 and dvb_scan_add_entry() was added a new parameter.
 As those changes broke API/ABI compatibility,
 restore the original functions.

I suppose you introduced the new functions to generalize the API.
Can't you keep the new functions and make dvb_new_freq_is_needed a thin
wrapper around them?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4] v4l-utils/libdvbv5: add gconv module for the text conversions of ISDB-S/T.

2014-11-02 Thread Gregor Jasny
Hello,

this does not compile for me on my Debian Sid machine:

 make[3]: Entering directory '/home/gjasny/src/linuxtv/v4l-utils/lib/gconv'
 ld -o ARIB-STD-B24.so ARIB-STD-B24.o  -shared --version-script=gconv.map -z 
 combreloc -rpath=/usr/lib/gconv /usr/lib/gconv/libJIS.so 
 /usr/lib/gconv/libJISX0213.so
 ld: cannot find /usr/lib/gconv/libJIS.so: No such file or directory
 ld: cannot find /usr/lib/gconv/libJISX0213.so: No such file or directory
 Makefile:21: recipe for target 'ARIB-STD-B24.so' failed

The library is located in /usr/lib/x86_64-linux-gnu/gconv/libJIS.so.

I would really prefer if you could use the autotools toolchain
(autoconf, automake, libtool) to produce the two gconv modules. You
might be able to have a look at the v4l-plugins Makefiles in this project.

Also without using the autotools toolchain, cross compiling is broken.
Please see the INSTALL file in the root how to test.

Some ARM toolchains are not able to build shared libraries, so it would
be best to make the WITH_GCONV condition based on enable_shared, too.

In the existing Makefile I miss an install target.

Did you write the whole gconv module by yourself? Please clarify
copyright. Because libdvbv5 is useable without the gconv modules I would
move them into /contrib rather than /lib.

Are you aware of any other software that ships gconv modules? I'd like
to take a look how it got packaged for distributions.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 0/1] Libv4l: Add a plugin for the Exynos4 camera

2014-10-09 Thread Gregor Jasny
Hi,

On 08/10/14 10:46, Jacek Anaszewski wrote:
 This patch adds a plugin for the Exynos4 camera. I wanted to split
 at least the parser part to the separate module but encountered
 some problems with autotools configuration and therefore I'd like
 to ask for an instruction on how to adjust the Makefile.am files
 to achieve this.

I was the one who authored the v4l-utils build system. It looks a little
bit messy because of all the supported configurations and toolchain
capabilities.

Feel free to ask if you have any questions.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Upcoming v4l-utils 1.6.0 release

2014-10-05 Thread Gregor Jasny
Hello,

On 04/10/14 16:22, Mauro Carvalho Chehab wrote:
 Em Tue, 30 Sep 2014 18:29:26 +0200
 Hans de Goede hdego...@redhat.com escreveu:
 About the 1.6.0 release, please do not release it until the series
 fixing the regression in 1.4.0 with gstreamer which I've posted
 today. A review of that series would be appreciated. If you're ok
 with the series feel free to push it to master.

I pushed the changes to master ans built a Debian package with the
changes. The bug reported verified that it properly fixed the bug.

 From my side, I'm happy with the changes made at libdvbv5 side.
 
 I did several changes during this week:
 
 - Added user pages for the 4 dvbv5 tools;
 - Cleaned up all Valgrind errors;
 - Cleaned up a nasty double-free bug;
 - Solved all the issues pointed for it at Coverity.
 - Added the package version on all section 1 man pages. Those are now
   created during ./configure.
 
 I also did some tests here with DVB-C and ISDB-T and everything seems to
 be working fine.
 
 So, at least from dvbv5 utils and libdvbv5, I think we're ready for
 version 1.6.

I made some changes to the man pages to silence Lintian warnings and put
the release stamp on the tree.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] libdvbv5: remove service_location descriptor

2014-09-30 Thread Gregor Jasny
CC: Andre Roth neol...@gmail.com
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 TODO.libdvbv5|   1 +
 lib/include/libdvbv5/desc_service_location.h | 107 ---
 lib/libdvbv5/Makefile.am |   3 +-
 lib/libdvbv5/compat-soname.c |  36 
 lib/libdvbv5/descriptors/desc_service_location.c |  80 -
 5 files changed, 38 insertions(+), 189 deletions(-)
 delete mode 100644 lib/include/libdvbv5/desc_service_location.h
 create mode 100644 lib/libdvbv5/compat-soname.c
 delete mode 100644 lib/libdvbv5/descriptors/desc_service_location.c

diff --git a/TODO.libdvbv5 b/TODO.libdvbv5
index 21091c4..6fa294a 100644
--- a/TODO.libdvbv5
+++ b/TODO.libdvbv5
@@ -1,2 +1,3 @@
 - On next SONAME bump
   - clean up dvb_fe_open* and re-apply 9eaa2327da63fffd0dcaaa02b7641e66f881e20d
+  - remove content of compat-soname.c
\ No newline at end of file
diff --git a/lib/include/libdvbv5/desc_service_location.h 
b/lib/include/libdvbv5/desc_service_location.h
deleted file mode 100644
index ca09241..000
--- a/lib/include/libdvbv5/desc_service_location.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2013 - Andre Roth neol...@gmail.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation version 2
- * of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * Or, point your browser to 
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- *
- */
-
-/**
- * @file desc_service_location.h
- * @ingroup descriptors
- * @brief Provides the descriptors for the DVB service location
- * @copyright GNU General Public License version 2 (GPLv2)
- * @author Andre Roth
- *
- * @par Relevant specs
- * The descriptor described herein is defined at:
- *
- * @par Bug Report
- * Please submit bug reports and patches to linux-media@vger.kernel.org
- *
- * @todo DOES THIS DESCRIPTOR EXISTS? IF SO, WHERE?
- *
- * FIXME: this seems to be a duplicated copy of the ATSC service location.
- */
-
-#ifndef _SERVICE_LOCATION_H
-#define _SERVICE_LOCATION_H
-
-#include libdvbv5/descriptors.h
-
-/**
- * @struct dvb_desc_service_location_element
- * @ingroup descriptors
- * @brief
- *
- * @param stream_type  stream type
- * @param elementary_pid   elementary pid
- * @param language language
- */
-struct dvb_desc_service_location_element {
-   uint8_t stream_type;
-   union {
-   uint16_t bitfield;
-   struct {
-   uint16_t elementary_pid:13;
-   uint16_t reserved:3;
-   } __attribute__((packed));
-   } __attribute__((packed));
-   uint8_t language[4];
-} __attribute__((packed));
-
-/**
- * @struct dvb_desc_service_location
- * @ingroup descriptors
- * @brief
- *
- * @param type type
- * @param length   length
- * @param next pointer to struct dvb_desc
- * @param pcr_pid  pcr pid
- * @param elements elements
- * @param element  pointer to struct dvb_desc_service_location_element
- */
-struct dvb_desc_service_location {
-   uint8_t type;
-   uint8_t length;
-   struct dvb_desc *next;
-
-   union {
-   uint16_t bitfield;
-   struct {
-   uint16_t pcr_pid:13;
-   uint16_t reserved:3;
-   } __attribute__((packed));
-   } __attribute__((packed));
-   uint8_t elements;
-   struct dvb_desc_service_location_element *element;
-} __attribute__((packed));
-
-struct dvb_v5_fe_parms;
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-int dvb_desc_service_location_init (struct dvb_v5_fe_parms *parms, const 
uint8_t *buf, struct dvb_desc *desc);
-void dvb_desc_service_location_print(struct dvb_v5_fe_parms *parms, const 
struct dvb_desc *desc);
-void dvb_desc_service_location_free (struct dvb_desc *desc);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/libdvbv5/Makefile.am b/lib/libdvbv5/Makefile.am
index fd21236..037c153 100644
--- a/lib/libdvbv5/Makefile.am
+++ b/lib/libdvbv5/Makefile.am
@@ -34,7 +34,6 @@ otherinclude_HEADERS = \
../include/libdvbv5/desc_logical_channel.h \
../include/libdvbv5/desc_ts_info.h \
../include/libdvbv5/desc_partial_reception.h \
-   ../include/libdvbv5/desc_service_location.h \
../include/libdvbv5/desc_ca.h \
../include/libdvbv5/desc_ca_identifier.h \
../include/libdvbv5/nit.h \
@@ -56,6 +55,7

[PATCH 1/3] libdvbv5: Add todo file

2014-09-30 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 TODO.libdvbv5 | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 TODO.libdvbv5

diff --git a/TODO.libdvbv5 b/TODO.libdvbv5
new file mode 100644
index 000..21091c4
--- /dev/null
+++ b/TODO.libdvbv5
@@ -0,0 +1,2 @@
+- On next SONAME bump
+  - clean up dvb_fe_open* and re-apply 9eaa2327da63fffd0dcaaa02b7641e66f881e20d
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] libdvbv5: remove service_list descriptor

2014-09-30 Thread Gregor Jasny
CC: Andre Roth neol...@gmail.com
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 doxygen_libdvbv5.cfg |   1 -
 lib/include/libdvbv5/desc_service_list.h | 119 ---
 lib/libdvbv5/Makefile.am |   2 -
 lib/libdvbv5/compat-soname.c |   8 ++
 lib/libdvbv5/descriptors.c   |   8 --
 lib/libdvbv5/descriptors/desc_service_list.c |  56 -
 6 files changed, 8 insertions(+), 186 deletions(-)
 delete mode 100644 lib/include/libdvbv5/desc_service_list.h
 delete mode 100644 lib/libdvbv5/descriptors/desc_service_list.c

diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index 0c3c24e..21c3626 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -783,7 +783,6 @@ INPUT  = $(SRCDIR)/doc/libdvbv5-index.doc \
 
$(SRCDIR)/lib/include/libdvbv5/desc_partial_reception.h \
 $(SRCDIR)/lib/include/libdvbv5/desc_sat.h \
 $(SRCDIR)/lib/include/libdvbv5/desc_service.h \
-$(SRCDIR)/lib/include/libdvbv5/desc_service_list.h \
 $(SRCDIR)/lib/include/libdvbv5/desc_t2_delivery.h \
 
$(SRCDIR)/lib/include/libdvbv5/desc_terrestrial_delivery.h \
 $(SRCDIR)/lib/include/libdvbv5/desc_ts_info.h \
diff --git a/lib/include/libdvbv5/desc_service_list.h 
b/lib/include/libdvbv5/desc_service_list.h
deleted file mode 100644
index dfcb596..000
--- a/lib/include/libdvbv5/desc_service_list.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2012 - Andre Roth neol...@gmail.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation version 2
- * of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * Or, point your browser to 
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- *
- */
-
-/**
- * @file desc_service_list.h
- * @ingroup descriptors
- * @brief Provides the descriptors for the service list descriptor
- * @copyright GNU General Public License version 2 (GPLv2)
- * @author Andre Roth
- *
- * @par Relevant specs
- * The descriptor described herein is defined at:
- * - ETSI EN 300 468 V1.11.1
- *
- * @par Bug Report
- * Please submit bug reports and patches to linux-media@vger.kernel.org
- *
- * @todo Properly implement a parser for this descriptor. However, this
- *  will break the API.
- */
-
-#ifndef _DESC_SERVICE_LIST_H
-#define _DESC_SERVICE_LIST_H
-
-#include libdvbv5/descriptors.h
-
-/**
- * @struct dvb_desc_service_list_table
- * @ingroup descriptors
- * @brief Structure containing the service list table
- *
- * @param service_id   service id
- * @param service_type service type
- */
-struct dvb_desc_service_list_table {
-   uint16_t service_id;
-   uint8_t service_type;
-} __attribute__((packed));
-
-/**
- * @struct dvb_desc_service_list
- * @ingroup descriptors
- * @brief Structure containing the service list descriptor
- *
- * @param type descriptor tag
- * @param length   descriptor length
- * @param next pointer to struct dvb_desc
- *
- * @bug Currently, the service list is not properly parsed, as the
- * struct dvb_desc_service_list_table pointer is commented.
- */
-struct dvb_desc_service_list {
-   uint8_t type;
-   uint8_t length;
-   struct dvb_desc *next;
-
-   /* FIXME */
-   /* struct dvb_desc_service_list_table services[]; */
-} __attribute__((packed));
-
-struct dvb_v5_fe_parms;
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-/**
- * @brief Initializes and parses the service list descriptor
- * @ingroup descriptors
- *
- * @param parmsstruct dvb_v5_fe_parms pointer to the opened device
- * @param buf  buffer containing the descriptor's raw data
- * @param desc pointer to struct dvb_desc to be allocated and filled
- *
- * This function initializes and makes sure that all fields will follow the CPU
- * endianness. Due to that, the content of the buffer may change.
- *
- * Currently, no memory is allocated internally.
- *
- * @return On success, it returns the size of the allocated struct.
- *A negative value indicates an error.
- */
-int dvb_desc_service_list_init(struct dvb_v5_fe_parms *parms,
-  const uint8_t *buf, struct dvb_desc *desc);
-
-/**
- * @brief Prints the content of the service list descriptor
- * @ingroup descriptors

[PATCH 0/3] libdvbv5: Remove broken descriptor parsers

2014-09-30 Thread Gregor Jasny
Hello,

this patch series removes the service_list and service_location
descriptors. It breaks API compatibility by removing the public
header files but maintains ABI compatibility by providing stub
implementations.

Thanks,
Gregor

Gregor Jasny (3):
  libdvbv5: Add todo file
  libdvbv5: remove service_location descriptor
  libdvbv5: remove service_list descriptor

 TODO.libdvbv5|   3 +
 doxygen_libdvbv5.cfg |   1 -
 lib/include/libdvbv5/desc_service_list.h | 119 ---
 lib/include/libdvbv5/desc_service_location.h | 107 
 lib/libdvbv5/Makefile.am |   5 +-
 lib/libdvbv5/compat-soname.c |  44 +
 lib/libdvbv5/descriptors.c   |   8 --
 lib/libdvbv5/descriptors/desc_service_list.c |  56 ---
 lib/libdvbv5/descriptors/desc_service_location.c |  80 ---
 9 files changed, 48 insertions(+), 375 deletions(-)
 create mode 100644 TODO.libdvbv5
 delete mode 100644 lib/include/libdvbv5/desc_service_list.h
 delete mode 100644 lib/include/libdvbv5/desc_service_location.h
 create mode 100644 lib/libdvbv5/compat-soname.c
 delete mode 100644 lib/libdvbv5/descriptors/desc_service_list.c
 delete mode 100644 lib/libdvbv5/descriptors/desc_service_location.c

-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Upcoming v4l-utils 1.6.0 release

2014-09-30 Thread Gregor Jasny
Hello,

On 27/09/14 13:54, Mauro Carvalho Chehab wrote:
 Em Sat, 27 Sep 2014 12:57:11 +0200
 Gregor Jasny gja...@googlemail.com escreveu:
 As far as I understand the service_location feature should work but is
 an extension to the standard. Does it harm if we keep it until we have
 something better in place to handle extensions?

 The service list descriptor feature is unimplemented (and thus broken).
 Would it help if we return -1 from dvb_desc_service_list_init to reflect
 that fact or does it break something else? But I'd keep the symbol in
 the library to maintain ABI compatibility.

 I would actually prefer if we could get rid of those two broken
 descriptors on some release, and to re-add them only when they're
 actually working.

I have sent a patch series to remove the public headers of this two
descriptors and provide stubs to maintain SONAME compatibility.

Could you please ACK it?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Upcoming v4l-utils 1.6.0 release

2014-09-27 Thread Gregor Jasny
Hello,

Mauro was very busy adding Doxygen documentation to libdvbv5. Instead of
cherry picking the (many) individual commits I'd like to release master
as 1.6.0.

Has anyone uncommited pending work? If not I'd like to release on Monday
(29th).

About the DVB API/ABI incompatibility discussed below:

As far as I understand the service_location feature should work but is
an extension to the standard. Does it harm if we keep it until we have
something better in place to handle extensions?

The service list descriptor feature is unimplemented (and thus broken).
Would it help if we return -1 from dvb_desc_service_list_init to reflect
that fact or does it break something else? But I'd keep the symbol in
the library to maintain ABI compatibility.

Is there a reason to expose the individual descriptor functions to the
public API? Aren't dvb_descriptors table and its users enough?

Thanks,
Gregor

On 26/09/14 02:38, Mauro Carvalho Chehab wrote:
 Hi Gregor,
 
 I'm done with the libdvbv5 API documentation. There are two issues there that
 we should be fixing on a next release:
 1) one descriptor should likely be removed.
It is the one contained at lib/libdvbv5/include/desc_service_location.h
 
 It is not used anywhere at the code (nor on userspace). I suspect that this
 is wrong, because I was unable to find any documentation about that. It
 looks very similar to an ATSC descriptor. I suspect that this is just
 duplicated (yet, see the comments below).
 
 2) one descriptor should have a table fixed or be removed.
it is at lib/libdvbv5/include/desc_service_list.h.
 
 This one have the parsing code commented. This is not that bad, if the
 data structure field needed to store its content weren't also commented.
 
 Either removing or fixing will break the API/ABI.
 
 I opted to not add those descriptors at the doxygen documentation. Just
 added the javadoc tags inside their code, with a @bug there.
 
 So, I think we should try to release 1.4.1 with those changes.
 
 Please notice that I also added one extra feature at dma-fe-tool: it
 now replaces femon (with is something that people that use to work with
 the legacy dvb-apps generally request).
 
 Ah, btw if you know who maintains the dtv-scan-tables package on Debian,
 it could be worth to ask him to rebase the package to use the new format.
 The tables there were fully converted to DVBv5 format, and a Makefile
 target was added to generate the tables with the old format.
 
 Regards,
 Mauro
 
 
 Forwarded message:
 
 Date: Mon, 22 Sep 2014 23:08:35 +0200
 From: André Roth neol...@gmail.com
 To: Mauro Carvalho Chehab mche...@osg.samsung.com
 Subject: Re: Troubles with two descriptor parsers
 
 
 On Mon, 22 Sep 2014 13:39:06 -0300
 Mauro Carvalho Chehab mche...@osg.samsung.com wrote:
 
 Hi André,

 I finished to add documentation for the library. There are, however, two
 issues:

 1) I was unable to discover what's this:
  
 http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=dbb24d3a680dc66496e410cb1cab56ef375f1982

 There is a descriptor like that for ATSC, but didn't find it for DVB.
 Also, this is not used at descriptors.c.
 
 this is used as a user extension (0xa1) in DVB-T here. a friend
 implemented it, I need to ask where he got the specs from. It holds GPS
 coordinates of the sending station. not sure whether libdvbv5 should
 implement user extensions as they could vary. 
 we should maybe have an interface for extending the descriptor table ...
  
 Is this some left-over?
 
 kinda, I had planned to implement it in tvd, and maybe show a map with
 the antenna.
 
 2) This is broken:
  
 http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=7ce5581c7504ff03425666e106d198de3475d0e9

 As the descriptor parser is commented. Why? We can only fix that for a
 newer version.
 
 same story I guess. the service list descriptor (0x41) is in the iso
 standard and is maybe used in conjunction with 0xa1.
 
 I suggest to fix that in the newer version. Please tell me when a newer
 version is planned, so I can reserve some time for that.
 
 Sorry for the inconvenience,
  André
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] libdvbv5: Remove dvbsat_polarization_name (same as dvb_sat_pol_name)

2014-08-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/include/libdvbv5/dvb-sat.h | 2 --
 lib/libdvbv5/dvb-sat.c | 7 ---
 2 files changed, 9 deletions(-)

diff --git a/lib/include/libdvbv5/dvb-sat.h b/lib/include/libdvbv5/dvb-sat.h
index a414448..f14e7e4 100644
--- a/lib/include/libdvbv5/dvb-sat.h
+++ b/lib/include/libdvbv5/dvb-sat.h
@@ -37,8 +37,6 @@ struct dvb_sat_lnb {
 
 struct dvb_v5_fe_parms;
 
-extern const char *dvbsat_polarization_name[5];
-
 #ifdef __cplusplus
 extern C {
 #endif
diff --git a/lib/libdvbv5/dvb-sat.c b/lib/libdvbv5/dvb-sat.c
index 795524a..d0a6076 100644
--- a/lib/libdvbv5/dvb-sat.c
+++ b/lib/libdvbv5/dvb-sat.c
@@ -405,10 +405,3 @@ ret:
return rc;
 }
 
-const char *dvbsat_polarization_name[5] = {
-   OFF,
-   H,
-   V,
-   L,
-   R,
-};
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/5] Further clean up libdvbv5

2014-08-23 Thread Gregor Jasny
Hello,

Here you'll find some patches to clean up libdvbv5. I tried to
reduce exported symbols of the shared library to easy
maintenance in the future.

Thanks,
Gregor

Gregor Jasny (5):
  libdvbv5: Remove dvbsat_polarization_name (same as dvb_sat_pol_name)
  libdvbv5: Rename and hide charset definitions
  libdvbv5: Hide unused and unexposed cnr_to_qual_s tables
  libdvbv5: Make dvb_xxx_charset const strings
  libdvbv5: Make dummy_fe static

 lib/include/libdvbv5/descriptors.h |  2 --
 lib/include/libdvbv5/dvb-sat.h |  2 --
 lib/libdvbv5/descriptors.c |  3 ---
 lib/libdvbv5/descriptors/desc_event_extended.c |  2 +-
 lib/libdvbv5/descriptors/desc_event_short.c|  4 ++--
 lib/libdvbv5/descriptors/desc_network_name.c   |  2 +-
 lib/libdvbv5/descriptors/desc_service.c|  4 ++--
 lib/libdvbv5/descriptors/desc_ts_info.c|  2 +-
 lib/libdvbv5/dvb-fe.c  |  6 +++---
 lib/libdvbv5/dvb-sat.c |  7 ---
 lib/libdvbv5/parse_string.c| 12 
 lib/libdvbv5/parse_string.h|  7 +--
 lib/libdvbv5/tables/vct.c  |  2 +-
 13 files changed, 24 insertions(+), 31 deletions(-)

-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] libdvbv5: Make dvb_xxx_charset const strings

2014-08-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/libdvbv5/parse_string.c | 13 +++--
 lib/libdvbv5/parse_string.h |  8 
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/libdvbv5/parse_string.c b/lib/libdvbv5/parse_string.c
index db47c3a..081b2f8 100644
--- a/lib/libdvbv5/parse_string.c
+++ b/lib/libdvbv5/parse_string.c
@@ -35,8 +35,8 @@
 
 #define CS_OPTIONS //TRANSLIT
 
-char *dvb_default_charset = iso-8859-1;
-char *dvb_output_charset = utf-8;
+const char *dvb_default_charset = iso-8859-1;
+const char *dvb_output_charset = utf-8;
 
 struct charset_conv {
unsigned len;
@@ -308,7 +308,7 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
  size_t destlen,
  const unsigned char *src,
  size_t len,
- char *type, char *output_charset)
+ const char *type, const char *output_charset)
 {
char out_cs[strlen(output_charset) + 1 + sizeof(CS_OPTIONS)];
char *p = dest;
@@ -331,7 +331,7 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
 
 static void charset_conversion(struct dvb_v5_fe_parms *parms, char **dest, 
const unsigned char *s,
   size_t len,
-  char *type, char *output_charset)
+  const char *type, const char *output_charset)
 {
size_t destlen = len * 3;
int need_conversion = 1;
@@ -371,10 +371,11 @@ static void charset_conversion(struct dvb_v5_fe_parms 
*parms, char **dest, const
 
 void parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph,
  const unsigned char *src, size_t len,
- char *default_charset, char *output_charset)
+ const char *default_charset, const char *output_charset)
 {
size_t destlen, i, len2 = 0;
-   char *p, *p2, *type = default_charset;
+   char *p, *p2;
+   const char *type = default_charset;
unsigned char *tmp1 = NULL, *tmp2 = NULL;
const unsigned char *s;
int emphasis = 0;
diff --git a/lib/libdvbv5/parse_string.h b/lib/libdvbv5/parse_string.h
index e269ff3..48ae6ec 100644
--- a/lib/libdvbv5/parse_string.h
+++ b/lib/libdvbv5/parse_string.h
@@ -28,14 +28,14 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
  size_t destlen,
  const unsigned char *src,
  size_t len,
- char *type, char *output_charset);
+ const char *type, const char *output_charset);
 
 void parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph,
  const unsigned char *src, size_t len,
- char *default_charset, char *output_charset);
+ const char *default_charset, const char *output_charset);
 
-extern char *dvb_default_charset;
-extern char *dvb_output_charset;
+extern const char *dvb_default_charset;
+extern const char *dvb_output_charset;
 
 #if HAVE_VISIBILITY
 #pragma GCC visibility pop
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/5] libdvbv5: Hide unused and unexposed cnr_to_qual_s tables

2014-08-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/libdvbv5/dvb-fe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index 013edd6..6471f68 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -944,7 +944,7 @@ struct cnr_to_qual_s dvb_s2_cnr_2_qual[] = {
  * Minimum values from ARIB STD-B21 for DVB_QUAL_OK.
  * As ARIB doesn't define a max value, assume +2dB for DVB_QUAL_GOOD
  */
-struct cnr_to_qual_s isdb_t_cnr_2_qual[] = {
+static struct cnr_to_qual_s isdb_t_cnr_2_qual[] = {
{  DQPSK, FEC_1_2,  6.2,  8.2},
{  DQPSK, FEC_2_3,  7.7,  9.7},
{  DQPSK, FEC_3_4,  8.7, 10.7},
@@ -974,7 +974,7 @@ struct cnr_to_qual_s isdb_t_cnr_2_qual[] = {
  * Values obtained from table A.1 of ETSI EN 300 744 v1.6.1
  * OK corresponds to Ricean fading; Good to Rayleigh fading
  */
-struct cnr_to_qual_s dvb_t_cnr_2_qual[] = {
+static struct cnr_to_qual_s dvb_t_cnr_2_qual[] = {
{   QPSK, FEC_1_2,  4.1,  5.9},
{   QPSK, FEC_2_3,  6.1,  9.6},
{   QPSK, FEC_3_4,  7.2, 12.4},
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] libdvbv5: Make dummy_fe static

2014-08-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/libdvbv5/dvb-fe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index 6471f68..c260674 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -35,7 +35,7 @@ static void dvb_v5_free(struct dvb_v5_fe_parms *parms)
free(parms);
 }
 
-struct dvb_v5_fe_parms dummy_fe;
+static struct dvb_v5_fe_parms dummy_fe;
 struct dvb_v5_fe_parms *dvb_fe_dummy()
 {
dummy_fe.logfunc = dvb_default_log;
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] libdvbv5: Rename and hide charset definitions

2014-08-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/include/libdvbv5/descriptors.h | 2 --
 lib/libdvbv5/descriptors.c | 3 ---
 lib/libdvbv5/descriptors/desc_event_extended.c | 2 +-
 lib/libdvbv5/descriptors/desc_event_short.c| 4 ++--
 lib/libdvbv5/descriptors/desc_network_name.c   | 2 +-
 lib/libdvbv5/descriptors/desc_service.c| 4 ++--
 lib/libdvbv5/descriptors/desc_ts_info.c| 2 +-
 lib/libdvbv5/parse_string.c| 3 +++
 lib/libdvbv5/parse_string.h| 3 +++
 lib/libdvbv5/tables/vct.c  | 2 +-
 10 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/lib/include/libdvbv5/descriptors.h 
b/lib/include/libdvbv5/descriptors.h
index 88b8ad2..47738d8 100644
--- a/lib/include/libdvbv5/descriptors.h
+++ b/lib/include/libdvbv5/descriptors.h
@@ -38,8 +38,6 @@ struct dvb_v5_fe_parms;
 typedef void (*dvb_table_init_func)(struct dvb_v5_fe_parms *parms, const 
uint8_t *buf, ssize_t buflen, void **table);
 
 extern const dvb_table_init_func dvb_table_initializers[256];
-extern char *default_charset;
-extern char *output_charset;
 
 #define bswap16(b) do {\
b = ntohs(b); \
diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c
index 5f61332..8e7ebb1 100644
--- a/lib/libdvbv5/descriptors.c
+++ b/lib/libdvbv5/descriptors.c
@@ -96,9 +96,6 @@ const dvb_table_init_func dvb_table_initializers[256] = {
[ATSC_TABLE_CVCT]= TABLE_INIT(atsc_table_vct),
 };
 
-char *default_charset = iso-8859-1;
-char *output_charset = utf-8;
-
 int dvb_desc_parse(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
   uint16_t buflen, struct dvb_desc **head_desc)
 {
diff --git a/lib/libdvbv5/descriptors/desc_event_extended.c 
b/lib/libdvbv5/descriptors/desc_event_extended.c
index 6af38f2..71e747a 100644
--- a/lib/libdvbv5/descriptors/desc_event_extended.c
+++ b/lib/libdvbv5/descriptors/desc_event_extended.c
@@ -59,7 +59,7 @@ int dvb_desc_event_extended_init(struct dvb_v5_fe_parms 
*parms, const uint8_t *b
len = *buf;
len1 = len;
buf++;
-   parse_string(parms, event-text, event-text_emph, buf, len1, 
default_charset, output_charset);
+   parse_string(parms, event-text, event-text_emph, buf, len1, 
dvb_default_charset, dvb_output_charset);
buf += len;
return 0;
 }
diff --git a/lib/libdvbv5/descriptors/desc_event_short.c 
b/lib/libdvbv5/descriptors/desc_event_short.c
index adb38fe..9b19269 100644
--- a/lib/libdvbv5/descriptors/desc_event_short.c
+++ b/lib/libdvbv5/descriptors/desc_event_short.c
@@ -42,7 +42,7 @@ int dvb_desc_event_short_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf,
len = buf[0];
buf++;
len1 = len;
-   parse_string(parms, event-name, event-name_emph, buf, len1, 
default_charset, output_charset);
+   parse_string(parms, event-name, event-name_emph, buf, len1, 
dvb_default_charset, dvb_output_charset);
buf += len;
 
event-text = NULL;
@@ -50,7 +50,7 @@ int dvb_desc_event_short_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf,
len = buf[0];
len2 = len;
buf++;
-   parse_string(parms, event-text, event-text_emph, buf, len2, 
default_charset, output_charset);
+   parse_string(parms, event-text, event-text_emph, buf, len2, 
dvb_default_charset, dvb_output_charset);
buf += len;
return 0;
 }
diff --git a/lib/libdvbv5/descriptors/desc_network_name.c 
b/lib/libdvbv5/descriptors/desc_network_name.c
index a34a27f..17cdbd4 100644
--- a/lib/libdvbv5/descriptors/desc_network_name.c
+++ b/lib/libdvbv5/descriptors/desc_network_name.c
@@ -33,7 +33,7 @@ int dvb_desc_network_name_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf
len1 = len;
net-network_name = NULL;
net-network_name_emph = NULL;
-   parse_string(parms, net-network_name, net-network_name_emph, buf, 
len1, default_charset, output_charset);
+   parse_string(parms, net-network_name, net-network_name_emph, buf, 
len1, dvb_default_charset, dvb_output_charset);
buf += len;
return 0;
 }
diff --git a/lib/libdvbv5/descriptors/desc_service.c 
b/lib/libdvbv5/descriptors/desc_service.c
index 069317a..6858c32 100644
--- a/lib/libdvbv5/descriptors/desc_service.c
+++ b/lib/libdvbv5/descriptors/desc_service.c
@@ -37,7 +37,7 @@ int dvb_desc_service_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf, str
len = buf[0];
buf++;
len1 = len;
-   parse_string(parms, service-provider, service-provider_emph, buf, 
len1, default_charset, output_charset);
+   parse_string(parms, service-provider, service-provider_emph, buf, 
len1, dvb_default_charset, dvb_output_charset);
buf += len;
 
service-name = NULL;
@@ -45,7 +45,7 @@ int dvb_desc_service_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf, str
len = buf[0];
len2 = len;
buf

[PATCH 1/2] Hide parse_string.h content in shared library interface

2014-06-22 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/libdvbv5/parse_string.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/lib/libdvbv5/parse_string.h b/lib/libdvbv5/parse_string.h
index 61d0ed4..39f7dc4 100644
--- a/lib/libdvbv5/parse_string.h
+++ b/lib/libdvbv5/parse_string.h
@@ -17,6 +17,10 @@
  * Or, point your browser to 
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  */
 
+#if HAVE_VISIBILITY
+#pragma GCC visibility push(hidden)
+#endif
+
 struct dvb_v5_fe_parms;
 
 void iconv_to_charset(struct dvb_v5_fe_parms *parms,
@@ -29,3 +33,7 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
 void parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph,
  const unsigned char *src, size_t len,
  char *default_charset, char *output_charset);
+
+#if HAVE_VISIBILITY
+#pragma GCC visibility pop
+#endif
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] Clean up public libdvbv5 interface

2014-06-22 Thread Gregor Jasny
Hi,

If we want to enable libdvbv5 from v4l-utils by default its
exported interface should be as clean as possible.

This series prefixes all functions with _dvb. I omitted
symbols starting with atsc and isdb.

Thanks,
Gregor

Gregor Jasny (2):
  Hide parse_string.h content in shared library interface
  Prefix exported functions with dvb_

 lib/include/libdvbv5/crc32.h   |   2 +-
 lib/include/libdvbv5/desc_extension.h  |   8 +-
 lib/include/libdvbv5/descriptors.h |   4 +-
 lib/include/libdvbv5/dvb-demux.h   |   2 +-
 lib/include/libdvbv5/dvb-file.h|  38 +++---
 lib/include/libdvbv5/dvb-sat.h |   4 +-
 lib/include/libdvbv5/dvb-scan.h|   6 +-
 lib/include/libdvbv5/nit.h |   3 +-
 lib/libdvbv5/crc32.c   |   2 +-
 lib/libdvbv5/descriptors.c |  16 +--
 lib/libdvbv5/descriptors/desc_ca.c |   4 +-
 lib/libdvbv5/descriptors/desc_cable_delivery.c |   4 +-
 lib/libdvbv5/descriptors/desc_event_extended.c |   2 +-
 lib/libdvbv5/descriptors/desc_event_short.c|   2 +-
 lib/libdvbv5/descriptors/desc_extension.c  |  10 +-
 lib/libdvbv5/descriptors/desc_sat.c|   6 +-
 lib/libdvbv5/dvb-demux.c   |   2 +-
 lib/libdvbv5/dvb-file.c|  80 ++--
 lib/libdvbv5/dvb-sat.c |   6 +-
 lib/libdvbv5/dvb-scan.c| 163 +
 lib/libdvbv5/parse_string.h|   8 ++
 lib/libdvbv5/tables/eit.c  |  12 +-
 lib/libdvbv5/tables/nit.c  |   3 +-
 utils/dvb/dvb-fe-tool.c|   2 +-
 utils/dvb/dvb-format-convert.c |  10 +-
 utils/dvb/dvbv5-scan.c |  24 ++--
 utils/dvb/dvbv5-zap.c  |  12 +-
 27 files changed, 224 insertions(+), 211 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] Prefix exported functions with dvb_

2014-06-22 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/include/libdvbv5/crc32.h   |   2 +-
 lib/include/libdvbv5/desc_extension.h  |   8 +-
 lib/include/libdvbv5/descriptors.h |   4 +-
 lib/include/libdvbv5/dvb-demux.h   |   2 +-
 lib/include/libdvbv5/dvb-file.h|  38 +++---
 lib/include/libdvbv5/dvb-sat.h |   4 +-
 lib/include/libdvbv5/dvb-scan.h|   6 +-
 lib/include/libdvbv5/nit.h |   3 +-
 lib/libdvbv5/crc32.c   |   2 +-
 lib/libdvbv5/descriptors.c |  16 +--
 lib/libdvbv5/descriptors/desc_ca.c |   4 +-
 lib/libdvbv5/descriptors/desc_cable_delivery.c |   4 +-
 lib/libdvbv5/descriptors/desc_event_extended.c |   2 +-
 lib/libdvbv5/descriptors/desc_event_short.c|   2 +-
 lib/libdvbv5/descriptors/desc_extension.c  |  10 +-
 lib/libdvbv5/descriptors/desc_sat.c|   6 +-
 lib/libdvbv5/dvb-demux.c   |   2 +-
 lib/libdvbv5/dvb-file.c|  80 ++--
 lib/libdvbv5/dvb-sat.c |   6 +-
 lib/libdvbv5/dvb-scan.c| 163 +
 lib/libdvbv5/tables/eit.c  |  12 +-
 lib/libdvbv5/tables/nit.c  |   3 +-
 utils/dvb/dvb-fe-tool.c|   2 +-
 utils/dvb/dvb-format-convert.c |  10 +-
 utils/dvb/dvbv5-scan.c |  24 ++--
 utils/dvb/dvbv5-zap.c  |  12 +-
 26 files changed, 216 insertions(+), 211 deletions(-)

diff --git a/lib/include/libdvbv5/crc32.h b/lib/include/libdvbv5/crc32.h
index d1968e8..c886862 100644
--- a/lib/include/libdvbv5/crc32.h
+++ b/lib/include/libdvbv5/crc32.h
@@ -25,7 +25,7 @@
 #include stdint.h
 #include unistd.h /* size_t */
 
-uint32_t crc32(uint8_t *data, size_t datalen, uint32_t crc);
+uint32_t dvb_crc32(uint8_t *data, size_t datalen, uint32_t crc);
 
 #endif
 
diff --git a/lib/include/libdvbv5/desc_extension.h 
b/lib/include/libdvbv5/desc_extension.h
index 8b2606a..dcf267a 100644
--- a/lib/include/libdvbv5/desc_extension.h
+++ b/lib/include/libdvbv5/desc_extension.h
@@ -71,10 +71,10 @@ struct dvb_ext_descriptor {
 extern C {
 #endif
 
-int extension_descriptor_init (struct dvb_v5_fe_parms *parms, const uint8_t 
*buf, struct dvb_desc *desc);
-void extension_descriptor_free(struct dvb_desc *descriptor);
-void extension_descriptor_print(struct dvb_v5_fe_parms *parms,
-   const struct dvb_desc *desc);
+int dvb_extension_descriptor_init(struct dvb_v5_fe_parms *parms, const uint8_t 
*buf, struct dvb_desc *desc);
+void dvb_extension_descriptor_free(struct dvb_desc *descriptor);
+void dvb_extension_descriptor_print(struct dvb_v5_fe_parms *parms,
+   const struct dvb_desc *desc);
 
 #ifdef __cplusplus
 }
diff --git a/lib/include/libdvbv5/descriptors.h 
b/lib/include/libdvbv5/descriptors.h
index 94d85a9..de2c39b 100644
--- a/lib/include/libdvbv5/descriptors.h
+++ b/lib/include/libdvbv5/descriptors.h
@@ -72,9 +72,9 @@ struct dvb_desc {
 extern C {
 #endif
 
-uint32_t bcd(uint32_t bcd);
+uint32_t dvb_bcd(uint32_t bcd);
 
-void hexdump(struct dvb_v5_fe_parms *parms, const char *prefix, const unsigned 
char *buf, int len);
+void dvb_hexdump(struct dvb_v5_fe_parms *parms, const char *prefix, const 
unsigned char *buf, int len);
 
 int  dvb_desc_parse(struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
uint16_t section_length, struct dvb_desc **head_desc);
 void dvb_desc_free (struct dvb_desc **list);
diff --git a/lib/include/libdvbv5/dvb-demux.h b/lib/include/libdvbv5/dvb-demux.h
index fc3df0b..8ab78a2 100644
--- a/lib/include/libdvbv5/dvb-demux.h
+++ b/lib/include/libdvbv5/dvb-demux.h
@@ -48,7 +48,7 @@ int dvb_set_section_filter(int dmxfd, int pid, unsigned 
filtsize,
   unsigned char *mode,
   unsigned int flags);
 
-int get_pmt_pid(const char *dmxdev, int sid);
+int dvb_get_pmt_pid(const char *dmxdev, int sid);
 
 #ifdef __cplusplus
 }
diff --git a/lib/include/libdvbv5/dvb-file.h b/lib/include/libdvbv5/dvb-file.h
index 51b53cd..38ac3c1 100644
--- a/lib/include/libdvbv5/dvb-file.h
+++ b/lib/include/libdvbv5/dvb-file.h
@@ -121,38 +121,36 @@ extern const struct parse_file channel_file_format;
 extern const struct parse_file channel_file_zap_format;
 
 /* From dvb-file.c */
-struct dvb_file *parse_format_oneline(const char *fname,
- uint32_t delsys,
- const struct parse_file *parse_file);
-int write_format_oneline(const char *fname,
-struct dvb_file *dvb_file,
-uint32_t delsys,
-const struct parse_file *parse_file);
+struct dvb_file *dvb_parse_format_oneline(const char *fname,
+ uint32_t delsys

Time for v4l-utils 1.2 release?

2014-06-20 Thread Gregor Jasny
Hello,

It's been 11 months since the 1.0.0 release. What do you think about
releasing HEAD? Do you have any pending commits?

Mauro, you tried to re-license the DVB library. What's the status there?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to tell libv4l2 which src_fmt should be prefered?

2014-01-18 Thread Gregor Jasny

Hi,

On 18/01/14 11:43, Andreas Weber wrote:

Is there a way to tell libv4l2 which native source format it should
prefer to convert from? For example my uvcvideo webcam supports natively
YUYV and MJPG (see output below)
...

So it picks up YUYV as source format. I had a look at
v4lconvert_try_format but can see no way how to do this.


If I understand the source correctly the table at [1] is the brain of 
the conversion. MJPEG has a rank of 7, YUYV has a rank of 5. So YUYV is 
chosen. The function that picks the conversion path is at [2].


Currently there is no way to influence the decision. Why do you want to 
do this?


Thanks,
Gregor

[1] 
http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/lib/libv4lconvert/libv4lconvert.c#l75
[2] 
http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/lib/libv4lconvert/libv4lconvert.c#l379


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Update the README name for libv4l

2014-01-14 Thread Gregor Jasny

On 13/01/14 10:28, Prabhakar Lad wrote:

The README for libv4l was renamed from README.lib to
README.libv4l but the reference to it was not fixed.
This patch fixes the above.


Thanks, applied.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Update the link pointing the patch for porting the application to libv4l2

2014-01-14 Thread Gregor Jasny

On 13/01/14 11:59, Prabhakar Lad wrote:

From: Lad, Prabhakar prabhakar.cse...@gmail.com

Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com
---
  README.libv4l |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


Thanks, applied.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] libdvbv5: implement MGT table parser

2014-01-09 Thread Gregor Jasny

Hello André,

On 08/01/14 12:23, André Roth wrote:

...
+   union {
+   uint16_t bitfield;
+   struct {
+   uint16_t pid:13;
+   uint16_t one:3;
+   } __attribute__((packed));
+   } __attribute__((packed));
+uint8_t type_version:5;
+uint8_t one2:3;
+uint32_t size;


Are you sure that this code handles the endianess correctly? Looking at 
netinet/in.h I'm under the impression that the order of the bitfield 
entries have to be swapped, too:


struct ip
  {
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ip_hl:4;   /* header length */
unsigned int ip_v:4;/* version */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int ip_v:4;/* version */
unsigned int ip_hl:4;   /* header length */
#endif

I also remember that you can also easily get the byte swapping wrongif 
entries cross byte borders (like a :13 one).


Maybe you could write some unit tests for your functions. The Debian 
build farm then will catch any errors.


Cheers,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libdvbv5: dvb_table_pat_init is leaking memory

2013-12-15 Thread Gregor Jasny

Hello Mauro,

On 28/11/13 13:24, Mauro Carvalho Chehab wrote:

After a good resting night, I reviewed it, and it turns that memory leaks
can occur.

So, I re-worked the logic. I also fixed the other bugs pointed by Coverity
today. Could you please re-run the Coverity tests, to see if everything is
OK with the current version?


I triggered a rebuild last night. Currently this is a manual process.

Hans, as far as I know you're automatically building the media tree and 
check for warnings. Could you also host the nightly Coverity run?

On my i7 it takes about a minute per run.

Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [v4l-utils] Fix configure.ac --disable-v4l-utils option

2013-11-19 Thread Gregor Jasny

On 19/11/13 14:28, Alain VOLMAT wrote:


When using AC_ARG_ENABLE with a string containing - in it, the variable created 
will contains a _ instead of the -.
Thus for AC_ARG_ENABLE(v4l-utils ..., the variable enable_v4l_utils must be 
checked.


Applied, Thanks!

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libtool warning in libdvbv5

2013-10-07 Thread Gregor Jasny

Hello Hans,

On 10/4/13 1:14 PM, Hans Verkuil wrote:

When linking libdvbv5.la I get the following warning from libtool:

   CCLD libdvbv5.la
libtool: link: warning: `-version-info/-version-number' is ignored for 
convenience libraries

Other libs don't give that warning, but I don't see any obvious differences.

Do you know what might cause this?


Yes. It is caused by the fact that libdvbv5 is built as static lib by 
default. And for static libs it does not make sense to specify version 
numbers like for dynamic libs. I'll fix the warning during the next days.


Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/2] libv4lconvert: Support for Y16 pixel format

2013-08-16 Thread Gregor Jasny

On 8/13/13 10:56 AM, Hans de Goede wrote:

Series looks good to me:

Acked-by: Hans de Goede hdego...@redhat.com


I submitted it yesterday.

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/2] libv4lconvert: Support for Y16 pixel format

2013-08-12 Thread Gregor Jasny

On 8/9/13 6:04 PM, Ricardo Ribalda Delgado wrote:

ping?


Thank you for your the updated series.

Unfortunately I'm still partially busy with moving. I hoped the 
v4lconvert maintainer Hans (de Goede) will ack these patches. If this 
series does not get an ack by Sunday I'll double check and commit.


What hardware did you use to test this?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/2] libv4lconvert: Support for RGB32 and BGR32 format

2013-08-03 Thread Gregor Jasny

On 8/3/13 12:42 AM, Ricardo Ribalda Delgado wrote:

+   case V4L2_PIX_FMT_RGB32:
+   switch (dest_pix_fmt) {
+   case V4L2_PIX_FMT_RGB24:
+   v4lconvert_rgb32_to_rgb24(src, dest, width, height, 0);
+   break;
+   case V4L2_PIX_FMT_BGR24:
+   v4lconvert_rgb32_to_rgb24(src, dest, width, height, 1);
+   break;
+   case V4L2_PIX_FMT_YUV420:
+   v4lconvert_rgb24_to_yuv420(src, dest, fmt, 0, 0, 4);
+   break;
+   case V4L2_PIX_FMT_YVU420:
+   v4lconvert_rgb24_to_yuv420(src, dest, fmt, 0, 1, 4);
+   break;
+   }
+   if (src_size  (width * height * 4)) {
+   V4LCONVERT_ERR(short rgb32 data frame\n);
+   errno = EPIPE;
+   result = -1;
+   }
+   break;


I have not looked at the whole function but shouldn't this sanity check 
happen before the actual work? Also aren't you applying the condition 
here also for rgb24_to_xxx which should have only three bpp?



+   case V4L2_PIX_FMT_BGR32:
+   switch (dest_pix_fmt) {
+   case V4L2_PIX_FMT_RGB24:
+   v4lconvert_rgb32_to_rgb24(src, dest, width, height, 1);
+   break;
+   case V4L2_PIX_FMT_BGR24:
+   v4lconvert_rgb32_to_rgb24(src, dest, width, height, 0);
+   break;
+   case V4L2_PIX_FMT_YUV420:
+   v4lconvert_rgb24_to_yuv420(src, dest, fmt, 1, 0, 4);
+   break;
+   case V4L2_PIX_FMT_YVU420:
+   v4lconvert_rgb24_to_yuv420(src, dest, fmt, 1, 1, 4);
+   break;
+   }
+   if (src_size  (width * height * 4)) {
+   V4LCONVERT_ERR(short bgr32 data frame\n);
+   errno = EPIPE;
+   result = -1;
+   }
+   break;


Same here. And also in the other patch.


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] libv4lconvert: Support for RGB32 and BGR32 format

2013-08-02 Thread Gregor Jasny

Hello,

On 8/1/13 3:04 PM, Ricardo Ribalda Delgado wrote:

--- a/lib/libv4lconvert/libv4lconvert-priv.h
+++ b/lib/libv4lconvert/libv4lconvert-priv.h
@@ -108,7 +108,7 @@ unsigned char *v4lconvert_alloc_buffer(int needed,
  int v4lconvert_oom_error(struct v4lconvert_data *data);

  void v4lconvert_rgb24_to_yuv420(const unsigned char *src, unsigned char *dest,
-   const struct v4l2_format *src_fmt, int bgr, int yvu);
+   const struct v4l2_format *src_fmt, int bgr, int yvu, int rgb32);

  void v4lconvert_yuv420_to_rgb24(const unsigned char *src, unsigned char *dst,
int width, int height, int yvu);



@@ -47,9 +47,15 @@ void v4lconvert_rgb24_to_yuv420(const unsigned char *src, 
unsigned char *dest,
RGB2Y(src[2], src[1], src[0], *dest++);
else
RGB2Y(src[0], src[1], src[2], *dest++);
-   src += 3;
+   if (rgb32)
+   src += 4;
+   else
+   src += 3;


Instead of passing a 0/1 flag here I would call this variable 
bits_per_pixel or bpp and pass 3 or 4 here. This would reduce the if 
condition ugliness.


Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] qv4l2: add ALSA stream to qv4l2

2013-08-02 Thread Gregor Jasny

Hello,


diff --git a/utils/qv4l2/Makefile.am b/utils/qv4l2/Makefile.am
index 22d4c17..eed25b0 100644
--- a/utils/qv4l2/Makefile.am
+++ b/utils/qv4l2/Makefile.am
@@ -4,7 +4,8 @@ qv4l2_SOURCES = qv4l2.cpp general-tab.cpp ctrl-tab.cpp 
vbi-tab.cpp v4l2-api.cpp
capture-win-qt.cpp capture-win-qt.h capture-win-gl.cpp capture-win-gl.h \
raw2sliced.cpp qv4l2.h capture-win.h general-tab.h vbi-tab.h v4l2-api.h 
raw2sliced.h
  nodist_qv4l2_SOURCES = moc_qv4l2.cpp moc_general-tab.cpp moc_capture-win.cpp 
moc_vbi-tab.cpp qrc_qv4l2.cpp
-qv4l2_LDADD = ../../lib/libv4l2/libv4l2.la 
../../lib/libv4lconvert/libv4lconvert.la ../libv4l2util/libv4l2util.la
+qv4l2_LDADD = ../../lib/libv4l2/libv4l2.la 
../../lib/libv4lconvert/libv4lconvert.la ../libv4l2util/libv4l2util.la \
+  ../libmedia_dev/libmedia_dev.la

  if WITH_QV4L2_GL
  qv4l2_CPPFLAGS = $(QTGL_CFLAGS) -DENABLE_GL
@@ -14,6 +15,12 @@ qv4l2_CPPFLAGS = $(QT_CFLAGS)
  qv4l2_LDFLAGS = $(QT_LIBS)
  endif

+if WITH_QV4L2_ALSA
+qv4l2_CPPFLAGS += $(ALSA_CFLAGS) -DENABLE_ALSA


I would prefer if you don't add another define to the command line. To 
check for ALSA support please include config.h and use the flag provided 
there.



diff --git a/utils/qv4l2/alsa_stream.h b/utils/qv4l2/alsa_stream.h
index c68fd6d..b74c3aa 100644
--- a/utils/qv4l2/alsa_stream.h
+++ b/utils/qv4l2/alsa_stream.h
@@ -1,5 +1,12 @@
-int alsa_thread_startup(const char *pdevice, const char *cdevice, int latency,
-   FILE *__error_fp,
-   int __verbose);
+#ifndef ALSA_STRAM_H
+#define ALSA_STRAM_H


unimportant typo here

Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Doing a v4l-utils-1.0.0 release

2013-08-01 Thread Gregor Jasny

Hello,

On 6/14/13 9:15 AM, Hans de Goede wrote:

IIRC the 0.9.x series were meant as development releases leading up to a
new
stable 1.0.0 release. Lately there have been no maintenance 0.8.x releases
and a lot of interesting development going on in the 0.9.x, while at the
same time there have been no issues reported against 0.9.x (iow it seems
stable).

So how about taking current master and releasing that as a 1.0.0 release ?


If nobody objects I'll do a 1.0.0 release this weekend.

Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Doing a v4l-utils-1.0.0 release

2013-07-25 Thread Gregor Jasny

Hello Guy,

On 6/15/13 12:33 PM, Guy Martin wrote:

Can we wait a little bit more like a week max ?
I'd like to see the polarization stuff fixed because otherwise you
can't use sat at all with libdvbv5.

I'll work on the new patches this weekend. I'll hopefully have
something today.
I'll see what I can do wrt DiSEqC stuff but that can definitely wait a
latter release.


I saw your patches were merged to v4l-utils. Is there anything else 
you'd like to have included in a v4l-utils 1.0.0 release?


Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] xc3082: Fix use after free in free_firmware()

2013-07-25 Thread Gregor Jasny
Detected by Coverity Scanner.

CC: Mauro Carvalho Chehab mche...@infradead.org
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 utils/xc3028-firmware/firmware-tool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/xc3028-firmware/firmware-tool.c 
b/utils/xc3028-firmware/firmware-tool.c
index b2e9de4..a7850df 100644
--- a/utils/xc3028-firmware/firmware-tool.c
+++ b/utils/xc3028-firmware/firmware-tool.c
@@ -86,13 +86,13 @@ static struct firmware* alloc_firmware(void) {
 
 static void free_firmware(struct firmware *f) {
free(f-name);
-   free(f-desc);
if(f-desc) {
unsigned int i = 0;
for(i = 0; i  f-nr_desc; ++ i) {
free(f-desc[i].data);
}
}
+   free(f-desc);
free(f);
 }
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] v4l-utils: Some fixes for Coverity issues

2013-07-25 Thread Gregor Jasny
Hello,

the following patches fix issues that the Coverity static analyzer found
in v4l-utils.

Please review.

Thanks,
Gregor

Gregor Jasny (4):
  xc3082: Fix use after free in free_firmware()
  libdvbv5: Fix reallocation in parse_lcn
  rds-ctl: Always terminate strings properly
  libdvbv5: Fix copy and paste error in parse_service()

 lib/libdvbv5/descriptors.c|  6 +++---
 utils/rds-ctl/rds-ctl.cpp | 14 +++---
 utils/xc3028-firmware/firmware-tool.c |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] libdvbv5: Fix reallocation in parse_lcn

2013-07-25 Thread Gregor Jasny
Detected by Coverity.

Signed-off-by: Gregor Jasny gja...@googlemail.com
CC: Mauro Carvalho Chehab mche...@infradead.org
---
 lib/libdvbv5/descriptors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c
index 73338d8..99d8fa3 100644
--- a/lib/libdvbv5/descriptors.c
+++ b/lib/libdvbv5/descriptors.c
@@ -758,7 +758,7 @@ static void parse_lcn(struct nit_table *nit_table,
for (i = 0; i  dlen; i+= 4, p+= 4) {
struct lcn_table **lcn = nit_table-lcn;
 
-   *lcn = realloc(*lcn, (n + 1) * sizeof(*lcn));
+   *lcn = realloc(*lcn, (n + 1) * sizeof(**lcn));
(*lcn)[n].service_id = p[0]  8 | p[1];
(*lcn)[n].lcn = (p[2]  8 | p[3])  0x3ff;
nit_table-lcn_len++;
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] libdvbv5: Fix copy and paste error in parse_service()

2013-07-25 Thread Gregor Jasny
Detected by Coverity.

Signed-off-by: Gregor Jasny gja...@googlemail.com
CC: Mauro Carvalho Chehab mche...@infradead.org
CC: André Roth neol...@gmail.com
---
 lib/libdvbv5/descriptors.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c
index 99d8fa3..9b6b050 100644
--- a/lib/libdvbv5/descriptors.c
+++ b/lib/libdvbv5/descriptors.c
@@ -787,9 +787,9 @@ static void parse_service(struct dvb_v5_fe_parms *parms, 
struct service_table *s
if (verbose) {
if (service_table-provider_name)
printf(Provider %s, service_table-provider_name);
-   if (service_table-service_alias)
+   if (service_table-provider_alias)
printf((%s), service_table-provider_alias);
-   if (service_table-provider_name || 
service_table-service_alias)
+   if (service_table-provider_name || 
service_table-provider_alias)
printf(\n);
if (service_table-service_name)
printf(Service %s, service_table-service_name);
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] rds-ctl: Always terminate strings properly

2013-07-25 Thread Gregor Jasny
Detected by Coverity.

Signed-off-by: Gregor Jasny gja...@googlemail.com
CC: Hans Verkuil hverk...@xs4all.nl
---
 utils/rds-ctl/rds-ctl.cpp | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index a9fe2a8..74972eb 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -762,13 +762,11 @@ static int parse_cl(int argc, char **argv)
params.options[(int)opt] = 1;
switch (opt) {
case OptSetDevice:
-   strncpy(params.fd_name, optarg, 80);
+   strncpy(params.fd_name, optarg, sizeof(params.fd_name));
if (optarg[0] = '0'  optarg[0] = '9'  
strlen(optarg) = 3) {
-   static char newdev[20];
-
-   sprintf(newdev, /dev/radio%s, optarg);
-   strncpy(params.fd_name, newdev, 20);
+   snprintf(params.fd_name, 
sizeof(params.fd_name), /dev/radio%s, optarg);
}
+   params.fd_name[sizeof(params.fd_name) - 1] = '\0';
break;
case OptSetFreq:
params.freq = strtod(optarg, NULL);
@@ -786,7 +784,8 @@ static int parse_cl(int argc, char **argv)
{
if (access(optarg, F_OK) != -1) {
params.filemode_active = true;
-   strncpy(params.fd_name, optarg, 80);
+   strncpy(params.fd_name, optarg, 
sizeof(params.fd_name));
+   params.fd_name[sizeof(params.fd_name) - 1] = 
'\0';
} else {
fprintf(stderr, Unable to open file: %s\n, 
optarg);
return -1;
@@ -1006,7 +1005,8 @@ int main(int argc, char **argv)
fprintf(stderr, No RDS-capable device found\n);
exit(1);
}
-   strncpy(params.fd_name, devices[0].c_str(), 80);
+   strncpy(params.fd_name, devices[0].c_str(), 
sizeof(params.fd_name));
+   params.fd_name[sizeof(params.fd_name) - 1] = '\0';
printf(Using device: %s\n, params.fd_name);
}
if ((fd = test_open(params.fd_name, O_RDONLY | O_NONBLOCK))  0) {
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] v4l-utils: Fix crashes found by Mayhem

2013-06-27 Thread Gregor Jasny
The Mayhem Team ran their code checker over the Debian archive and
also found two crashes in v4l-utils.

See http://lists.debian.org/debian-devel/2013/06/msg00720.html

Gregor Jasny (2):
  libv4lconvert: Prevent integer overflow by checking width and height
  keytable: Always check if strtok return value is null

 lib/libv4lconvert/ov511-decomp.c |  7 ++-
 lib/libv4lconvert/ov518-decomp.c |  7 ++-
 utils/keytable/keytable.c| 19 ---
 3 files changed, 28 insertions(+), 5 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] libv4lconvert: Prevent integer overflow by checking width and height

2013-06-27 Thread Gregor Jasny
The Mayhem Team found a crash caused by an integer overflow.
Details are here:
http://www.forallsecure.com/bug-reports/8aae67d864bce76993f3f9812b4a2aeea0eb38da/

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/libv4lconvert/ov511-decomp.c | 7 ++-
 lib/libv4lconvert/ov518-decomp.c | 7 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/libv4lconvert/ov511-decomp.c b/lib/libv4lconvert/ov511-decomp.c
index 90fc4b1..971d497 100644
--- a/lib/libv4lconvert/ov511-decomp.c
+++ b/lib/libv4lconvert/ov511-decomp.c
@@ -14,6 +14,7 @@
  * Free Software Foundation; version 2 of the License.
  */
 
+#include limits.h
 #include string.h
 #include unistd.h
 #include helper-funcs.h
@@ -640,7 +641,11 @@ int main(int argc, char *argv[])
 
 
dest_size = width * height * 3 / 2;
-   if (dest_size  sizeof(dest_buf)) {
+   if (width = 0 || width  SHRT_MAX || height = 0 || height  
SHRT_MAX) {
+   fprintf(stderr, %s: error: width or height out of 
bounds\n,
+   argv[0]);
+   dest_size = -1;
+   } else if (dest_size  sizeof(dest_buf)) {
fprintf(stderr, %s: error: dest_buf too small, need: 
%d\n,
argv[0], dest_size);
dest_size = -1;
diff --git a/lib/libv4lconvert/ov518-decomp.c b/lib/libv4lconvert/ov518-decomp.c
index 47b5cbb..91d908c 100644
--- a/lib/libv4lconvert/ov518-decomp.c
+++ b/lib/libv4lconvert/ov518-decomp.c
@@ -15,6 +15,7 @@
  * Free Software Foundation; version 2 of the License.
  */
 
+#include limits.h
 #include string.h
 #include unistd.h
 #include helper-funcs.h
@@ -1454,7 +1455,11 @@ int main(int argc, char *argv[])
 
 
dest_size = width * height * 3 / 2;
-   if (dest_size  sizeof(dest_buf)) {
+   if (width = 0 || width  SHRT_MAX || height = 0 || height  
SHRT_MAX) {
+   fprintf(stderr, %s: error: width or height out of 
bounds\n,
+   argv[0]);
+   dest_size = -1;
+   } else if (dest_size  sizeof(dest_buf)) {
fprintf(stderr, %s: error: dest_buf too small, need: 
%d\n,
argv[0], dest_size);
dest_size = -1;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] keytable: Always check if strtok return value is null

2013-06-27 Thread Gregor Jasny
The Mayhem Team found a crash caused by a nullptr.
Details are here:
http://www.forallsecure.com/bug-reports/567323cd26f180910beb03ae26afb40c432a0c6a/

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 utils/keytable/keytable.c | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index 06b3d95..8bcd5c4 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -207,13 +207,19 @@ static error_t parse_keyfile(char *fname, char **table)
p++;
p = strtok(p, \n\t =:);
do {
+   if (!p)
+   goto err_einval;
if (!strcmp(p, table)) {
p = strtok(NULL,\n, );
+   if (!p)
+   goto err_einval;
*table = malloc(strlen(p) + 1);
strcpy(*table, p);
} else if (!strcmp(p, type)) {
p = strtok(NULL,  ,\n);
do {
+   if (!p)
+   goto err_einval;
if (!strcasecmp(p,rc5) || 
!strcasecmp(p,rc-5))
ch_proto |= RC_5;
else if (!strcasecmp(p,rc6) 
|| !strcasecmp(p,rc-6))
@@ -447,6 +453,8 @@ static error_t parse_opt(int k, char *arg, struct 
argp_state *state)
case 'p':
p = strtok(arg, ,;);
do {
+   if (!p)
+   goto err_inval;
if (!strcasecmp(p,rc5) || !strcasecmp(p,rc-5))
ch_proto |= RC_5;
else if (!strcasecmp(p,rc6) || !strcasecmp(p,rc-6))
@@ -813,14 +821,19 @@ static int v1_get_sw_enabled_protocol(char *dirname)
return 0;
}
 
-   p = strtok(buf,  \n);
-   rc = atoi(p);
-
if (fclose(fp)) {
perror(name);
return errno;
}
 
+   p = strtok(buf,  \n);
+   if (!p) {
+   fprintf(stderr, %s has invalid content: '%s'\n, name, buf);
+   return 0;
+   }
+
+   rc = atoi(p);
+
if (debug)
fprintf(stderr, protocol %s is %s\n,
name, rc? enabled : disabled);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Doing a v4l-utils-1.0.0 release

2013-06-17 Thread Gregor Jasny

Hello,

On 6/14/13 9:15 AM, Hans de Goede wrote:

So how about taking current master and releasing that as a 1.0.0 release ?


I'm fine with preparing a 1.0.0 release.

But I'm under the impression that the libdvbv5 interface is not polished 
enough to build a shared library from it. So I'd like to change the 
autoconf default to false and skip installing the static and shared library.


Any objections?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[gspca] Green/garbled/black webcam [0x0ac8 0xc002] output for Sony VGN-FE21M laptop

2013-04-20 Thread Gregor Jasny
Hello,

I could need some help with this Ubuntu bug report:
https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1134565

Is there known error in the gspca driver that is causing this kernel log:
[ 2830.890605] gspca_main: ISOC data error: [27] len=0, status=-71

v4l-info reports the following:
 VIDIOC_QUERYCAP
driver  : vc032x
card: USB2.0 Web Camera
bus_info: usb-:00:1d.7-8
version : 3.2.40
capabilities: 0x501 [VIDEO_CAPTURE,READWRITE,STREAMING]

Or is this the result of broken hardware?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] v4l-utils: use openat when available

2013-02-02 Thread Gregor Jasny
Hello,

On 1/22/13 5:37 PM, Riku Voipio wrote:
 New architectures such as 64-Bit arm build kernels without legacy
 system calls - Such as the the no-at system calls. Thus, use
 SYS_openat whenever it is available.

 +#ifdef SYS_openat
 +#define SYS_OPEN(file, oflag, mode) \
 + syscall(SYS_openat, AT_FDCWD, (const char *)(file), (int)(oflag), 
 (mode_t)(mode))
 +#else
  #define SYS_OPEN(file, oflag, mode) \
   syscall(SYS_open, (const char *)(file), (int)(oflag), (mode_t)(mode))
 +#endif

This would reduce compatibility to Linux = 2.6.16 where openat was
introduced. How about testing for absence of SYS_open instead? Or fall
back to SYS_open if SYS_openat is not implemented?

Thanks,
Gregor

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [segfault] running ir-keytable with v4l-utils 0.8.9

2012-11-04 Thread Gregor Jasny
Hello,

On 10/27/12 1:26 PM, Gregor Jasny wrote:
 I looked at the crash and it seems that the rc_dev structure is not
 initialized when a device name is set on the command line. Could you
 please take a look?

I filed this as a Fedora bug report so that it does not get lost:
https://bugzilla.redhat.com/show_bug.cgi?id=872927

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [segfault] running ir-keytable with v4l-utils 0.8.9

2012-10-27 Thread Gregor Jasny
Hello Mauro,

On 10/14/12 9:54 PM, Wojciech Myrda wrote:
 However I experienced a segfault trying to run this command:
 ir-keytable --protocol=rc-6 --device /dev/input/by-id/usb-15c2_0038-event-if00

 Trace I got in gdb:
 Program terminated with signal 11, Segmentation fault.
 #0  0x7fd1c6bdd410 in __strcpy_chk () from /lib64/libc.so.6
 (gdb) bt full
 #0  0x7fd1c6bdd410 in __strcpy_chk () from /lib64/libc.so.6
 No symbol table info available.
 #1  0x004037bc in strcpy (__src=optimized out,
 __dest=0x7fff0a823010 )
 at /usr/include/bits/string3.h:105
 No locals.
 #2  v1_set_hw_protocols (rc_dev=optimized out) at keytable.c:758
 #3  0x004019af in set_proto (rc_dev=0x7fff0a824030) at keytable.c:1153

I looked at the crash and it seems that the rc_dev structure is not
initialized when a device name is set on the command line. Could you
please take a look?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Add Fujitsu Siemens Amilo Pi 2530 to gspca upside down table

2012-10-18 Thread Gregor Jasny

Hello,

I've got an webcam upside down report for the following system:

System Information
Manufacturer: FUJITSU SIEMENS
Product Name: AMILO Pi 2530
Version:
Serial Number:
UUID: removed
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

Base Board Information
Manufacturer: FUJITSU SIEMENS
Product Name: F42
Version: 00030D01
Serial Number: removed

Currently an entry in the gspca/m5602 quirk table is missing. Please add 
the attached patch to the DVB kernel tree.


Thanks,
Gregor
From 82b684714f9cee10c7b5c4c7873cd8e65a937aa3 Mon Sep 17 00:00:00 2001
From: Gregor Jasny gja...@googlemail.com
Date: Thu, 18 Oct 2012 13:20:47 +0200
Subject: [PATCH] Add Fujitsu Siemens Amilo Pi 2530 to gspca upside down table.

The DMI information for this system:

System Information
Manufacturer: FUJITSU SIEMENS
Product Name: AMILO Pi 2530
Version:
Serial Number:
UUID: removed
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: FUJITSU SIEMENS
Product Name: F42
Version: 00030D01
Serial Number: removed

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 
b/drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
index cc8ec3f..c8e1572 100644
--- a/drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
+++ b/drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
@@ -74,6 +74,12 @@ static
DMI_MATCH(DMI_PRODUCT_NAME, AMILO Pa 2548)
}
}, {
+   .ident = Fujitsu-Siemens Amilo Pi 2530,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, FUJITSU SIEMENS),
+   DMI_MATCH(DMI_PRODUCT_NAME, AMILO Pi 2530)
+   }
+   }, {
.ident = MSI GX700,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, Micro-Star International),
-- 
1.7.2.5



Re: [segfault] running ir-keytable with v4l-utils 0.8.9

2012-10-16 Thread Gregor Jasny

Hello,

On 10/14/12 9:54 PM, Wojciech Myrda wrote:

On my system I have just installed using bumped Gentoo ebuilds v4l-utils
package

[ebuild   R] media-libs/libv4l-0.8.9::bigvo  0 kB
[ebuild   R] media-tv/v4l-utils-0.8.9::bigvo  USE=-qt4 0 kB

ebuilds used for bumbing to version 0.8.9:
http://gentoo-portage.com/media-libs/libv4l/libv4l-0.8.8
http://gentoo-portage.com/media-tv/v4l-utils/v4l-utils-0.8.8-r1

However I experienced a segfault trying to run this command:
ir-keytable --protocol=rc-6 --device
/dev/input/by-id/usb-15c2_0038-event-if00


There seems to be some problems with options or file parsing. Valgrind 
is complaining, too. I'll have a look later.


Is this segfault a regression over an older v4l-utils version?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Announcing v4l-utils-0.8.9

2012-10-14 Thread Gregor Jasny
Hi,

I'm happy to announce the release of v4l-utils-0.8.9. It contains purely
backports from the development branch. The most interesting additions
are the improvements for the Pixart based webcams and the updated
v4l2-compliance, v4l-ctl, and qv4l2 utilities.

ChangeLog:
* libv4l changes (0.9.x backports)
  * libv4lconvert: Various Pixart JPEG fixes
  * libv4lconvert: Add more notebooks to the upside down device table
* Utils changes (0.9.x backports)
  * keytable: Add support for Sanyo IR and RC-5-SZ protocol
  * keytable: Add missing buttons in shipped keytables
  * v4l2-compliance, v4l-ctl, qv4l2: Sync with development branch

Go get it here:
http://linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.9.tar.bz2

You can always find the latest developments and the stable branch here:
http://git.linuxtv.org/v4l-utils.git

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Announcing v4l-utils development snapshot 0.9.1

2012-10-14 Thread Gregor Jasny
Hello,

I'd like to announce the first development snapshot of the upcoming
0.10.x release. Compared to the latest stable version the biggest
changes are the introduction of the libv4l plugin API, the new RDS
library and utility and the DVBv5 library and tools. Additionally the
build system has been converted to autotools.

So please give it a try. It has been compile tested on Debian Sid,
Ubuntu Quantal, RHEL5 and RHEL6. The Ubuntu libv4l/development PPA will
be updated shortly.

The preliminary ChangeLog is the following:

* libv4l changes
  * Various Pixart JPEG fixes
  * Add more notebooks to the upside down device table
  * Use bytesperline instead of width (Robert Abel)
  * Better luminance quantization table for Pixart JPEG (Jean-Francois
Moine)
  * Fix out of bounds array usage
  * Prevent GCC 4.7 inlining error
  * Add support for libjpeg = v7
  * Add new matching algorithm for upside down table
  * Retry with another frame on JPEG header decode errors
  * Improved JL2005BCD support (Theodore Kilgore)
  * Set errno to EIO if getting 4 consecutive EAGAIN convert errors
  * Make software autowhitebalance converge faster
  * Add quirk support for forced tinyjpeg fallback

* ir-keytable changes
  * Fixed file parsing errors
  * Add support for Sanyo IR and RC-5-SZ protocol
  * Add missing mouse buttons in shipped keytables

* libdvbv5 changes
  * Initial release

* qv4l2 changes
  * Fix segfault when there are no inputs or outputs
  * Fix endianess issues
  * Add support for new timing ioctls
  * Improve frequency and radio support
  * Add VBI support
  * Add ability to make a snapshot
  * Add support to stream raw frames into a file

* libv4l2rds and rds-ctl
  * Initial release (Konke Radlow)

* buildsystem changes
  * Converted buildsystem to autotools
  * Made buildsystem cross compiling friendly
  * Support out of tree builds

Go get it here:
http://linuxtv.org/downloads/v4l-utils/v4l-utils-0.9.1.tar.bz2

You can always find the latest development branch here:
http://git.linuxtv.org/v4l-utils.git

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [v4l-utils] Use RCC variable to call rcc compiler

2012-10-08 Thread Gregor Jasny
Hello Khem,

On 10/7/12 8:41 PM, Khem Raj wrote:
 In cross compile environment rcc native version
 may be staged in a different directory or even
 called rcc4 or somesuch. Lets provide a facility
 to specify it in environment

I'll take care of this patch.

 diff --git a/utils/qv4l2/Makefile.am b/utils/qv4l2/Makefile.am
 index 02d0bcb..86d0285 100644
 --- a/utils/qv4l2/Makefile.am
 +++ b/utils/qv4l2/Makefile.am
 @@ -29,7 +29,7 @@ moc_capture-win.cpp: $(srcdir)/capture-win.h
  
  # Call the Qt resource compiler
  qrc_qv4l2.cpp: $(srcdir)/qv4l2.qrc
 - rcc -name qv4l2 -o $@ $(srcdir)/qv4l2.qrc
 + $(RCC) -name qv4l2 -o $@ $(srcdir)/qv4l2.qrc
  
  install-data-local:
   $(INSTALL_DATA) -D -p $(srcdir)/qv4l2.desktop   
 $(DESTDIR)$(datadir)/applications/qv4l2.desktop
 

Where does RCC gets populated? The configure.ac parts seems to be missing.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ir-keytable: Bug in gen_keytables.pl script

2012-10-07 Thread Gregor Jasny
Hello,

I recently received this launchpad bug:
https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1054122
It seems that the mentioned key mappings are missing.

If you check the generated mapping file

http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/utils/keytable/rc_keymaps/imon_pad

and compare it to the driver file

http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/drivers/media/rc/keymaps/rc-imon-pad.c#l111

you'll notice that the parsing stopped at the BTN_xyz table entries:

 { 0x299115b7, KEY_KEYBOARD },
 { 0x299135b7, KEY_KEYBOARD },

processing stopped here

 { 0x0101, BTN_LEFT },
 { 0x0102, BTN_RIGHT },
 { 0x01010080, BTN_LEFT },
 { 0x01020080, BTN_RIGHT },
 { 0x688301b7, BTN_LEFT },
 { 0x688481b7, BTN_RIGHT },
 
 { 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
 { 0x2b8395b7, KEY_TIME }, /* Timer */

Mauro, could you please take a look? I guess the BTN_xyz entries should
be also added to the keytable files. Unfortunately my Perl skills are
horrible.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix libdvbv5 endianess function for embedded toolchains

2012-08-21 Thread Gregor Jasny
Hello,

the following patch fixes compilation of libdvbv5 with the Code Sourcery
ARM toolchain. It replaces the missing be16toh and be32toh with the
available ntohs and ntohl.

IMHO the bswap16/32 macro names should be replaced because the current name
suggests unconditional swap regardless of the host architecture.

Thanks,
Gregor

Gregor Jasny (1):
  libdvbv5: Fix byte swapping for embedded toolchains

 lib/include/descriptors.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] libdvbv5: Fix byte swapping for embedded toolchains

2012-08-21 Thread Gregor Jasny
Reported-by: Lad, Prabhakar prabhakar@ti.com
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/include/descriptors.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/include/descriptors.h b/lib/include/descriptors.h
index 9039014..a64370c 100644
--- a/lib/include/descriptors.h
+++ b/lib/include/descriptors.h
@@ -25,7 +25,7 @@
 #ifndef _DESCRIPTORS_H
 #define _DESCRIPTORS_H
 
-#include endian.h
+#include arpa/inet.h
 #include unistd.h
 #include stdint.h
 
@@ -46,11 +46,11 @@ extern char *default_charset;
 extern char *output_charset;
 
 #define bswap16(b) do {\
-   b = be16toh(b); \
+   b = ntohs(b); \
 } while (0)
 
 #define bswap32(b) do {\
-   b = be32toh(b); \
+   b = ntohl(b); \
 } while (0)
 
 struct dvb_desc {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/2] Add libv4l2rds library (with changes proposed in RFC)

2012-08-09 Thread Gregor Jasny

Hello Konke,

On 8/7/12 5:11 PM, Konke Radlow wrote:

diff --git a/configure.ac b/configure.ac
index 8ddcc9d..1109c4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,9 +148,12 @@ AC_ARG_WITH(libv4l2subdir, 
AS_HELP_STRING(--with-libv4l2subdir=DIR,set libv4l2 l
  AC_ARG_WITH(libv4lconvertsubdir, 
AS_HELP_STRING(--with-libv4lconvertsubdir=DIR,set libv4lconvert library subdir 
[default=libv4l]),
 libv4lconvertsubdir=$withval, libv4lconvertsubdir=libv4l)

+AC_ARG_WITH(libv4l2rdssubdir, AS_HELP_STRING(--with-libv4l2rdssubdir=DIR,set 
libv4l2rds library subdir [default=libv4l]),
+   libv4l2rdssubdir=$withval, libv4l2rdssubdir=libv4l)
+
  AC_ARG_WITH(udevdir, AS_HELP_STRING(--with-udevdir=DIR,set udev directory 
[default=/lib/udev]),
 udevdir=$withval, udevdir=/lib/udev)
-
+
  libv4l1privdir=$libdir/$libv4l1subdir
  libv4l2privdir=$libdir/$libv4l2subdir
  libv4l2plugindir=$libv4l2privdir/plugins


please remove these changes. They are not needed for the RDS library.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 0/2] Add support for RDS decoding

2012-07-29 Thread Gregor Jasny
Hello Konke,

On 7/27/12 4:27 PM, Konke Radlow wrote:
 changing the condition in the library header from 
 #if __GNUC__ = 4
 #define LIBV4L_PUBLIC __attribute__ ((visibility(default)))
 #else
 #define LIBV4L_PUBLIC
 #endif
 
 to 
 #if HAVE_VISIBILITY
 #define LIBV4L_PUBLIC __attribute__ ((visibility(default)))
 #else
 #define LIBV4L_PUBLIC
 #endif
 
 causes linker problems for me. The public library functions can no longer be 
 found. I cannot figure out why it's working for programs using libv4l2.la but 
 not for programs using libv4l2rds.la

You need to include config.h before including this file in the utility
and library to get the HAVE_VISIBILITY definition activated.
The other option would be switching from defining HAVE_VISIBILITY in
config.h to a command line define.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 0/2] Add support for RDS decoding

2012-07-26 Thread Gregor Jasny
Hello Konke,

On 7/25/12 7:43 PM, Konke Radlow wrote:
 The latest version of the code can always be found in my github repository:
 https://github.com/koradlow/v4l2-rds-ctl

In the github dir is a lib/include/libv4l2rd.h file. I cannot find it in
the patchset. It also looks like you're bases on an older revision of
the tree. Please rebase your patches.

In the mentioned header files please replace the condition in

#if __GNUC__ = 4
#define LIBV4L_PUBLIC __attribute__ ((visibility(default)))
#else
#define LIBV4L_PUBLIC
#endif

with the ones found in libv4l2.h.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/2] Initial version of the RDS-decoder library Signed-off-by: Konke Radlow krad...@cisco.com

2012-07-26 Thread Gregor Jasny
On 7/25/12 7:44 PM, Konke Radlow wrote:
 diff --git a/configure.ac b/configure.ac
 index 8ddcc9d..1d7eb29 100644
 --- a/configure.ac
 +++ b/configure.ac
...
 @@ -146,13 +148,17 @@ AC_ARG_WITH(libv4l2subdir, 
 AS_HELP_STRING(--with-libv4l2subdir=DIR,set libv4l2 l
  AC_ARG_WITH(libv4lconvertsubdir, 
 AS_HELP_STRING(--with-libv4lconvertsubdir=DIR,set libv4lconvert library 
 subdir [default=libv4l]),
 libv4lconvertsubdir=$withval, libv4lconvertsubdir=libv4l)
  
 +AC_ARG_WITH(libv4l2rdssubdir, AS_HELP_STRING(--with-libv4l2rdssubdir=DIR,set 
 libv4l2rds library subdir [default=libv4l]),
 +   libv4l2rdssubdir=$withval, libv4l2rdssubdir=libv4l)
 +
  AC_ARG_WITH(udevdir, AS_HELP_STRING(--with-udevdir=DIR,set udev directory 
 [default=/lib/udev]),
 udevdir=$withval, udevdir=/lib/udev)
 -
 +   
  libv4l1privdir=$libdir/$libv4l1subdir
  libv4l2privdir=$libdir/$libv4l2subdir
  libv4l2plugindir=$libv4l2privdir/plugins
  libv4lconvertprivdir=$libdir/$libv4lconvertsubdir
 +libv4l2rdsprivdir=$libdir/$libv4l2rdssubdir
  
  keytablesystemdir=$udevdir/rc_keymaps
  keytableuserdir=$sysconfdir/rc_keymaps
 @@ -166,6 +172,7 @@ AC_SUBST(libv4lconvertprivdir)
  AC_SUBST(keytablesystemdir)
  AC_SUBST(keytableuserdir)
  AC_SUBST(udevrulesdir)
 +AC_SUBST(libv4l2rdsprivdir)
  AC_SUBST(pkgconfigdir)
  
  AC_DEFINE_UNQUOTED([V4L_UTILS_VERSION], [$PACKAGE_VERSION], [v4l-utils 
 version string])
 @@ -173,6 +180,7 @@ AC_DEFINE_DIR([LIBV4L1_PRIV_DIR], [libv4l1privdir], 
 [libv4l1 private lib directo
  AC_DEFINE_DIR([LIBV4L2_PRIV_DIR], [libv4l2privdir], [libv4l2 private lib 
 directory])
  AC_DEFINE_DIR([LIBV4L2_PLUGIN_DIR], [libv4l2plugindir], [libv4l2 plugin 
 directory])
  AC_DEFINE_DIR([LIBV4LCONVERT_PRIV_DIR], [libv4lconvertprivdir], 
 [libv4lconvert private lib directory])
 +AC_DEFINE_DIR([LIBV4L2RDS_PRIV_DIR], [libv4l2rdsprivdir], [libv4l2rds 
 private lib directory])
  AC_DEFINE_DIR([IR_KEYTABLE_SYSTEM_DIR], [keytablesystemdir], [ir-keytable 
 preinstalled tables directory])
  AC_DEFINE_DIR([IR_KEYTABLE_USER_DIR], [keytableuserdir], [ir-keytable user 
 defined tables directory])
  

I don't think you need these changes. In libv4l these are for the
wrapper libraries. You don't have one.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/2] Initial version of the RDS-decoder library Signed-off-by: Konke Radlow krad...@cisco.com

2012-07-26 Thread Gregor Jasny
On 7/25/12 7:44 PM, Konke Radlow wrote:
 --- /dev/null
 +++ b/lib/libv4l2rds/Makefile.am
 @@ -0,0 +1,11 @@
 +if WITH_LIBV4L
 +lib_LTLIBRARIES = libv4l2rds.la
 +include_HEADERS = ../include/libv4l2rds.h
 +pkgconfig_DATA = libv4l2rds.pc
 +else
 +noinst_LTLIBRARIES = libv4l2rds.la
 +endif
 +
 +libv4l2rds_la_SOURCES = libv4l2rds.c
 +libv4l2rds_la_CPPFLAGS = -fvisibility=hidden $(ENFORCE_LIBV4L_STATIC) 
 -std=c99
 +libv4l2rds_la_LDFLAGS = -version-info 0 -lpthread $(DLOPEN_LIBS) 
 $(ENFORCE_LIBV4L_STATIC)

You don't call dlopen, so you can drop $(DLOPEN_LIBS)

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 2/2] Initial version of RDS Control utility Signed-off-by: Konke Radlow krad...@cisco.com

2012-07-26 Thread Gregor Jasny
On 7/25/12 7:44 PM, Konke Radlow wrote:
 --- /dev/null
 +++ b/utils/rds-ctl/rds-ctl.cpp
 @@ -0,0 +1,978 @@
 +/*
 + * rds-ctl.cpp is based on v4l2-ctl.cpp
 + * 
 + * the following applies for all RDS related parts:
 + * Copyright 2012 Cisco Systems, Inc. and/or its affiliates. All rights 
 reserved.
 + * Author: Konke Radlow korad...@gmail.com
 + * 
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU Lesser General Public License as published 
 by
 + * the Free Software Foundation; either version 2.1 of the License, or
 + * (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  
 USA
 + */
 +
 +#include unistd.h
 +#include stdlib.h
 +#include stdio.h
 +#include string.h
 +#include wchar.h
 +#include locale.h
 +#include inttypes.h
 +#include getopt.h
 +#include sys/types.h
 +#include fcntl.h
 +#include errno.h
 +#include sys/ioctl.h
 +#include sys/time.h
 +#include dirent.h
 +#include config.h
 +#include signal.h
 +
 +#ifdef HAVE_SYS_KLOG_H
 +#include sys/klog.h
 +#endif

You don't call klog, so you can drop these three lines

 +static int parse_cl(int argc, char **argv)
 +{
 + int i = 0;
 + int idx = 0;
 + int opt = 0;
 + char short_options[26 * 2 * 2 + 1];
 +
 + if (argc == 1) {
 + usage_hint();
 + exit(1);
 + }
 + for (i = 0; long_options[i].name; i++) {
 + if (!isalpha(long_options[i].val))
 + continue;
 + short_options[idx++] = long_options[i].val;
 + if (long_options[i].has_arg == required_argument)
 + short_options[idx++] = ':';
 + }
 + while (1) {
 + // TODO: remove option_index ?
 + int option_index = 0;
 +
 + short_options[idx] = 0;
 + opt = getopt_long(argc, argv, short_options,
 +  long_options, option_index);
 + if (opt == -1)
 + break;
 +
 + params.options[(int)opt] = 1;
 + switch (opt) {
 + case OptSetDevice:
 + strncpy(params.fd_name, optarg, 80);
 + if (optarg[0] = '0'  optarg[0] = '9'  optarg[1] 
 == 0) {

see isdigit from types.h (or std::isdigit from ctypes)


Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 2/2] Initial version of RDS Control utility Signed-off-by: Konke Radlow krad...@cisco.com

2012-07-26 Thread Gregor Jasny
On 7/25/12 7:44 PM, Konke Radlow wrote:

 +static void print_rds_af(struct v4l2_rds_af_set *af_set)
 +{
 + int counter = 0;
 +
 + printf(\nAnnounced AFs: %u, af_set-announced_af);
 + for (int i = 0; i  af_set-size  i  af_set-announced_af; i++, 
 counter++) {
 + if (af_set-af[i] = 8750 ) {
 + printf(\nAF%02d: %.1fMHz, counter, af_set-af[i] / 
 100.0);
 + continue;
 + }
 + printf(\nAF%02d: %.1fkHz, counter, af_set-af[i] / 1000.0);
 + }
 +}
 +
 +static void print_rds_pi(const struct v4l2_rds *handle)
 +{
 + printf(\nArea Coverage: %s, v4l2_rds_get_coverage_str(handle));
 +}
 +
 +static void print_rds_data(struct v4l2_rds *handle, uint32_t updated_fields)
 +{
 + if (params.options[OptPrintBlock])
 + updated_fields = 0x;

You could use UINT32_MAX here

 +
 + if (updated_fields  V4L2_RDS_PI  
 + handle-valid_fields  V4L2_RDS_PI) {
 + printf(\nPI: %04x, handle-pi);
 + print_rds_pi(handle);
 + }

 +static int parse_cl(int argc, char **argv)
 +{
 + int i = 0;
 + int idx = 0;
 + int opt = 0;
 + char short_options[26 * 2 * 2 + 1];

Where comes the 26 and 2 from?
Could this be (ARRAY_SIZE(long_options) + 1 ) * 2?

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] ir-keytable: Smarter keytable location handling

2012-06-23 Thread Gregor Jasny
Hello,

this patchset will improve the keytable location handling of
ir-keytable. In controst to the default install location
(/etc/rc_keymaps) Debian and Ubuntu installed the shipped
keymaps into /lib/udev/rc_keymaps (just like keyboard keymaps
are installed into /lib/udev/keymaps). If a keymap needs to
be modified it's supposed to go into /etc/rc_keymaps.

The current ir-keytable program knows only about a single default
keytable directory. This patchset makes ir-keytable aware of a
system and user keytable directory. The user directory is searched
first, followed by a the system directory if no file was found.

Mauro, are you OK with committing?

Thanks,
Gregor

Gregor Jasny (3):
  keytable: Make udev rules dir configurable
  keytable: Preinstall keytables relative to sysconfdir
  keytable: first search table in userdir, then in systemdir

 configure.ac   |   15 +++
 utils/keytable/Makefile.am |8 
 utils/keytable/keytable.c  |   30 +-
 3 files changed, 36 insertions(+), 17 deletions(-)

-- 
1.7.10

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] keytable: Make udev rules dir configurable

2012-06-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 configure.ac   |7 +--
 utils/keytable/Makefile.am |1 -
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8e166b1..1a12abd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,13 +145,16 @@ AC_ARG_WITH(libv4l2subdir, 
AS_HELP_STRING(--with-libv4l2subdir=DIR,set libv4l2 l
 AC_ARG_WITH(libv4lconvertsubdir, 
AS_HELP_STRING(--with-libv4lconvertsubdir=DIR,set libv4lconvert library subdir 
[default=libv4l]),
libv4lconvertsubdir=$withval, libv4lconvertsubdir=libv4l)
 
+AC_ARG_WITH(udevdir, AS_HELP_STRING(--with-udevdir=DIR,set udev directory 
[default=/lib/udev]),
+   udevdir=$withval, udevdir=/lib/udev)
+
 libv4l1privdir=$libdir/$libv4l1subdir
 libv4l2privdir=$libdir/$libv4l2subdir
 libv4l2plugindir=$libv4l2privdir/plugins
 libv4lconvertprivdir=$libdir/$libv4lconvertsubdir
 
 rootetcdir=/etc
-rootlibdir=/lib
+udevrulesdir=$udevdir/rules.d
 pkgconfigdir=$libdir/pkgconfig
 
 AC_SUBST(libv4l1privdir)
@@ -159,7 +162,7 @@ AC_SUBST(libv4l2privdir)
 AC_SUBST(libv4l2plugindir)
 AC_SUBST(libv4lconvertprivdir)
 AC_SUBST(rootetcdir)
-AC_SUBST(rootlibdir)
+AC_SUBST(udevrulesdir)
 AC_SUBST(pkgconfigdir)
 
 AC_DEFINE_UNQUOTED([V4L_UTILS_VERSION], [$PACKAGE_VERSION], [v4l-utils 
version string])
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index 0321a57..3d510e0 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -1,4 +1,3 @@
-udevrulesdir=/lib/udev/rules.d
 rootetcdir=/etc
 
 bin_PROGRAMS = ir-keytable
-- 
1.7.10

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] keytable: Preinstall keytables relative to sysconfdir

2012-06-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 configure.ac   |5 +++--
 utils/keytable/Makefile.am |5 ++---
 utils/keytable/keytable.c  |7 ++-
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a12abd..661eb20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,7 @@ libv4l2privdir=$libdir/$libv4l2subdir
 libv4l2plugindir=$libv4l2privdir/plugins
 libv4lconvertprivdir=$libdir/$libv4lconvertsubdir
 
-rootetcdir=/etc
+keytablesystemdir=$sysconfdir/rc_keymaps
 udevrulesdir=$udevdir/rules.d
 pkgconfigdir=$libdir/pkgconfig
 
@@ -161,7 +161,7 @@ AC_SUBST(libv4l1privdir)
 AC_SUBST(libv4l2privdir)
 AC_SUBST(libv4l2plugindir)
 AC_SUBST(libv4lconvertprivdir)
-AC_SUBST(rootetcdir)
+AC_SUBST(keytablesystemdir)
 AC_SUBST(udevrulesdir)
 AC_SUBST(pkgconfigdir)
 
@@ -170,6 +170,7 @@ AC_DEFINE_DIR([LIBV4L1_PRIV_DIR], [libv4l1privdir], 
[libv4l1 private lib directo
 AC_DEFINE_DIR([LIBV4L2_PRIV_DIR], [libv4l2privdir], [libv4l2 private lib 
directory])
 AC_DEFINE_DIR([LIBV4L2_PLUGIN_DIR], [libv4l2plugindir], [libv4l2 plugin 
directory])
 AC_DEFINE_DIR([LIBV4LCONVERT_PRIV_DIR], [libv4lconvertprivdir], [libv4lconvert 
private lib directory])
+AC_DEFINE_DIR([IR_KEYTABLE_SYSTEM_DIR], [keytablesystemdir], [ir-keytable 
preinstalled tables directory])
 
 # options
 
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index 3d510e0..4505fc1 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -1,8 +1,7 @@
-rootetcdir=/etc
-
 bin_PROGRAMS = ir-keytable
 man_MANS = ir-keytable.1
-nobase_rootetc_DATA = rc_maps.cfg $(srcdir)/rc_keymaps/*
+sysconf_DATA = rc_maps.cfg
+keytablesystem_DATA = $(srcdir)/rc_keymaps/*
 udevrules_DATA = 70-infrared.rules
 
 ir_keytable_SOURCES = keytable.c parse.h
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index fbf9c03..31376f3 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -28,9 +28,6 @@
 
 #include parse.h
 
-/* Default place where the keymaps will be stored */
-#define CFGDIR /etc/rc_keymaps
-
 struct input_keymap_entry_v2 {
 #define KEYMAP_BY_INDEX(1  0)
u_int8_t  flags;
@@ -1516,8 +1513,8 @@ int main(int argc, char *argv[])
if (cur-fname[0] == '/' || ((cur-fname[0] == '.')  
strchr(cur-fname, '/'))) {
fname = cur-fname;
} else {
-   fname = malloc(strlen(cur-fname) + strlen(CFGDIR) + 2);
-   strcpy(fname, CFGDIR);
+   fname = malloc(strlen(cur-fname) + 
strlen(IR_KEYTABLE_SYSTEM_DIR) + 2);
+   strcpy(fname, IR_KEYTABLE_SYSTEM_DIR);
strcat(fname, /);
strcat(fname, cur-fname);
}
-- 
1.7.10

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [v4l-utils] Add configure option to allow qv4l2 disable

2012-06-20 Thread Gregor Jasny
On 6/19/12 2:46 PM, Ezequiel Garcia wrote:
 Gregory already applied this patch, and it seems you have now
 over applied it in the same tree:

I reverted the second patch.

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fwd: [Bug 871427] Re: 1164:7efd YUANRD STK7700D DVB TV card

2012-06-11 Thread Gregor Jasny

Hello,

this bug is lingering in the Ubuntu bugtracker since over half a year. 
Does anyone know if this dongle just lacks an usb id entry in some 
driver, a completely new driver or will never be supported due to the 
lack of specs?


Thanks,
Gregor

 Original Message 
Subject: [Bug 871427] Re: 1164:7efd YUANRD STK7700D DVB TV card
Date: Mon, 11 Jun 2012 01:41:54 -
From: Ralph Richardson ralph.richard...@internode.on.net
Reply-To: Bug 871427 871...@bugs.launchpad.net
To: gja...@googlemail.com

So what is the current status? It still is not working on my Toshiba
Satelite P770

--
You received this bug notification because you are a member of libv4l,
which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/871427

Title:
  1164:7efd YUANRD STK7700D DVB TV card

Status in “linux” package in Ubuntu:
  Incomplete

Bug description:
  Hi,

  would it be possible to get support for YUAN idProduct 0x7efd DVB TV
  card in the new kernel ? idProduct seems missing in dvb-usb-ids.h

  Bus 001 Device 004: ID 1164:7efd YUAN High-Tech Development Co., Ltd
  Device Descriptor:
bLength18
bDescriptorType 1
bcdUSB   2.00
bDeviceClass0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize064
idVendor   0x1164 YUAN High-Tech Development Co., Ltd
idProduct  0x7efd
bcdDevice1.00
iManufacturer   1 YUANRD
iProduct2 STK7700D
iSerial 3 01
bNumConfigurations  1

  BR
  Ron
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Doing a new upstream / linuxtv.org xawtv3 release?

2012-06-04 Thread Gregor Jasny
Hello,

On 6/4/12 12:57 PM, Hans de Goede wrote:
 I've been doing a lot of work on xawtv3 lately, mostly on the radio app
 but also some on xawtv itself. I'm no done and IMHO it would be good
 to do a new upstream release to get all those changes out there.
 
 So any comments / suggestions? Note go for it also is a valid
 comment :)

The Debian patch tracker contains four patches for xawtv:
http://patch-tracker.debian.org/package/xawtv/3.102-3

Three of them are already in the git tree, this one is not:
 http://patch-tracker.debian.org/patch/series/view/xawtv/3.102-3/mtt_only_in_linux

Could you please add it before the release?

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >