Kodi Community Forum
[WINDOWS] Internal Directshow Based Player [NO LONGER DEVELOPED] - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: [WINDOWS] Internal Directshow Based Player [NO LONGER DEVELOPED] (/showthread.php?tid=61355)



- hsinchu308 - 2010-05-26

blinkseb Wrote:It's surely related to dsplayer. There're some options to control vsync, not yet on the gui (soon Wink) and activated by default on this release (were off before). I think it affects people on differents ways.

You can try that :
Create a file named "dsconfig.xml" on your userdata folder, and put that into it
Code:
<dsplayersettings>
  <VMR9VSync>true</VRM9VSync>
  <VMR9VSyncAccurate>true</VMR9VSyncAccurate>
  <VMRFlushGPUBeforeVSync>true</VMRFlushGPUBeforeVSync>
</dsplayersettings>

You can set the options true or false.


Hi seb,

FYI:
I tried putting the above lines into dsconfig.xml and store it in my userdata directory (according to the xbmc.log that's where special://masterprofile/ is mapped to), but it does not seem to work. I tried to turn off VMR9VsyncAccurate but in the Stats screen accurate vsync is still enabled.

As a test, I put some random characters before dsplayersettings, like XYZdisplayersettings, which, according to a quick glance at rendersettings.cpp, should generate a "Doesn't contain <dsplayersettings>" error in the xbmc log, but it does not, so it seem that the file is not been read somehow.

I am using Windows XP SP3, VMR9 renderer instead of EVR.


- blinkseb - 2010-05-26

hsinchu308 Wrote:Hi seb,

FYI:
I tried putting the above lines into dsconfig.xml and store it in my userdata directory (according to the xbmc.log that's where special://masterprofile/ is mapped to), but it does not seem to work. I tried to turn off VMR9VsyncAccurate but in the Stats screen accurate vsync is still enabled.

As a test, I put some random characters before dsplayersettings, like XYZdisplayersettings, which, according to a quick glance at rendersettings.cpp, should generate a "Doesn't contain <dsplayersettings>" error in the xbmc log, but it does not, so it seem that the file is not been read somehow.

I am using Windows XP SP3, VMR9 renderer instead of EVR.

Thanks! I'll look at it Smile You're right, you should see a "Doesn't contain blablabla" in the log.

Anyway, the XML file i've given you is wrong, it missed a tag. A correct one would be :
Code:
<dsplayersettings>
  <videorenderers>
    <VMR9VSync>true</VMR9VSync>
    <VMR9VSyncAccurate>true</VMR9VSyncAccurate>
    <VMRFlushGPUBeforeVSync>true</VMRFlushGPUBeforeVSync>
  </videorenderers>
</dsplayersettings>

I'll try to make it works quickly Wink

EDIT: It's fixed on my side, code was soo buggy. I make some tests and commit the changes.


- hsinchu308 - 2010-05-26

blinkseb Wrote:Thanks! I'll look at it Smile You're right, you should see a "Doesn't contain blablabla" in the log.

Anyway, the XML file i've given you is wrong, it missed a tag. A correct one would be :
Code:
<dsplayersettings>
  <videorenderers>
    <VMR9VSync>true</VMR9VSync>
    <VMR9VSyncAccurate>true</VMR9VSyncAccurate>
    <VMRFlushGPUBeforeVSync>true</VMRFlushGPUBeforeVSync>
  </videorenderers>
</dsplayersettings>

I'll try to make it works quickly Wink

EDIT: It's fixed on my side, code was soo buggy. I make some tests and commit the changes.

Cool! Maybe I can trouble you for one more thing.Laugh Right now for videos that don't use square pixels (i.e., a lot of the SD videos use 720x480 resolution, or 3:2 ratio, but actually need to be displayed in either 4:3 or 16:9 aspect ratio), the "NORMAL" view mode in dsplayer displays the video in square pixels, requiring the user to switch to either the "stretch 4:3" mode, or "stretch 16:9" mode to display the correct video aspect ratio. If the video is in some other aspect ratio, like 14x9, then you need to adjust the pixel ratio on the OSD. On the other hand, dvdplayer in "NORMAL" view mode uses the correct aspect ratio stored in the video file header (I use MediaInfo to look), so no mode switching or pixel ratio adjustment is needed. I've narrowed down the calculation of the pixel aspect ratio for the dsplayer in "NORMAL" mode to BaseRenderer::SetViewMode in BaseRenderer.cpp. But I need to know where dsplayer stores the "display aspect ratio" (target aspect ratio) that it reads from video file headers.

OTOH, if you prefer to tackle this yourself that's fine with me too. Nod


- blinkseb - 2010-05-26

hsinchu308 Wrote:Cool! Maybe I can trouble you for one more thing.Laugh Right now for videos that don't use square pixels (i.e., a lot of the SD videos use 720x480 resolution, or 3:2 ratio, but actually need to be displayed in either 4:3 or 16:9 aspect ratio), the "NORMAL" view mode in dsplayer displays the video in square pixels, requiring the user to switch to either the "stretch 4:3" mode, or "stretch 16:9" mode to display the correct video aspect ratio. If the video is in some other aspect ratio, like 14x9, then you need to adjust the pixel ratio on the OSD. On the other hand, dvdplayer in "NORMAL" view mode uses the correct aspect ratio stored in the video file header (I use MediaInfo to look), so no mode switching or pixel ratio adjustment is needed. I've narrowed down the calculation of the pixel aspect ratio for the dsplayer in "NORMAL" mode to BaseRenderer::SetViewMode in BaseRenderer.cpp. But I need to know where dsplayer stores the "display aspect ratio" (target aspect ratio) that it reads from video file headers.

OTOH, if you prefer to tackle this yourself that's fine with me too. Nod

You need to know that dsplayer doesn't read the media file itself. Each available informations come from DirectShow and the filters.

AFAIK, the aspect ratio is calculated with display width / height. But, since I'm not sure what you're looking for (:p), you'll find everything you need in DX9AllocatorPresenter.cpp, EVRAllocatorPresenter.cpp and VMR9AllocatorPresenter.cpp. The DX9AllocatorPresenter:Tongueaint may be the more important (drawing is done here).

Hope you'll find what you're looking for, I'm not very aware of these aspect ratio things Confused

Since r30589, things have changed a little bit. Now, to tweak the renderer settings, you need to create a XML file in your userdata folder named dsrenderersettings.xml, with the following structure :
Code:
<dsrenderersettings>
  <sharedsettings>
    
  </sharedsettings>
  <evrsettings>
    
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>

As you can easily understand, there're three categories. The first one contains settings shared by the two renderers. The two others settings for each renderer. You can find a list of what setting you can tweak here : http://trac.xbmc.org/browser/branches/dsplayer/xbmc/cores/DSPlayer/Filters/RendererSettings.cpp, starting at line 103. You can see default values here : http://trac.xbmc.org/browser/branches/dsplayer/xbmc/cores/DSPlayer/Filters/RendererSettings.h (SetDefault methods).

If someone wants to document theses settings on the wiki, feel welcomed!

An example :
Code:
<dsrenderersettings>
  <sharedsettings>
    <VSync>false</VSync>
  </sharedsettings>
  <evrsettings>
    <HighColorResolution>true</HighColorResolution>
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>



- gulp - 2010-05-26

with a clean installation of rev 30589,
xbmc doesn't start, in log i've:
Code:
16:04:20 T:3844 M:2521030656  NOTICE: Loading player core factory settings from special://profile/playercorefactory.xml.
16:04:20 T:3844 M:2521014272  NOTICE: Loaded playercorefactory configuration
16:04:20 T:3844 M:2521014272  NOTICE: No advancedsettings.xml to load (special://masterprofile/advancedsettings.xml)
16:04:20 T:3844 M:2521014272  NOTICE: Default DVD Player: dvdplayer
16:04:20 T:3844 M:2521014272  NOTICE: Default Video Player: dvdplayer
16:04:20 T:3844 M:2521014272  NOTICE: Default Audio Player: paplayer
16:04:20 T:3844 M:2521042944  NOTICE: Loading media sources from special://masterprofile/sources.xml
16:04:22 T:3844 M:2499248128  NOTICE: initializing playlistplayer
16:04:22 T:3844 M:2499248128  NOTICE: DONE initializing playlistplayer
16:04:22 T:3844 M:2499260416   ERROR: Default skin 'skin.confluence' not found! Terminating..

obviously /addons/skin.confluence exist and is populated


- furii - 2010-05-26

offline_thk Wrote:No idea? Huh

sigh Rolleyes

http://xbmc.org/theuni/2010/03/01/impending-merge-addons/
http://xbmc.org/theuni/2010/04/27/state-of-the-addons/


- blinkseb - 2010-05-26

gulp Wrote:with a clean installation of rev 30589,
xbmc doesn't start, in log i've:
Code:
16:04:20 T:3844 M:2521030656  NOTICE: Loading player core factory settings from special://profile/playercorefactory.xml.
16:04:20 T:3844 M:2521014272  NOTICE: Loaded playercorefactory configuration
16:04:20 T:3844 M:2521014272  NOTICE: No advancedsettings.xml to load (special://masterprofile/advancedsettings.xml)
16:04:20 T:3844 M:2521014272  NOTICE: Default DVD Player: dvdplayer
16:04:20 T:3844 M:2521014272  NOTICE: Default Video Player: dvdplayer
16:04:20 T:3844 M:2521014272  NOTICE: Default Audio Player: paplayer
16:04:20 T:3844 M:2521042944  NOTICE: Loading media sources from special://masterprofile/sources.xml
16:04:22 T:3844 M:2499248128  NOTICE: initializing playlistplayer
16:04:22 T:3844 M:2499248128  NOTICE: DONE initializing playlistplayer
16:04:22 T:3844 M:2499260416   ERROR: Default skin 'skin.confluence' not found! Terminating..

obviously /addons/skin.confluence exist and is populated

Weird. If you're running from VS, have you defined the XBMC_HOME environment variable in the debugging section ?


- gulp - 2010-05-26

blinkseb Wrote:Weird. If you're running from VS, have you defined the XBMC_HOME environment variable in the debugging section ?

Recompiled...now all ok, thank you, as always!!


- ten8Epee - 2010-05-27

Sorry if this has been discussed throughout the numerous pages...but after installation for some reason I am limited to only PM.3 and Confluence Skins. How do I get my custom skin back (Rapier)?

I had it working with the previous release but I just updated to the newest release here and I am now stuck with the ugly default skins Sad


- blinkseb - 2010-05-27

ten8Epee Wrote:Sorry if this has been discussed throughout the numerous pages...but after installation for some reason I am limited to only PM.3 and Confluence Skins. How do I get my custom skin back (Rapier)?

That's not related to dsplayer.
Now skins are addons, you have to wait that your favorite skin is adapted to the new system addon. If you can't wait, you need to copy your skin in the addons folder, and rename it "skin.<yournamehere>" and create a addon.xml based on the addon.xml from the confluence skin.

EDIT:
Quote:I had it working with the previous release but I just updated to the newest release here and I am now stuck with the ugly default skins :

That's kind of opinion is yours. So, keep it for yourself please. I think you can be more grateful to people who make a *HARD* work to give you the best experience. You don't like the default skin, it's alright. But it's certainly not ugly. Thanks


- hsinchu308 - 2010-05-27

blinkseb Wrote:You need to know that dsplayer doesn't read the media file itself. Each available informations come from DirectShow and the filters.

AFAIK, the aspect ratio is calculated with display width / height. But, since I'm not sure what you're looking for (:p), you'll find everything you need in DX9AllocatorPresenter.cpp, EVRAllocatorPresenter.cpp and VMR9AllocatorPresenter.cpp. The DX9AllocatorPresenter:Tongueaint may be the more important (drawing is done here).

Hope you'll find what you're looking for, I'm not very aware of these aspect ratio things Confused

Since r30589, things have changed a little bit. Now, to tweak the renderer settings, you need to create a XML file in your userdata folder named dsrenderersettings.xml, with the following structure :
Code:
<dsrenderersettings>
  <sharedsettings>
    
  </sharedsettings>
  <evrsettings>
    
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>

As you can easily understand, there're three categories. The first one contains settings shared by the two renderers. The two others settings for each renderer. You can find a list of what setting you can tweak here : http://trac.xbmc.org/browser/branches/dsplayer/xbmc/cores/DSPlayer/Filters/RendererSettings.cpp, starting at line 103. You can see default values here : http://trac.xbmc.org/browser/branches/dsplayer/xbmc/cores/DSPlayer/Filters/RendererSettings.h (SetDefault methods).

If someone wants to document theses settings on the wiki, feel welcomed!

An example :
Code:
<dsrenderersettings>
  <sharedsettings>
    <VSync>false</VSync>
  </sharedsettings>
  <evrsettings>
    <HighColorResolution>true</HighColorResolution>
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>

Hi Seb,

Wanted to try out the new setting so updated to r30594 and compiled using VC2010 (VC2008 gives me undefined ref when linking xbmc.exe), but xbmc crashed during startup.

Here's the pastebin debug log:
http://pastebin.com/HJ82JGNU

Regards,

EDIT: I did a clean install, and removed the userdata settings in the Application Data\XBMC directory


- rickardkk - 2010-05-27

Great work with the DSPlayer branch.

I have a hard time to get fluid playback when automatically setting the refresh rate to match the frame rate though. Using the same codecs in MPC-HC or Media Portal will give smooth playback without any stutter (using ReClock). But here I get like sporadic stutters.

Are you aware of this (I've seen it mentioned in the thread earlier) or should I post a debug log and samples?


- tschi - 2010-05-27

rickardkk Wrote:Great work with the DSPlayer branch.

I have a hard time to get fluid playback when automatically setting the refresh rate to match the frame rate though. Using the same codecs in MPC-HC or Media Portal will give smooth playback without any stutter (using ReClock). But here I get like sporadic stutters.

Are you aware of this (I've seen it mentioned in the thread earlier) or should I post a debug log and samples?
with the last build, you can check stats like ctr+J in mpc hc. You have to enable it in video settings during playback. There is some desynchro even if I use reclock. I check with h264, wmv, xvid, dxva.
I can see also the framerate (with XBMC info) is not stable and it change between 24,5 and 26 for 25hz video. With DVDPLAYER there is also some varations but with a quite small interval (24,9hz to 25,1hz)
In the new dsrenderersettings.xml, it will be possible to disable "EnableFrameTimeCorrection" and many others parameters. I guess and hope it will correct this issue.
Just wait the futur build Cool


- blinkseb - 2010-05-27

hsinchu308 Wrote:Hi Seb,

Wanted to try out the new setting so updated to r30594 and compiled using VC2010 (VC2008 gives me undefined ref when linking xbmc.exe), but xbmc crashed during startup.

Here's the pastebin debug log:
http://pastebin.com/HJ82JGNU

Regards,

EDIT: I did a clean install, and removed the userdata settings in the Application Data\XBMC directory

Ok so it's not only on my side. r30594 messed with something and I don't know why. Please stay below until I found why it crashes ... If you have some times, can you try with a really clean build? (I mean delete the folder, checkout and build) Maybe it's because it's linking against outdated lib, I don't know...


- sentinel41 - 2010-05-28

edit: wrong thread.