Dear visitor, welcome to VDR Portal. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
This is a 'Sp'ectrum 'An'alyzer Plugin for the Video Disk Recorder (VDR). Requirements: VDR & (lib)fftw3 Description: A plugin that can receive PCM-data from other plugins (e.g. mp3ng) to compute frequency-data and to provide them to other plugins to display a 'Sp'ectrum 'An'alyzer. It is meant as a kind of middleware between these providers and clients to be as generic as needed to be able to implement the visualisation on all kinds of output-devices (OSD, lcd, graphlcd, framebuffer, etc.). Sketch of the architecture: | Data-provider sends PCM-data ---> | SpAn-plugin | >--- Visualization-clients request the spectrum-data "making s.th. handsome out of it" | Installation: cd /put/your/path/here/VDR/PLUGINS/src tar -xzf /put/your/path/here/vdr-span-X.Y.Z.tar.bz2 ln -s span-X.Y.Z span cd /put/your/path/here/VDR make make plugins ./vdr -P span Setup: Activate spectrum analyzer? yes/no De-(Activates) the plugin. yes: The plugin receives data (only if clients also request data) and on request hands the results over to clients. no: In this case all data provider- and visualization-plugins are rejected when trying to hand over data or to request results. Use logarithmic diagram yes/no A (yet naive) try to equalize the heights of the bars a bit. Lower frequencies are prevailing which results in an "high dynamic range of the heights of the bars" (= mostly few extremely high bars on the left, further right more decreasing or even no bars at all). yes: Suspends a "no" at "Use pure (unequalized) data". Scaling of the heights of the bars is done logarithmically. no: No logarithmic scaling is done. Tips to improve this way of equalizing are warmly welcome! Hide mainmenu entry yes/no Should be self-explanatory. At the moment there is no use of displaying the plugin's entry in the main menu. See ToDo (way below) for the reason. Use pure (unequalized) data yes/no yes: Really compute the pure data without equalizing anyhow. no: Values of higher frequencies are emphasized resulting in a "bit nicer way of displaying the frequencies" than with pure data. Notes: - Tested on VDR-1.4.0 with a FF-DVB-s 2MB (CPU = PIII 1,2GHz) with mp3ng-plugin as self-made data provider as well as visualization-client. Additionally the lcdproc-plugin was used as visualization-client, but just as a proof-of-concept. Thus, there were two clients active simultaneously. - I would be very glad if the authors of plugins for rendering vdr-information on (external) displays (graphlcd/graphtft/lcdproc/etc.) or the OSD (mp3(ng)/ cdda/radio?/muggle?) used the data provided by this plugin to visualize a spectrum analyzer. Generic example how to use it: // Please see the "real" README for the "HowTo". TODO: - Test the stuff with cdda-plugin (provider) and graphlcd-plugin (visualization) - Test it on my streaming-client (it's a PIII 450MHz with DXR3 now) - Implement the output of the names of all data-source- and visualization-plugins on selecting the mainmenu's entry. A change in the "Plugin-Service-Protocol" could be neccessary to support getting ALL plugins that can handle a service. - Implement bar-peaks and their fall off |
![:]](wcf/images/smilies/pleased.gif)
This post has been edited 1 times, last edit by "theonlychriss" (Sep 3rd 2006, 9:38am)
This post has been edited 1 times, last edit by "theonlychriss" (Aug 31st 2006, 3:57pm)
|
|
Source code |
1 |
*** glibc detected *** double free or corruption (!prev): 0x081e0ec0 *** |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Core was generated by `./vdr -Pspan -v /video0 -r /opt/vdr/vdr/vdrrecord.sh -c /opt/vdr/vdr/config -E'. Program terminated with signal 6, Aborted. #0 0x4019a7c7 in raise () from /lib/tls/libc.so.6 (gdb) bt #0 0x4019a7c7 in raise () from /lib/tls/libc.so.6 #1 0x4019c06b in abort () from /lib/tls/libc.so.6 #2 0x401d1545 in __fsetlocking () from /lib/tls/libc.so.6 #3 0x401d7b97 in malloc_usable_size () from /lib/tls/libc.so.6 #4 0x401d8032 in free () from /lib/tls/libc.so.6 #5 0x404c1ecd in fftw_kernel_free () from /usr/lib/libfftw3.so.3 #6 0x40539ded in fftw_free () from /usr/lib/libfftw3.so.3 #7 0x4001ccfe in cAudioChannel::~cAudioChannel () from ./PLUGINS/lib/libvdr-span.so.1.4.2 #8 0x4001cae4 in cSpectrumAnalyzer::~cSpectrumAnalyzer () from ./PLUGINS/lib/libvdr-span.so.1.4.2 #9 0x4001c7a7 in cPluginSpan::~cPluginSpan () from ./PLUGINS/lib/libvdr-span.so.1.4.2 #10 0x080cf8d0 in cDll::~cDll () #11 0x080fac7e in cListBase::Del () #12 0x080cf435 in cPluginManager::Shutdown () #13 0x08100076 in main () |

This post has been edited 1 times, last edit by "theonlychriss" (Aug 31st 2006, 6:01pm)

rocessArgs(...)
ervice|
|
Source code |
1 2 3 4 5 6 7 8 9 10 |
...
..
while ( client == clients.Get(i) )
{
if ( 0 == client->Compare( ((Span_GetBarHeights_v1_0*)(Data))->name) )
{
found = true;
break;
..
..
|
.|
|
Source code |
1 |
vdr -u vdr --watchdog=60 --config=/etc/vdr --epgfile=/video/epg.data --log=3 --video=/video0 --port=2001 --lirc --vfat --record=/usr/lib/vdr/bin/vdrrecord-gate.sh --grab=/samba/chriss --shutdown=/video/commands/vdrshutdown.sh --plugin=span |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
==14887== ERROR SUMMARY: 48 errors from 6 contexts (suppressed: 43 from 2) ==14887== ==14887== 8 errors in context 1 of 6: ==14887== Invalid write of size 4 ==14887== at 0x44426CE: ??? ==14887== Address 0x4296648 is 8 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== 8 errors in context 2 of 6: ==14887== Invalid write of size 4 ==14887== at 0x44426C6: ??? ==14887== Address 0x429664C is 12 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== 8 errors in context 3 of 6: ==14887== Invalid write of size 8 ==14887== at 0x44426B8: ??? ==14887== Address 0x4296640 is 0 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== 8 errors in context 4 of 6: ==14887== Invalid write of size 4 ==14887== at 0x4442486: ??? ==14887== Address 0x4296648 is 8 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== 8 errors in context 5 of 6: ==14887== Invalid write of size 4 ==14887== at 0x444247E: ??? ==14887== Address 0x429664C is 12 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== 8 errors in context 6 of 6: ==14887== Invalid write of size 8 ==14887== at 0x4442467: ??? ==14887== Address 0x4296640 is 0 bytes after a block of size 8,192 alloc'd ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x43B8EBD: ??? ==14887== by 0x43B8190: ??? ==14887== by 0x43B868F: ??? ==14887== by 0x80DD9AE: cDll::Load(bool) (in /usr/bin/vdr) ==14887== by 0x80DE0AB: cPluginManager::LoadPlugins(bool) (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) --14887-- --14887-- supp: 27 Ubuntu-stripped-ld.so --14887-- supp: 16 dl_relocate_object ==14887== ==14887== IN SUMMARY: 48 errors from 6 contexts (suppressed: 43 from 2) ==14887== ==14887== malloc/free: in use at exit: 15,947 bytes in 361 blocks. ==14887== malloc/free: 736,450 allocs, 736,089 frees, 39,248,151 bytes allocated. ==14887== ==14887== searching for pointers to 361 not-freed blocks. ==14887== checked 33,736,372 bytes. ==14887== ==14887== ==14887== 336 (72 direct, 264 indirect) bytes in 2 blocks are definitely lost in loss record 5 of 11 ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x4228E9C: (within /lib/tls/libc.so) ==14887== by 0x42294BE: __nss_database_lookup (in /lib/tls/libc.so) ==14887== by 0x43C20D9: ??? ==14887== by 0x43C314F: ??? ==14887== by 0x41E845C: getpwnam_r (in /lib/tls/libc.so) ==14887== by 0x41E7EEF: getpwnam (in /lib/tls/libc.so) ==14887== by 0x8112B21: main (in /usr/bin/vdr) ==14887== ==14887== ==14887== 13,132 (104 direct, 13,028 indirect) bytes in 1 blocks are definitely lost in loss record 8 of 11 ==14887== at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x440699A: ??? ==14887== by 0x448E830: ??? ==14887== by 0x4291607: ??? ==14887== ==14887== ==14887== 272 bytes in 4 blocks are possibly lost in loss record 9 of 11 ==14887== at 0x401BB87: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==14887== by 0x400E1B8: allocate_dtv (in /lib/ld-2.3.6.so) ==14887== by 0x400E4BB: _dl_allocate_tls (in /lib/ld-2.3.6.so) ==14887== by 0x404F904: pthread_create@@GLIBC_2.1 (in /lib/tls/libpthread.so) ==14887== by 0x810837D: cThread::Start() (in /usr/bin/vdr) ==14887== by 0x4174F13: (below main) (in /lib/tls/libc.so) ==14887== ==14887== LEAK SUMMARY: ==14887== definitely lost: 176 bytes in 3 blocks. ==14887== indirectly lost: 13,292 bytes in 344 blocks. ==14887== possibly lost: 272 bytes in 4 blocks. ==14887== still reachable: 2,207 bytes in 10 blocks. ==14887== suppressed: 0 bytes in 0 blocks. ==14887== Reachable blocks (those to which a pointer was found) are not shown. ==14887== To see them, rerun with: --show-reachable=yes --14887-- memcheck: sanity checks: 11123 cheap, 445 expensive --14887-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --14887-- memcheck: auxmaps: 0 searches, 0 comparisons --14887-- memcheck: secondaries: 709 issued (45376k, 44M) --14887-- memcheck: secondaries: 564 accessible and distinguished (36096k, 35M) --14887-- tt/tc: 1,976,777 tt lookups requiring 2,389,617 probes --14887-- tt/tc: 1,976,777 fast-cache updates, 9 flushes --14887-- translate: new 17,501 (821,929 -> 14,083,508; ratio 171:10) [0 scs] --14887-- translate: dumped 0 (0 -> ??) --14887-- translate: discarded 5,089 (519,896 -> ??) --14887-- scheduler: 499,988,454 jumps (bb entries). --14887-- scheduler: 11,123/3,867,941 major/minor sched events. --14887-- sanity: 11124 cheap, 445 expensive checks. --14887-- exectx: 30,011 lists, 64,277 contexts (avg 2 per list) --14887-- exectx: 1,439,993 searches, 1,789,431 full compares (1,242 per 1000) --14887-- exectx: 382 cmp2, 282 cmp4, 0 cmpAll |
This post has been edited 1 times, last edit by "sn123py" (Sep 1st 2006, 12:56pm)
).
howProgress(bool open, bool bigWin)" vor dem "Flush()" kommt das "Getten" der Frequenz-Daten.
- die Fehler behoben, die zum "glibc: ..double free or corruption.." führten. Zumindest habe ich die Meldungen nicht mehr bekommen und valgrind beschwert sich nicht mehr über "das Geschreibsel" außerhalb der erlaubten Grenzen. Und bei meinen Tests, bei denen ich wirklich oft den VDR samt span- und mp3ng-Plugin (und lcdproc) neu gestartet habe, gab es keine Abstürze mehr.This post has been edited 1 times, last edit by "theonlychriss" (Sep 1st 2006, 6:27pm)
Quoted
Außerdem habe ich - dank der "Nachhilfe" von LordJaxom - die Fehler behoben, die zum "glibc: ..double free or corruption.." führten.
waehlen aber das muss noch alles eingerueckt werden,

) anzupassen, aber an einer stelle bleibt er hängen:|
|
Source code |
1 2 3 4 5 |
g++ -g -O2 -Wall -Woverloaded-virtual "-D__user=" -D_GNU_SOURCE -lImlib2 -c -D_GNU_SOURCE -DVDRVERSNUM=10402 -DHAVE_IMLIB2 -DHAVE_ICONPATCH -DHAVE_SNDFILE -DHAVE_VORBISFILE -I../../../include commands.c commands.c: In method `enum eOSState cMP3UpdateWebStreams::Execute()': commands.c:195: no matching function for call to `cCommand::Execute (bool)' ../../../include/vdr/config.h:98: candidates are: const char * cCommand::Execute(const char * = 0) make[1]: *** [commands.o] Error 1 |
This post has been edited 1 times, last edit by "Toxic-Tonic" (Sep 7th 2006, 10:18am)