Improved support for bluray discs.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
issue/1/kplayer
Michele Calgaro 5 years ago
parent d6cadef120
commit e5dbf18d72
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1,5 +1,5 @@
[Desktop Entry]
X-TDE-ServiceTypes=audio/mp3,audio/mpeg3,audio/mpeg4,audio/mpg,audio/mpeg,audio/mpegurl,audio/m3u,audio/mp4,audio/wav,video/msvideo,video/mpeg4,video/mpeg,video/x-m4v,video/x-mpeg,video/x-mpeg2,video/mp4,video/x-msmpeg,video/vnd.mpegurl,video/x-mpegurl,video/x-msvideo,video/quicktime,video/x-qtc,audio/x-ms-asf,audio/x-ms-asx,audio/x-ms-wma,audio/x-ms-wax,audio/x-ms-wmp,audio/x-ms-wmv,video/x-ms-asf,video/x-ms-asf-plugin,video/x-ms-asx,video/x-ms-wax,video/x-ms-wmp,video/x-ms-wmv,video/x-ms-wma,video/x-ms-wvx,video/x-ms-wmx,video/x-ms-wm,application/asx,application/x-ms-asf,application/vnd.ms-asf,application/x-ms-wmd,application/x-ms-wmz,audio/scpls,audio/x-scpls,audio/x-pls,audio/vnd.mpegurl,audio/x-mpg,audio/x-mpeg,audio/x-mpeg3,audio/x-mpegurl,audio/x-realaudio,audio/x-pn-realaudio,audio/x-pn-realaudio-plugin,application/x-pn-realaudio,audio/vnd.rn-realaudio,video/x-realvideo,video/x-pn-realvideo,video/vnd.rn-realvideo,video/x-pn-realvideo-plugin,application/vnd.rn-realmedia,application/vnd.rn-realmedia-vbr,application/vnd.rn-realplayer,application/sdp,application/smil,application/x-smil,application/streamingmedia,application/x-streamingmedia,video/nsv,audio/x-mp3,video/x-ogm,video/x-theora,audio/vorbis,audio/x-vorbis,audio/x-oggflac,application/x-ogg,application/ogg,audio/mp1,audio/x-mp1,audio/mp2,audio/x-mp2,audio/x-wav,video/avi,video/x-avi,video/x-divx,video/x-fli,video/x-matroska,audio/x-matroska,application/x-mplayer2,application/x-cda,audio/aac,audio/ac3,audio/basic,audio/m4a,audio/x-aac,audio/x-adpcm,audio/x-flac,audio/x-m3u,audio/x-m4a,audio/x-musepack,audio/x-pn-windows-pcm,video/x-3gpp,video/x-3gpp2,video/mediaplayer,uri/mms,uri/mmst,uri/mmsu,uri/pnm,uri/rtsp,uri/rtspt,uri/rtspu,inode/directory,media/cdrom_mounted,media/cdrom_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/audiocd,media/dvdvideo,media/svcd,media/vcd
X-TDE-ServiceTypes=audio/mp3,audio/mpeg3,audio/mpeg4,audio/mpg,audio/mpeg,audio/mpegurl,audio/m3u,audio/mp4,audio/wav,video/msvideo,video/mpeg4,video/mpeg,video/x-m4v,video/x-mpeg,video/x-mpeg2,video/mp4,video/x-msmpeg,video/vnd.mpegurl,video/x-mpegurl,video/x-msvideo,video/quicktime,video/x-qtc,audio/x-ms-asf,audio/x-ms-asx,audio/x-ms-wma,audio/x-ms-wax,audio/x-ms-wmp,audio/x-ms-wmv,video/x-ms-asf,video/x-ms-asf-plugin,video/x-ms-asx,video/x-ms-wax,video/x-ms-wmp,video/x-ms-wmv,video/x-ms-wma,video/x-ms-wvx,video/x-ms-wmx,video/x-ms-wm,application/asx,application/x-ms-asf,application/vnd.ms-asf,application/x-ms-wmd,application/x-ms-wmz,audio/scpls,audio/x-scpls,audio/x-pls,audio/vnd.mpegurl,audio/x-mpg,audio/x-mpeg,audio/x-mpeg3,audio/x-mpegurl,audio/x-realaudio,audio/x-pn-realaudio,audio/x-pn-realaudio-plugin,application/x-pn-realaudio,audio/vnd.rn-realaudio,video/x-realvideo,video/x-pn-realvideo,video/vnd.rn-realvideo,video/x-pn-realvideo-plugin,application/vnd.rn-realmedia,application/vnd.rn-realmedia-vbr,application/vnd.rn-realplayer,application/sdp,application/smil,application/x-smil,application/streamingmedia,application/x-streamingmedia,video/nsv,audio/x-mp3,video/x-ogm,video/x-theora,audio/vorbis,audio/x-vorbis,audio/x-oggflac,application/x-ogg,application/ogg,audio/mp1,audio/x-mp1,audio/mp2,audio/x-mp2,audio/x-wav,video/avi,video/x-avi,video/x-divx,video/x-fli,video/x-matroska,audio/x-matroska,application/x-mplayer2,application/x-cda,audio/aac,audio/ac3,audio/basic,audio/m4a,audio/x-aac,audio/x-adpcm,audio/x-flac,audio/x-m3u,audio/x-m4a,audio/x-musepack,audio/x-pn-windows-pcm,video/x-3gpp,video/x-3gpp2,video/mediaplayer,uri/mms,uri/mmst,uri/mmsu,uri/pnm,uri/rtsp,uri/rtspt,uri/rtspu,inode/directory,media/bluray_mounted,media/bluray_unmounted,media/cdrom_mounted,media/cdrom_unmounted,media/cd-r_mounted,media/cd-r_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/audiocd,media/blurayvideo,media/dvdvideo,media/svcd,media/vcd
Actions=PlayNext;QueueNext
Encoding=UTF8

@ -1,5 +1,5 @@
[Desktop Entry]
X-TDE-ServiceTypes=audio/mp3,audio/mpeg3,audio/mpeg4,audio/mpg,audio/mpeg,audio/mpegurl,audio/m3u,audio/mp4,audio/wav,video/msvideo,video/mpeg4,video/mpeg,video/x-m4v,video/x-mpeg,video/x-mpeg2,video/mp4,video/x-msmpeg,video/vnd.mpegurl,video/x-mpegurl,video/x-msvideo,video/quicktime,video/x-qtc,audio/x-ms-asf,audio/x-ms-asx,audio/x-ms-wma,audio/x-ms-wax,audio/x-ms-wmp,audio/x-ms-wmv,video/x-ms-asf,video/x-ms-asf-plugin,video/x-ms-asx,video/x-ms-wax,video/x-ms-wmp,video/x-ms-wmv,video/x-ms-wma,video/x-ms-wvx,video/x-ms-wmx,video/x-ms-wm,application/asx,application/x-ms-asf,application/vnd.ms-asf,application/x-ms-wmd,application/x-ms-wmz,audio/scpls,audio/x-scpls,audio/x-pls,audio/vnd.mpegurl,audio/x-mpg,audio/x-mpeg,audio/x-mpeg3,audio/x-mpegurl,audio/x-realaudio,audio/x-pn-realaudio,audio/x-pn-realaudio-plugin,application/x-pn-realaudio,audio/vnd.rn-realaudio,video/x-realvideo,video/x-pn-realvideo,video/vnd.rn-realvideo,video/x-pn-realvideo-plugin,application/vnd.rn-realmedia,application/vnd.rn-realmedia-vbr,application/vnd.rn-realplayer,application/sdp,application/smil,application/x-smil,application/streamingmedia,application/x-streamingmedia,video/nsv,audio/x-mp3,video/x-ogm,video/x-theora,audio/vorbis,audio/x-vorbis,audio/x-oggflac,application/x-ogg,application/ogg,audio/mp1,audio/x-mp1,audio/mp2,audio/x-mp2,audio/x-wav,video/avi,video/x-avi,video/x-divx,video/x-fli,video/x-matroska,audio/x-matroska,application/x-mplayer2,application/x-cda,audio/aac,audio/ac3,audio/basic,audio/m4a,audio/x-aac,audio/x-adpcm,audio/x-flac,audio/x-m3u,audio/x-m4a,audio/x-musepack,audio/x-pn-windows-pcm,video/x-3gpp,video/x-3gpp2,video/mediaplayer,uri/mms,uri/mmst,uri/mmsu,uri/pnm,uri/rtsp,uri/rtspt,uri/rtspu,inode/directory,media/cdrom_mounted,media/cdrom_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/audiocd,media/dvdvideo,media/svcd,media/vcd
X-TDE-ServiceTypes=audio/mp3,audio/mpeg3,audio/mpeg4,audio/mpg,audio/mpeg,audio/mpegurl,audio/m3u,audio/mp4,audio/wav,video/msvideo,video/mpeg4,video/mpeg,video/x-m4v,video/x-mpeg,video/x-mpeg2,video/mp4,video/x-msmpeg,video/vnd.mpegurl,video/x-mpegurl,video/x-msvideo,video/quicktime,video/x-qtc,audio/x-ms-asf,audio/x-ms-asx,audio/x-ms-wma,audio/x-ms-wax,audio/x-ms-wmp,audio/x-ms-wmv,video/x-ms-asf,video/x-ms-asf-plugin,video/x-ms-asx,video/x-ms-wax,video/x-ms-wmp,video/x-ms-wmv,video/x-ms-wma,video/x-ms-wvx,video/x-ms-wmx,video/x-ms-wm,application/asx,application/x-ms-asf,application/vnd.ms-asf,application/x-ms-wmd,application/x-ms-wmz,audio/scpls,audio/x-scpls,audio/x-pls,audio/vnd.mpegurl,audio/x-mpg,audio/x-mpeg,audio/x-mpeg3,audio/x-mpegurl,audio/x-realaudio,audio/x-pn-realaudio,audio/x-pn-realaudio-plugin,application/x-pn-realaudio,audio/vnd.rn-realaudio,video/x-realvideo,video/x-pn-realvideo,video/vnd.rn-realvideo,video/x-pn-realvideo-plugin,application/vnd.rn-realmedia,application/vnd.rn-realmedia-vbr,application/vnd.rn-realplayer,application/sdp,application/smil,application/x-smil,application/streamingmedia,application/x-streamingmedia,video/nsv,audio/x-mp3,video/x-ogm,video/x-theora,audio/vorbis,audio/x-vorbis,audio/x-oggflac,application/x-ogg,application/ogg,audio/mp1,audio/x-mp1,audio/mp2,audio/x-mp2,audio/x-wav,video/avi,video/x-avi,video/x-divx,video/x-fli,video/x-matroska,audio/x-matroska,application/x-mplayer2,application/x-cda,audio/aac,audio/ac3,audio/basic,audio/m4a,audio/x-aac,audio/x-adpcm,audio/x-flac,audio/x-m3u,audio/x-m4a,audio/x-musepack,audio/x-pn-windows-pcm,video/x-3gpp,video/x-3gpp2,video/mediaplayer,uri/mms,uri/mmst,uri/mmsu,uri/pnm,uri/rtsp,uri/rtspt,uri/rtspu,inode/directory,media/bluray_mounted,media/bluray_unmounted,media/cdrom_mounted,media/cdrom_unmounted,media/cd-r_mounted,media/cd-r_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/audiocd,media/blurayvideo,media/dvdvideo,media/svcd,media/vcd
Actions=Play;Queue
Encoding=UTF8
X-TDE-Priority=TopLevel

@ -2402,12 +2402,17 @@ void KPlayerDevicesNode::setupSource (void)
connect (&m_lister, SIGNAL (deleteItem (KFileItem*)), SLOT (removed (KFileItem*)));
TQStringList mimetypes;
mimetypes.append ("media/audiocd");
mimetypes.append ("media/bluray_mounted");
mimetypes.append ("media/bluray_unmounted");
mimetypes.append ("media/cdrom_mounted");
mimetypes.append ("media/cdrom_unmounted");
mimetypes.append ("media/cd-r_mounted");
mimetypes.append ("media/cd-r_unmounted");
mimetypes.append ("media/cd-rw_mounted");
mimetypes.append ("media/cd-rw_unmounted");
mimetypes.append ("media/dvd_mounted");
mimetypes.append ("media/dvd_unmounted");
mimetypes.append ("media/blurayvideo");
mimetypes.append ("media/dvdvideo");
mimetypes.append ("media/svcd");
mimetypes.append ("media/vcd");
@ -2675,8 +2680,9 @@ void KPlayerDevicesNode::refreshItem (KFileItem* item)
kdDebugTime() << " Path " << path << "\n";
#endif
TQString type (item -> mimetype() == "media/audiocd" ? I18N_NOOP("Audio CD")
: item -> mimetype() == "media/dvdvideo" ? "DVD"
: item -> mimetype() == "media/svcd" || item -> mimetype() == "media/vcd" ? I18N_NOOP("Video CD")
: item -> mimetype().startsWith ("media/bluray") ? I18N_NOOP("BLURAY")
: item -> mimetype() == "media/dvdvideo" ? I18N_NOOP("DVD")
: (item -> mimetype() == "media/svcd" || item -> mimetype() == "media/vcd") ? I18N_NOOP("Video CD")
: item -> mimetype().startsWith ("media/dvd") ? I18N_NOOP("Data DVD") : I18N_NOOP("Data CD"));
#ifdef DEBUG_KPLAYER_NODE
kdDebugTime() << " Type " << type << "\n";
@ -3138,6 +3144,8 @@ void KPlayerDiskNode::autodetect (void)
connect (job, SIGNAL(result(TDEIO::Job*)), SLOT(statResult(TDEIO::Job*)));
return;
}
else if ( ! m_fast_autodetect && m_url == "bluray://"
|| m_fast_autodetect && disk() -> type() == "BLURAY" && m_url != "bluray://" )
else if ( ! m_fast_autodetect && m_url == "data://"
|| m_fast_autodetect && disk() -> type() == "Video CD" && m_url != "vcd://" )
m_url = "vcd://";
@ -3252,7 +3260,7 @@ void KPlayerDiskNode::autodetected (void)
kdDebugTime() << "KPlayerDiskNode::autodetected\n";
#endif
TQString type (m_url == "cdda://" ? "Audio CD" : m_url == "dvd://" ? "DVD"
: m_url == "vcd://" ? "Video CD" : disk() -> type());
: m_url == "vcd://" ? "Video CD" : m_url == "bluray://" ? "BLURAY" : disk() -> type());
setDiskType (type);
if ( m_detected_tracks )
disk() -> setTracks (m_detected_tracks);

Loading…
Cancel
Save