How to change vlc source code to append motiondetect filter timestamps to the log?

This forum is about all development around libVLC.
Ars
New Cone
New Cone
Posts: 3
Joined: 07 Jul 2019 18:31

How to change vlc source code to append motiondetect filter timestamps to the log?

Postby Ars » 22 May 2020 01:37

Please move this to the appropriate section.
 
https://github.com/videolan/vlc-3.0/blob/master/modules/video_filter/motiondetect.c

I see a line at the end:

Code: Select all

msg_Dbg( p_filter, "Counted %d moving shapes.", j );
this is similar to (resulting log):
motiondetect debug: Counted 3 moving shapes.
motiondetect debug: Counted 5 moving shapes.
motiondetect debug: Counted 2 moving shapes.
Ideally, the log should look like this:
motiondetect debug: Counted 3 moving shapes (timestamp 00:01:23.342).
motiondetect debug: Counted 5 moving shapes (timestamp 00:01:23.425).
motiondetect debug: Counted 2 moving shapes (timestamp 00:01:23.508).
Instead of timestamp, the frame number will also be great.

How do it?

Please move this to the appropriate section.

Ars
New Cone
New Cone
Posts: 3
Joined: 07 Jul 2019 18:31

Re: How to change vlc source code to append motiondetect filter timestamps to the log?

Postby Ars » 23 May 2020 13:59

I changed the last line of code to:

Code: Select all

msg_Dbg( p_filter, "Counted %d moving shapes.", p_picture->date );
packed back to vlc-3.0.10.tar.gz
opened a directory with this archive on the command line and executed (in ubuntu 16.04):

Code: Select all

tar xvfz vlc-3.0.10.tar.gz ./configure
received a series of errors and modified the command:

Code: Select all

./configure --disable-lua --disable-avcodec --disable-swscale --disable-a52
but I keep getting errors like:
configure: error: No package .. found.
Am I doing something wrong overall?
Or is it necessary to work with every error?

UPD:
it looks like it helped move on:

Code: Select all

sudo apt-get gksudo gksudo gedit /etc/apt/sources.list
...deleted the # in front of the lines for universe...

Code: Select all

sudo apt-get update sudo apt-get build-dep vlc
but next error:
configure: error: protoc compiler needed for chromecast was not found
solved:

Code: Select all

sudo apt-get install protobuf-compiler
Next error and solution: https://forum.videolan.org/viewtopic.php?t=153414

last error (without solution):
...
access/.libs/libdvdread_plugin_la-dvdread.o: In function `Open':
/media/ars/win/cam/somethingtest/vlc/modules/access/dvdread.c:206: undefined reference to `DVDOpen2'
collect2: error: ld returned 1 exit status
Makefile:14154: ошибка выполнения рецепта для цели «libdvdread_plugin.la»
...

upd2:
completely cleaned the directory and started from the beginning:

Code: Select all

sudo apt-get install git build-essential pkg-config libtool automake autopoint gettext git clone git://git.videolan.org/vlc.git cd vlc
...edited motiondetect.c...

Code: Select all

sudo apt-get install flex sudo apt-get install bison ./bootstrap sudo apt-get build-dep vlc ./configure --disable-lua --disable-avcodec --disable-swscale --disable-a52 --disable-xcb --disable-qt make
error:
tmp-vlc-openbd.desktop: error: value "x-content/video-bluray" for string list key "MimeType" in group "Desktop Entry" does not have a semicolon (';') as trailing character
Makefile:1874: ошибка выполнения рецепта для цели «vlc-openbd.desktop»
make[2]: *** [vlc-openbd.desktop] Ошибка 1
make[2]: выход из каталога «/media/ars/win/cam/somethingtest/vlc/vlc/share»
Makefile:1575: ошибка выполнения рецепта для цели «all-recursive»
make[1]: *** [all-recursive] Ошибка 1
make[1]: выход из каталога «/media/ars/win/cam/somethingtest/vlc/vlc»
Makefile:1460: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2

upd3:
cleared the directory and repeated all from upd2 again, but with vlc 3.0 and returned to:
...
CCLD libdvdread_plugin.la
access/.libs/libdvdread_plugin_la-dvdread.o: In function `Open':
/media/ars/win/cam/somethingtest/vlc-3.0/modules/access/dvdread.c:219: undefined reference to `DVDOpen2'
collect2: error: ld returned 1 exit status
Makefile:14156: ошибка выполнения рецепта для цели «libdvdread_plugin.la»
...

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to change vlc source code to append motiondetect filter timestamps to the log?

Postby mederi » 24 May 2020 16:55

I do not know where to move this topic as it is not about Lua scripts.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 26 guests