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-28

blinkseb Wrote: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...

O, I'll try it. But my development machine is a not-so-speedy Intel Atom 1.6Ghz (the original Asus EEE Box) that I had lying around, so it will take a while. Laugh


- adb76 - 2010-05-28

blinkseb Wrote: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...

Hi Seb,

so I already made a real fresh compile of the dsplayer (svn download to a complete new folder) with VS2010 last evening. Then I deleted my old xbmc installation completely (including the user folder), and manually activated the debug log in guisettings.xml - and r30594 crashed again at the start. Here you will find the debug log http://pastebin.com/2UzKyd7w and the crashlog http://www.megaupload.com/?d=JT8MGOGL

Greetings,
André


- hsinchu308 - 2010-05-28

adb76 Wrote:Hi Seb,

so I already made a real fresh compile of the dsplayer (svn download to a complete new folder) with VS2010 last evening. Then I deleted my old xbmc installation completely (including the user folder), and manually activated the debug log in guisettings.xml - and r30594 crashed again at the start. Here you will find the debug log http://pastebin.com/2UzKyd7w and the crashlog http://www.megaupload.com/?d=JT8MGOGL

Greetings,
André

Yes, I can confirm as well. Just downloaded svn to a new folder, compiled with VC2010, uninstalled and then make sure that XBMC folder under Program Files and XBMC folder under the User/Application Data directory are deleted, then install XBMC. Still crash at the same place.


- blinkseb - 2010-05-28

adb76 Wrote:Hi Seb,

so I already made a real fresh compile of the dsplayer (svn download to a complete new folder) with VS2010 last evening. Then I deleted my old xbmc installation completely (including the user folder), and manually activated the debug log in guisettings.xml - and r30594 crashed again at the start. Here you will find the debug log http://pastebin.com/2UzKyd7w and the crashlog http://www.megaupload.com/?d=JT8MGOGL

Greetings,
André

hsinchu308 Wrote:Yes, I can confirm as well. Just downloaded svn to a new folder, compiled with VC2010, uninstalled and then make sure that XBMC folder under Program Files and XBMC folder under the User/Application Data directory are deleted, then install XBMC. Still crash at the same place.

After two hours, I wasn't be able to find the reason of the crash. Maybe some of you can help me :

I've introduced a new proprocessor define, HAS_DS_PLAYER, in order to be able to build xbmc without DSPlayer (a request from spdiff :p). Fun things,if you build latest dsplayer rev without the HAS_DS_PLAYER define (in the Preprocessor fiels on XBMC project properties), no crash, it works fine.
If you define HAS_DS_PLAYER, it builds fine, but it crashes.

Technical part :
It crashes on a std::vector::push_back(). It's nearly impossible that vector::push_back() crashes, so it's a memory corruption problem somewhere. I'll investigate a bit more this afternoon (it's 10 am here) because there's no reason for crashing :p

EDIT: Great news, it's fixed. For those interested, HAS_DS_PLAYER was not defined for guilib project. So, two differents class definitions was linked together, so, big mess and crash! It's fixed now Smile


- adb76 - 2010-05-28

blinkseb Wrote:EDIT: Great news, it's fixed. For those interested, HAS_DS_PLAYER was not defined for guilib project. So, two differents class definitions was linked together, so, big mess and crash! It's fixed now Smile

So I've recompiled and installed it - and it works really great. First I had some stuttering with 1080p mkv's. Then I've defined the "dsrenderersettings.xml" with the following content:

Code:
<dsrenderersettings>
  <sharedsettings>
    <VSync>false</VSync>
  </sharedsettings>
  <evrsettings>
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>

And now I've automatic switch of the refresh rate and really smooth playback! Great. Many thanks to the team!!!


- Nedder - 2010-05-28

Don't you get tearing with vsync disabled?


- hsinchu308 - 2010-05-28

Nedder Wrote:Don't you get tearing with vsync disabled?

Not if you are running under Windows 7, with Aero (desktop composition) enabled, and fake full screen. When I run MPC-HC as an external player under Win7 w/Aero, I disable all sync as well and don't get any tearing. Too many vsync algorithms running together can cause dropped frames and/or stuttering.


- rickardkk - 2010-05-28

adb76 Wrote:So I've recompiled and installed it - and it works really great. First I had some stuttering with 1080p mkv's. Then I've defined the "dsrenderersettings.xml" with the following content:

Code:
<dsrenderersettings>
  <sharedsettings>
    <VSync>false</VSync>
  </sharedsettings>
  <evrsettings>
  </evrsettings>
  <vmr9settings>
    
  </vmr9settings>
</dsrenderersettings>

And now I've automatic switch of the refresh rate and really smooth playback! Great. Many thanks to the team!!!

Perfect playback here to (with the setting above). But it hangs on enabling the HTTP API/webserver (not broken in latest main branch build 30621) and sometimes on skiping.

Playback is smooth!! Great work!!


- zilexa - 2010-05-28

Hi Seb, didn't had time to test anymore unfortunately but I see there has been development. Might be best for me to wait for a new build? to test mpcvideodec further on WinXP?


- blinkseb - 2010-05-28

zilexa Wrote:Hi Seb, didn't had time to test anymore unfortunately but I see there has been development. Might be best for me to wait for a new build? to test mpcvideodec further on WinXP?

Testing under XP is a bit dangerous right now :p I need some times to find why there's a crash whi the auto refresh rate feature Smile

Oh, I won't be available tomorrow, I'll get some fun at Europapark (http://www.europapark.de/lang-en/Home/c51.html) !

But sunday I think I'll have some free time, even if it's Mother's Day here in France.

Anyway, it's interessting that disabling vsync actually make the render better, but why not! A new think to look at :p


- ten8Epee - 2010-05-28

blinkseb Wrote: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


Geez man, were you having a bad day? No need to take offense as if I called your child an ugly snot eater... I have been u sing XBMC from the very beginning and have am deeply grateful for everything these people do here. I dont believe expressing my feelings on the aesthetics of a skin as being a spiteful and rude remark. In fact, I didn't necessarily even mean to call the default skins ugly... I was just trying to figure out if this is a known problem.

Anyways, for some reason when I used the installer in the OP it must have made some type of conflict because I would put skins in the proper folders and it just wouldn't show. I thought perhaps the skins were not supported or something. Even after a clean install it wouldn't work.


- rickardkk - 2010-05-28

blinkseb Wrote:Anyway, it's interessting that disabling vsync actually make the render better, but why not! A new think to look at :p

Night and day when using 23.976Hz refresh rate. Just as smooth as MPC-HC when vsync is disabled in the dsrenderersettings. Actually playback is near perfect now!!

Four problems encountered though:

1. Sometimes (can't reproduce at will) when starting playback the frame rate is at 4.0 fps (right after the refresh rate change). And it stays there until you do a small skip forward. After that it starts playback at the correct frame rate. Don't think this is of any help, but here is the debug log: http://pastebin.com/9tJSR3Pp
Have only been able to reproduce this when the "match refreshrate/framerate" option is enabled.

2. Skipping (backwards/forwards) does crash XBMC quite often.
Log: http://pastebin.com/qPMBhTV5
Dump: http://www.earselect.se/test/skipping.dmp

3. 50fps/25fps mks can't be played it seems. Tested alot of them and I always get the same message in the log:
http://pastebin.com/RCusccFr

4. Videos with non square pixels are not displayed with the correct AR. DVDPlayer displays them with correct AR (in Normal "zoom" mode)

Windows 7 32-bit
XBMC 30642
(Fullscreen windows rather than true...." option enabled


- hsinchu308 - 2010-05-29

rickardkk Wrote:Night and day when using 23.976Hz refresh rate. Just as smooth as MPC-HC when vsync is disabled in the dsrenderersettings. Actually playback is near perfect now!!

Four problems encountered though:

1. Sometimes (can't reproduce at will) when starting playback the frame rate is at 4.0 fps (right after the refresh rate change). And it stays there until you do a small skip forward. After that it starts playback at the correct frame rate. Don't think this is of any help, but here is the debug log: http://pastebin.com/9tJSR3Pp
Have only been able to reproduce this when the "match refreshrate/framerate" option is enabled.

2. Skipping (backwards/forwards) does crash XBMC quite often.
Log: http://pastebin.com/qPMBhTV5
Dump: http://www.earselect.se/test/skipping.dmp

3. 50fps/25fps mks can't be played it seems. Tested alot of them and I always get the same message in the log:
http://pastebin.com/RCusccFr

4. Videos with non square pixels are not displayed with the correct AR. DVDPlayer displays them with correct AR (in Normal "zoom" mode)

Windows 7 32-bit
XBMC 30642
(Fullscreen windows rather than true...." option enabled

#4 has been observed and reported by a few people, including myself.

Anyway, I spent some time and finally found a fix. Tested it on camcorder videos that are in 720x480 resolution (AR 3:2). Before the fix they are always displayed in AR 3:2, in "Normal" zoom mode, though they should be either 4:3 or 16:9 AR, and after the fix they are displayed correctly, just like in dvdplayer. Also tested other files that have non-square pixels in other video resolutions beside 720x480, and they also displayed correctly, like in dvdplayer.

So far I've only test on VMR9 and not EVR, using r30642, because my windows XP crashes with BSOD when I use EVR.

The fix: Change line 660 in VMR9AllocatorPresentor.cpp
from:
g_renderManager.Configure(m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_fps,
CONF_FLAGS_FULLSCREEN);
to:
g_renderManager.Configure(m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_AspectRatio.cx, m_AspectRatio.cy, m_fps,
CONF_FLAGS_FULLSCREEN);

Do the same thing for line 1672 in EVRAllocatorPresenter.cpp (NOT tested yet).


- zilexa - 2010-05-29

hsinchu308 Wrote:So far I've only test on VMR9 and not EVR, using r30642, because my windows XP crashes with BSOD when I use EVR.

WinXP doesn't have EVR so that is normal Smile XP has VMR9, Vista/Win7 have EVR.
Each have their own DXVA specs, VMR9 has 1.0 spec and EVR has 2.0 spec.

Do you test using the MPC Video decoder? On WinXP 32bit? Does any video (like mpeg4 or h264 or mpeg2/dvd) play correctly?


- rickardkk - 2010-05-29

Great. I will test it on EVR as soon as I get it to compile. Are blinkseb aware of this patch?