2007-12-27, 12:23
nope, but i tend to agree. might switch it back to dvdplayer.
petejo Wrote:I think what Captain Obvious says is a good idea but he kinda didn't 'ask' did he!I kinda did.
Index: xbmc/cores/PlayerCoreFactory.cpp
===================================================================
--- xbmc/cores/PlayerCoreFactory.cpp (revision 13158)
+++ xbmc/cores/PlayerCoreFactory.cpp (working copy)
@@ -40,6 +40,7 @@
#include "URL.h"
#include "GUIWindowManager.h"
#include "FileItem.h"
+#include "Settings.h"
using namespace AUTOPTR;
@@ -218,10 +219,17 @@
//Add all normal players last so you can force them, should you want to
if( item.IsVideo() || item.IsAudio() )
{
- vecCores.push_back(EPC_MPLAYER);
-
- vecCores.push_back(EPC_DVDPLAYER);
-
+
+ if ( g_advancedSettings.m_defaultVideoPlayer == "DVDPlayer" )
+ {
+ vecCores.push_back(EPC_DVDPLAYER);
+ vecCores.push_back(EPC_MPLAYER);
+ }
+ else
+ {
+ vecCores.push_back(EPC_MPLAYER);
+ vecCores.push_back(EPC_DVDPLAYER);
+ }
if( item.IsAudio())
vecCores.push_back(EPC_PAPLAYER);
}
Index: xbmc/Settings.cpp
===================================================================
--- xbmc/Settings.cpp (revision 13158)
+++ xbmc/Settings.cpp (working copy)
@@ -139,6 +139,7 @@
g_advancedSettings.m_videoPercentSeekForwardBig = 10;
g_advancedSettings.m_videoPercentSeekBackwardBig = -10;
g_advancedSettings.m_videoBlackBarColour = 1;
+ g_advancedSettings.m_defaultVideoPlayer = "MPlayer";
g_advancedSettings.m_slideshowPanAmount = 2.5f;
g_advancedSettings.m_slideshowZoomAmount = 5.0f;
@@ -1063,6 +1064,8 @@
GetInteger(pElement, "percentseekforwardbig", g_advancedSettings.m_videoPercentSeekForwardBig, 10, 0, 100);
GetInteger(pElement, "percentseekbackwardbig", g_advancedSettings.m_videoPercentSeekBackwardBig, -10, -100, 0);
GetInteger(pElement, "blackbarcolour", g_advancedSettings.m_videoBlackBarColour, 1, 0, 255);
+ GetString(pElement, "defaultplayer", g_advancedSettings.m_defaultVideoPlayer, "MPlayer");
+
}
pElement = pRootElement->FirstChildElement("musiclibrary");
Index: xbmc/Settings.h
===================================================================
--- xbmc/Settings.h (revision 13158)
+++ xbmc/Settings.h (working copy)
@@ -141,6 +141,7 @@
int m_videoPercentSeekForwardBig;
int m_videoPercentSeekBackwardBig;
int m_videoBlackBarColour;
+ CStdString m_defaultVideoPlayer;
float m_slideshowBlackBarCompensation;
float m_slideshowZoomAmount;
captain_obvious Wrote:Awesome, now the optimal result would be where the DVDPlayer and MPlayer get's selected depending on the input file, as I guess each player has it's advantages and disadvantages (I guess this is why the MPlayer is still there?)
captain_obvious Wrote:I guess each player has it's advantages and disadvantages (I guess this is why the MPlayer is still there?)Yes, MPlayer has one 'major' feature which stands out as our DVDPlayer does not yet have that feature, and that is the ability to load and use proprietary closed source binary DLL decoder codecs for those few decoder codecs that FFmpeg does not yet support naively, (such as for WMV9, WMA9, RealMedia/RealAudio/RealVideo, VP4/VP5/VP6, and QuickTime audio). FFmpeg is by the way the open source codec suit that XBMC uses to decode most video and audio formats out there, ...and the amount of codecs that FFmpeg supports grows each year.
Gamester17 Wrote:Yes, MPlayer has one 'major' feature which stands out as our DVDPlayer does not yet have that feature, and that is the ability to load and use proprietary closed source binary DLL decoder codecs for those few decoder codecs that FFmpeg does not yet support naively, (such as for WMV9, WMA9, RealMedia/RealAudio/RealVideo, VP4/VP5/VP6, and QuickTime audio). FFmpeg is by the way the open source codec suit that XBMC uses to decode most video and audio formats out there, ...and the amount of codecs that FFmpeg supports grows each year.So why does it handle XVID files and so on? Are there any advantages with these formats since MPlayer handles them?
captain_obvious Wrote:Maybe code from the OS application "G-Spot" codec detector could be used?GSpot is not open source, but I have make a similar request myself for MediaInfo support and that is open source.