[Spice-devel] (no subject)
Qingyun Ao
aoqingyun at gmail.com
Tue Sep 13 07:44:04 UTC 2016
I try to test spice with h264 on Raspberry Pi, but failed with error. The
spice server is started with qemu on CentOS 7, while the spicy client is
built from spice-gtk (with gstreamer plugins including omx) on Debian
(Raspberry Pi). Can anybody give some hint?
The following are steps I used to setup spice server.
1. Download source codes
yum -y install git
git clone git://anongit.freedesktop.org/spice/spice-protocol
git clone git://anongit.freedesktop.org/spice/spice
git clone git://anongit.freedesktop.org/spice/qemu
2. Install build tools
yum -y install autoconf automake libtool
yum -y install pyparsing
3. Build spice protocol
cd spice-protocol
./autogen.sh --prefix=/usr
make
make install
cd ..
4. Install gstreamer dependencies
yum -y install epel-release
rpm -Uvh
http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
[Note A]
yum -y install gstreamer1-devel
yum -y install gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free
gstreamer1-plugins-good gstreamer1-plugins-ugly
yum -y install gstreamer1-libav
5. Install other dependencies
yum -y install glib2-devel pixman-devel celt051-devel openssl-devel
libjpeg-turbo-devel
6. Modify & build spice
cd spice
Modify server/reds.c to change video negotiation sequence by putting
gstreamer:h264 in the first place.
static const char default_video_codecs[] =
"gstreamer:h264;spice:mjpeg;gstreamer:mjpeg;gstreamer:vp8";
./autogen.sh --enable-gstreamer=1.0 --prefix=/usr
make
make install
cd ..
7. Build qemu
cp /usr/lib/pkgconfig/spice-server.pc /usr/share/pkgconfig/
cd qemu
./configure --enable-spice --target-list=x86_64-softmmu [Note B]
make
make install
cd ..
ldconfig
8. Create & start Windows 7 guest
/usr/local/bin/qemu-img create –f qcow2 win7.img 30G
/usr/local/bin/qemu-system-x86_64 -cpu host -smp 2,sockets=1,cores=2 -m
2048 -net nic,model=virtio -net user -drive
file=virtio-win-amd64.vfd,if=floppy -drive file=win7.img,if=virtio,index=0
-cdrom win7.iso -boot d --enable-kvm -vga qxl -spice
port=5900,ipv4,disable-ticketing,image-compression=auto_glz,jpeg-wan-compression=always,playback-compression=off,zlib-glz-wan-compression=never,streaming-video=filter,agent-mouse=on
[Note C]
Connect Windows 7 guest from Raspberry Pi by executing: spicy –h
###.###.### -p 5900
9. Test H264 video
Install Windows 7 OS
Install ovirt-4.0 guest tool (with qxl driver)
Install PotPlayer
Run PotPlayer
10. Got error on CentOS 7
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:773:map_format: The 8 format has not been tested yet
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element encoder: Can not initialize x264 encoder.
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element encoder: GStreamer error: negotiation problem.
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element src: Internal data flow error.
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element encoder: Can not initialize x264 encoder.
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element encoder: GStreamer error: negotiation problem.
(qemu-system-x86_64:35545): Spice-WARNING **:
gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from
element src: Internal data flow error.
(qemu-system-x86_64:35545): Spice-ERROR **:
../spice-common/common/ring.h:55:ring_add: assertion `ring->next != NULL &&
ring->prev != NULL' failed
Trace/breakpoint trap(Dump)
[Note A]
The output for “yum search gstreamer1*” before nux installation:
gstreamer1.x86_64 : GStreamer streaming media framework runtime
gstreamer1.i686 : GStreamer streaming media framework runtime
gstreamer1-devel.i686 : Libraries/include files for GStreamer streaming
media framework
gstreamer1-devel.x86_64 : Libraries/include files for GStreamer streaming
media framework
gstreamer1-devel-docs.noarch : Developer documentation for GStreamer
streaming media framework
gstreamer1-plugins-bad-free.x86_64 : GStreamer streaming media framework
"bad" plugins
gstreamer1-plugins-bad-free.i686 : GStreamer streaming media framework
"bad" plugins
gstreamer1-plugins-bad-free-devel.i686 : Development files for the
GStreamer media framework "bad" plug-ins
gstreamer1-plugins-bad-free-devel.x86_64 : Development files for the
GStreamer media framework "bad" plug-ins
gstreamer1-plugins-base.x86_64 : GStreamer streaming media framework base
plugins
gstreamer1-plugins-base.i686 : GStreamer streaming media framework base
plugins
gstreamer1-plugins-base-devel.i686 : GStreamer Base Plugins Development
files
gstreamer1-plugins-base-devel.x86_64 : GStreamer Base Plugins Development
files
gstreamer1-plugins-base-devel-docs.noarch : Developer documentation for
GStreamer Base plugins library
gstreamer1-plugins-base-tools.x86_64 : Tools for GStreamer streaming media
framework base plugins
gstreamer1-plugins-good.x86_64 : GStreamer plugins with good code and
licensing
gstreamer1-plugins-good.i686 : GStreamer plugins with good code and
licensing
The packages added for “yum search gstreamer1*” after nux installation:
gstreamer1-libav-debuginfo.x86_64 : Debug information for package
gstreamer1-libav
gstreamer1-plugins-bad-freeworld-debuginfo.x86_64 : Debug information for
package gstreamer1-plugins-bad-freeworld
gstreamer1-plugins-ugly-debuginfo.x86_64 : Debug information for package
gstreamer1-plugins-ugly
gstreamer1-rtsp-server-devel.x86_64 : Development files for
gstreamer1-rtsp-server
gstreamer1-vaapi-debuginfo.x86_64 : Debug information for package
gstreamer1-vaapi
gstreamer1-vaapi-devel.x86_64 : Development files for gstreamer1-vaapi
gstreamer1-libav.x86_64 : GStreamer 1.0 libav-based plug-ins
gstreamer1-plugins-bad-freeworld.x86_64 : GStreamer 1.0 streaming media
framework "bad" plug-ins
gstreamer1-plugins-ugly.x86_64 : GStreamer 1.0 streaming media framework
"ugly" plug-ins
gstreamer1-plugins-ugly-devel-docs.noarch : Development documentation for
the GStreamer "ugly" plug-ins
gstreamer1-rtsp-server.x86_64 : GStreamer RTSP server library
gstreamer1-rtsp-server-devel-docs.noarch : Developer documentation for
GStreamer-based RTSP server library
gstreamer1-vaapi.x86_64 : GStreamer plugins to use VA API video acceleration
mingw32-gstreamer1.noarch : MinGW Windows Streaming-Media Framework Runtime
mingw32-gstreamer1-plugins-base.noarch : Cross compiled GStreamer media
framework base plug-ins
mingw64-gstreamer1.noarch : MinGW Windows Streaming-Media Framework Runtime
mingw64-gstreamer1-plugins-base.noarch : Cross compiled GStreamer media
framework base plug-ins
[Note B]
The output for executing the script: ./configure --enable-spice
--target-list=x86_64-softmmu
No C++ compiler available; disabling C++ specific optional code
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /root/qemu
C compiler cc
Host C compiler cc
C++ compiler
Objective-C compiler cc
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g
QEMU_CFLAGS -I/usr/include/pixman-1 -Werror -fPIE -DPIE -m64
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels
-Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security
-Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration
-Wold-style-definition -Wtype-limits -fstack-protector-strong
-I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/spice-1 -I/usr/include/spice-server
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 –g
make make
install install
python python -B
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list x86_64-softmmu
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
pixman system
SDL support no
GTK support no
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support no
GNUTLS rnd no
libgcrypt no
libgcrypt kdf no
nettle no
nettle kdf no
libtasn1 no
curses support no
virgl support no
curl support no
mingw32 support no
Audio drivers oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
VNC support yes
VNC SASL support no
VNC JPEG support yes
VNC PNG support no
xen support no
brlapi support no
bluez support no
Documentation no
PIE yes
vde support no
netmap support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
RDMA support no
TCG interpreter no
fdt support no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
uuid support no
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backends log
spice support yes (0.12.12/0.13.2.38-5d6e-dirty)
rbd support no
xfsctl support no
smartcard support no
libusb no
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
GlusterFS support no
Archipelago support no
gcov gcov
gcov enabled no
TPM support yes
libssh2 support no
TPM passthrough yes
QOM debugging yes
vhdx no
lzo support no
snappy support no
bzip2 support no
NUMA host support no
tcmalloc support no
jemalloc support no
avx2 optimization yes
[Note C]
win7.iso is Windows 7 (64bit) Installation ISO
virtio-win-amd64.vfd is virtual floppy image file with virtio driver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160913/bdf0b968/attachment-0001.html>
More information about the Spice-devel
mailing list