RSATom / QmlVlc

[ABANDONED] libvlc wrapper for Qt Quick 2/Qml
Other
139 stars 56 forks source link

the VlcAudio 's channel can't be change in QML,and also the QmlVlcAudio can't be use in QML. #7

Closed kingctan closed 10 years ago

kingctan commented 10 years ago

1.the VlcAudio 's channel can't be change in QML, 2.and the QmlVlcAudio can't be use in QML. 3.can't pause the video when start, should only show the video's first frame image.

RSATom commented 10 years ago
  1. what function do you call to change channel? and how exactly?
  2. how exactly do you use QmlVlcAudio?
  3. I'm afraid it's not easy with current libvlc.
kingctan commented 10 years ago

Thank you for your reply. first, I need toggle audio channel (in QML file,not c++ code) from left to right, or to stereo mode. can you show me how to do that?

RSATom commented 10 years ago

you could try

vlcPlayer.audio.channel =  vlcPlayer.audio.left;
vlcPlayer.audio.channel =  vlcPlayer.audio.right;
vlcPlayer.audio.channel =  vlcPlayer.audio.stereo;

Read more at FBVLC wiki.

QmlVlc uses the same api as FBVLC uses, maybe with some minor differences.

kingctan commented 10 years ago

my code:

VlcPlayer {
id:player
volume:100
Component.onComplate{
player.audio.channel = player.audio.left
}}

Then run it show me:

QMetaProperty::read:Unable to handle unregistered datatype 'QmlVlcAudio*' for property 'QmlVlcPlayer::audio'
TypeError: Cannot read property 'left' of undefined

How to fix it? Thanks.

RSATom commented 10 years ago

it's my fault. will fix it today.

RSATom commented 10 years ago

fixed. check please.

RSATom commented 10 years ago

I've changed API a little. Correct way to change audio channels now is:

vlcPlayer.audio.channel = VlcAudio.Stereo;
vlcPlayer.audio.channel = VlcAudio.ReverseStereo;
vlcPlayer.audio.channel = VlcAudio.Left;
vlcPlayer.audio.channel = VlcAudio.Right;
vlcPlayer.audio.channel = VlcAudio.Dolby;
kingctan commented 10 years ago

Ok, I tested the audio channel,it works. Thanks.

also the playlist has no add function when I use

player.playlist.add('rtsp://.....');

So I can't play playlist videos.

another problem is the video marquee text can't be disabled even I use:

QmlVlcConfig::enableMarqueeFilter(false);
RSATom commented 10 years ago

you are right. Will fix it today.

RSATom commented 10 years ago

correct way to enable/disable marquee via qml is:

vlcPlayer.video.marquee.enable();
vlcPlayer.video.marquee.disable();

QmlVlcConfig::enableMarqueeFilter is for enabling marque plugin, and could be used only from C++

kingctan commented 10 years ago

not work using qml disable, it show 'rtsp://192.168.1.100:8554/1' at the bottom of video when play.

RSATom commented 10 years ago

do you use vlc 2.0?

RSATom commented 10 years ago

both are fixed: https://github.com/RSATom/QmlVlc/commit/1795433ebb3b7b488a8bc600cec679d74c4a6ff4 https://github.com/RSATom/QmlVlc/commit/7b68c8084d9ce782c15b80f321230319d0a6a4fa

displaying current playing item does not related to marque...

kingctan commented 10 years ago

yes, I use vlc 2.0, but, since ubuntu 14.04 LTS has released, the vlc version has update to 2.1.2, QmlVlc not works now on ubuntu 14.04. the error is:

[0x99bac20] main libvlc debug: VLC media player - 2.1.2 Rincewind
[0x99bac20] main libvlc debug: Copyright © 1996-2013 the VideoLAN team
[0x99bac20] main libvlc debug: revision 2.1.2-0-ga4c4876
[0x99bac20] main libvlc debug: configured with ./configure  '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--localstatedir=/var' '--libdir=${prefix}/lib/i386-linux-gnu' '--libexecdir=${prefix}/lib/i386-linux-gnu' '--disable-dependency-tracking' '--build=i686-linux-gnu' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' '--config-cache' '--disable-maintainer-mode' '--disable-silent-rules' '--disable-update-check' '--enable-fast-install' '--prefix=/usr' '--docdir=/usr/share/doc/vlc-nox' '--libdir=/usr/lib' '--sysconfdir=/etc' '--with-binary-version=2build2' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-chromaprint' '--enable-dbus' '--enable-dca' '--enable-dirac' '--enable-directfb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libfreerdp' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-oss' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-schroedinger' '--enable-sdl' '--enable-sftp' '--enable-shout' '--enable-skins2' '--enable-smbclient' '--enable-speex' '--enable-svg' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vorbis' '--enable-x264' '--enable-zvbi' '--with-kde-solid=/usr/share/kde4/apps/solid/actions/' '--disable-decklink' '--disable-dxva2' '--disable-fdkaac' '--disable-gnomevfs' '--disable-goom' '--disable-libvnc' '--disable-opencv' '--disable-projectm' '--disable-quicksync' '--disable-sndio' '--disable-telx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv1394' '--enable-linsys' '--enable-omxil' '--enable-udev' '--enable-libva' '--enable-v4l2' '--enable-crystalhd' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'build_alias=i686-linux-gnu'
[0x99bac20] main libvlc debug: searching plug-in modules
[0x99bac20] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[0x99bac20] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins'
QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 12, now registering size 0.
The program has unexpectedly finished.
RSATom commented 10 years ago

https://bugreports.qt-project.org/browse/QTBUG-27104

try to remove vlc's qt4 plugin.

kingctan commented 10 years ago

OK,I know,just rename the libqt4 plugin using:

linux@linux-ThinkPad-T61:cd /usr/lib/vlc/plugins/gui
linux@linux-ThinkPad-T61:/usr/lib/vlc/plugins/gui$ pwd
/usr/lib/vlc/plugins/gui
linux@linux-ThinkPad-T61:/usr/lib/vlc/plugins/gui$ ls
libncurses_plugin.so  libqt4_plugin.so  libskins2_plugin.so
linux@linux-ThinkPad-T61:/usr/lib/vlc/plugins/gui$ sudo mv libqt4_plugin.so  libqt4_plugin.so111111111111

then it's ok.

kingctan commented 10 years ago

Hi, RSATom, Would you mind if I ask one question not really on QmlVlc,maybe vlc problem,but I don't find any useful answer by google. If offend you, I am very sorry. -:)

When I play rtsp steaming, in a period of time,it has no sound and show the error below:

linuxktv-ThinkPad-T61:~$ vlc rtsp://192.168.1.100:8554/1
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x893c190] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x89c8a10] skins2 interface error: no suitable dialogs provider found (hint: compile the qt4 plugin, and make sure it is loaded properly)
[0x89c8a10] skins2 interface error: cannot instantiate qt4 dialogs provider
[0x89c8a10] [cli] lua interface: Listening on host "*console".
VLC media player 2.1.2 Rincewind
Command Line Interface initialized. Type `help' for help.
> Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x895f028] main vout display error: Failed to resize display
[0xb5c06898] mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer
[0xb1315bd0] main input error: ES_OUT_RESET_PCR called
[0xb1315bd0] main input error: ES_OUT_RESET_PCR called
[0xb5c06898] mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer
[mpeg2video @ 0xb1647a80] end mismatch left=48284 56DF
[mpeg2video @ 0xb1647a80] Warning MVs not available
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[mpeg2video @ 0xb1647a80] end mismatch left=179522 16B220
[mpeg2video @ 0xb1647a80] Warning MVs not available
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[mpeg2video @ 0xb1647a80] end mismatch left=302872 E9D95
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[mpeg2video @ 0xb1647a80] end mismatch left=159824 45D4DE
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[0xb5c06898] mpgatofixed32 audio converter error: libmad error: Huffman data overrun
[mpeg2video @ 0xb1647a80] end mismatch left=87841 284EBA
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[0xb5c06898] mpgatofixed32 audio converter error: libmad error: Huffman data overrun
[mpeg2video @ 0xb1647a80] end mismatch left=283266 413BF
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[mpeg2video @ 0xb1647a80] end mismatch left=145781 589
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
[0xb5c06898] mpgatofixed32 audio converter error: libmad error: Huffman data overrun
[mpeg2video @ 0xb1647a80] end mismatch left=27319 8037
[mpeg2video @ 0xb1647a80] concealing 45 DC, 45 AC, 45 MV errors
RSATom commented 10 years ago

Sorry, I don't know. try to run vlc with --vvv and ask on forum.videolan.org (or #videolan irc channel)

kingctan commented 10 years ago

OK, Thank you.