Added code to replage glimagesink library on install and restor it on uninstall

This commit is contained in:
Miqra Developer 2018-09-27 20:44:48 +00:00
parent 4889f7a42e
commit c759878707
8 changed files with 21 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
MANIFEST
dist/
.vs/
build/
deb_dist/

4
debian/postinst vendored
View File

@ -21,6 +21,10 @@ set -e
case "$1" in
configure)
update-rc.d mediaserver defaults
# backup old library file
cp /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstopengl.so /usr/share/mediaserver/glimagesink_so/libgstopengl.so.old
# copy new library file
cp /usr/share/mediaserver/glimagesink_so/libgstopengl.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstopengl.so
;;
abort-upgrade|abort-remove|abort-deconfigure)

2
debian/prerm vendored Normal file → Executable file
View File

@ -20,6 +20,8 @@ set -e
case "$1" in
remove|upgrade|deconfigure)
update-rc.d -f mediaserver remove
# replaceold library file
cp /usr/share/mediaserver/glimagesink_so/libgstopengl.so.old /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstopengl.so
;;
failed-upgrade)

9
glimagesink_BUILD.txt Normal file
View File

@ -0,0 +1,9 @@
Instructions used to build noX port of glimagesink plugin:
Using source of gestreamer 1.10.5
./configure --disable-gtk-doc --disable-x11 --disable-glx --enable-egl --enable-dispmanx CFLAGS="-I/opt/vc/include/EGL -I/opt/vc/include/GLES -I/opt/vc/include/GLES2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" LDFLAGS="-L/opt/vc/lib" CPPFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/EGL" --with-gles2-module-name=/opt/vc/lib/libbrcmGLESv2.so --with-egl-module-name=/opt/vc/lib/libbrcmEGL.so
make
cp ext/gl/.libs/libgstopengl.so ~/.local/share/gstreamer-1.0/plugins/libgstopengl.so

View File

@ -1,6 +1,6 @@
major=1 # Major version
minor=1 # Minor version
minor=2 # Minor version
micro=0 # Bugfix version
# code to generate version string from above data

View File

@ -7,7 +7,7 @@ Includes scheduled recorder, music player, sound level meter and a webcam viewer
from distutils.core import setup
from distutils.extension import Extension
from glob import glob
import VERSION
from mediaserver import VERSION
# patch distutils if it's too old to cope with the "classifiers" or
# "download_url" keywords
@ -48,6 +48,6 @@ if __name__ == '__main__':
('/etc/init.d', glob('etc/init.d/*')),
('bin', glob('bin/*')),
('sbin', glob('sbin/*')),
('/usr/share/mediaserver/glimagesink_so',glob('glimagesink_so/*')),
],
)

View File

@ -30,7 +30,7 @@ class TestController:
GObject.timeout_add(10, self.tick)
def tick(self):
self.player.QuickLoop("/opt/src/robotvideo/ogen open.mp4",5)
self.player.QuickLoop("/opt/src/robotvideo/ogen open.mp4")
#GObject.timeout_add(3000, self.reboot)
pass