Skip to content

Commit

Permalink
qmlplayer: open file error on windows context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Nov 4, 2014
1 parent be7fd4c commit 0beba9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/QMLPlayer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main(int argc, char *argv[])
QString file = options.value("file").toString();
if (player && !file.isEmpty()) {
if (QFile(file).exists())
file.prepend("file://");
file.prepend("file:///"); //windows can not be file://
file.replace("\\", "/"); //qurl
QMetaObject::invokeMethod(player, "play", Q_ARG(QUrl, QUrl(file)));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: reg add "HKEY_CLASSES_ROOT\*\shell\OpenWithQtAV\command" /ve /t REG_SZ /d """"%~dp0player.exe""" """-f""" """%%1"""" /f
:: reg add "HKEY_CLASSES_ROOT\*\shell\OpenWithQtAV\command" /ve /t REG_SZ /d """"%~dp0player.exe""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV\command" /ve /t REG_SZ /d """"%~dp0bin\player.exe""" """-vo""" """gl""" """-f""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV QML\command" /ve /t REG_SZ /d """"%~dp0bin\QMLPlayer.exe""" """-vd""" """DXVA;FFmpeg""" """-f""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV QML\command" /ve /t REG_SZ /d """"%~dp0bin\QMLPlayer.exe""" """-f""" """%%1"""" /f
@echo Right click an video/music file, choose "Open with QtAV" to play
pause
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Component.prototype.createOperations = function()
//component.addOperation("Settings", "formate=native", //"path=HKEY_CURRENT_USER/SOFTWARE/Classes/*/shell/OpenWithQtAV/command", "method=set", "key=Default", "value=@TargetDir@/bin/player.exe -vo gl -f %%1");

component.addOperation("GlobalConfig", "HKEY_CURRENT_USER\\SOFTWARE\\Classes\\*\\shell\\Open With QtAV\\command", "Default", "\"@TargetDir@/bin/player.exe\" -vo gl -f \"%1\"");
component.addOperation("GlobalConfig", "HKEY_CURRENT_USER\\SOFTWARE\\Classes\\*\\shell\\Open With QtAV QML\\command", "Default", "\"@TargetDir@/bin/QMLPlayer.exe\" -vd \"DXVA;FFmpeg\" -f \"%1\"");
component.addOperation("GlobalConfig", "HKEY_CURRENT_USER\\SOFTWARE\\Classes\\*\\shell\\Open With QtAV QML\\command", "Default", "\"@TargetDir@/bin/QMLPlayer.exe\" -f \"%1\"");
}
if (installer.value("os") === "x11") {
var d = "Type=Application\nComment=A media playing framework based on Qt and FFmpeg\nKeywords=movie;video;player;multimedia;\nIcon=QtAV\nTerminal=false\nHomepage=https://github.com/wang-bin/QtAV\nCategories=Qt;AudioVideo;Player;Video;Development;\nMimeType=application/mxf;application/ogg;application/ram;application/sdp;application/smil;application/smil+xml;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktime-media-link;application/x-quicktimeplayer;application/x-shorten;application/x-smil;application/xspf+xml;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-scpls;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/google-video-pointer;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;x-scheme-handler/pnm;x-scheme-handler/mms;x-scheme-handler/net;x-scheme-handler/rtp;x-scheme-handler/rtsp;x-scheme-handler/mmsh;x-scheme-handler/uvox;x-scheme-handler/icy;x-scheme-handler/icyx;\nKeywords=Player;DVD;Audio;Video;";
Expand Down
2 changes: 1 addition & 1 deletion qtc_packaging/windows/install.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: reg add "HKEY_CLASSES_ROOT\*\shell\OpenWithQtAV\command" /ve /t REG_SZ /d """"%~dp0player.exe""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV\command" /ve /t REG_SZ /d """"%~dp0bin\player.exe""" """-vo""" """gl""" """-f""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV QML\command" /ve /t REG_SZ /d """"%~dp0bin\QMLPlayer.exe""" """-vd""" """DXVA;FFmpeg""" """-f""" """%%1"""" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with QtAV QML\command" /ve /t REG_SZ /d """"%~dp0bin\QMLPlayer.exe""" """-f""" """%%1"""" /f
@echo Right click an video/music file, choose "Open with QtAV" to play
pause

0 comments on commit 0beba9a

Please sign in to comment.