8 sec delay for Directsound!!? (1 Viewer)

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
Frustrating... I cannot understand why I get such a long delay when Directsound is added to the graph.
Anyone else?

2008-05-11 11:44:08.052633 [Info.][MPMain]: add filter: Default DirectSound Device to graph clock:True
2008-05-11 11:44:08.053610 [Info.][MPMain]: DirectShowUtils: found renderer - Default DirectSound Device
2008-05-11 11:44:16.888982 [Info.][MPMain]: DirectShowUtils: Passed removing audio renderer
2008-05-11 11:44:16.889958 [Info.][MPMain]: DirectShowUtils: Passed finding Audio Renderer
2008-05-11 11:44:16.890935 [Debug][MPMain]: added filter: Default DirectSound Device to graph




TV-Server Version: Latest SVN
MediaPortal Version: Latest SVN
MediaPortal Skin: Xface
Windows Version: Vista Ultimate 32
CPU Type: Intel P4 2600MHz
HDD: WD 320 GB
Memory: 1024 MB SDRAM DDR 400
Motherboard: MSI MS-6728
Video Card: Nvidia Geforce 7600 GS
Video Card Driver: 7.15.11.6925
Sound Card: Realtek AC97
Sound Card AC3:
Sound Card Driver: 6.0.1.6243
1. TV Card: Terratec Cinergy 1400DVB-T
1. TV Card Type: DVB-T
1. TV Card Driver: 5.0.18.0
2. TV Card: Lifeview USB
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Microsoft
MPEG2 Audio Codec: Microsoft
h.264 Video Codec:
Satelite/CableTV Provider:
HTPC Case: ATX
Cooling:
Power Supply: Etasis 0dB fanless
Remote: Logitech Harmony 895
TV: Samsung 46 LCD
TV - HTPC Connection: Component
 

iosub

Portal Pro
April 26, 2006
572
30
San Sebastian
Hi
Thanks to swede, I think I have found a possible problem and a Fix for "No responding window"
On
TsReaderPlayer
Line 366 there is a code
if (strAudioRenderer.Length > 0)
_audioRendererFilter = DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudioRenderer, true);


and running in Debug mode I have seen that the line takes more that 2 sec to run.. (and creates the NoResponding Window)

So I have go inside DirectshowUtil.cs and check:
public static IBaseFilter AddAudioRendererToGraph(IGraphBuilder graphBuilder, string strFilterName, bool setAsReferenceClock)

On line 150 there is this code
NewFilter = (IBaseFilter)Marshal.BindToMoniker(filter.MonikerString);
this code takess long time to run..

so I have change to:
System.Windows.Forms.Application.DoEvents();
NewFilter = (IBaseFilter)Marshal.BindToMoniker(filter.MonikerString);
applicaction

I have also change the "audiorender of DVD, TV and Movies" from "default directshow" to "Realtek Digital Output" and ... NO MORE "No responding Windows", Starting TV, moving from One TvCard to another card or Starting a DVD.. also, the MP is not minimized so the desktop is not show.

Hope this helps!!

Iosu

If anyone ones to try.... I have the core.dll

This is for build 19104
 

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
Great Iosub!

I just happend to notice that you too had a delay when "DirectShowUtils: Passed removing audio renderer" in a previous log here: https://forum.team-mediaportal.com/support-106/dvr-ms-ffdshow-30408/. My delay is 8 sec for this and I have seen one with 19 sec! here: https://forum.team-mediaportal.com/general-support-51/start-change-tuner-slow-38231/.

I'll test your fix now!

... Hmm, I can't find 19104. Highest I see is 19069?


Tried it anyway...

Not working as I would like...
The real problem (for me) (I think) is the time it takes when DirectShowUtils removes audio renderer. The fix made no difference there :(

Without fix:
2008-05-15 12:27:03.630344 [Info.][MPMain]: DirectShowUtils: found renderer - Realtek Digital Output (Realtek
2008-05-15 12:27:11.674751 [Info.][MPMain]: DirectShowUtils: Passed removing audio renderer
2008-05-15 12:27:11.675727 [Info.][MPMain]: DirectShowUtils: Passed finding Audio Renderer

With fix:
2008-05-15 12:32:17.806524 [Info.][MPMain]: DirectShowUtils: found renderer - Realtek Digital Output (Realtek
2008-05-15 12:32:26.260085 [Info.][MPMain]: DirectShowUtils: Passed removing audio renderer
2008-05-15 12:32:26.260085 [Info.][MPMain]: DirectShowUtils: Passed finding Audio Renderer
 

iosub

Portal Pro
April 26, 2006
572
30
San Sebastian
Swede

What audiorender have you set on the configuration??

"Default directShow"
"Realtek Digital Output"
I can't make more debug here at the office, but I will do more at home, I think that if we speedup the removing the audio render we maybe aliviate a litle bit the "no more responce window"
Iosu

Test19104.zip I have create a new files with morelogs.. (I can not test then now) can you test then a post the results?)
SecondTest.zip (I have change the code...Now does Not remove the AudioRender it just Add a newone, you have to set on config an audiorender that is not the Default, can you test it?)
Also


Thanks
 

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
OK Iosu:

Test19104 generated:
2008-05-15 16:12:34.822427 [Info.][MPMain]: DirectShowUtils: found renderer - Realtek Digital Output (Realtek
2008-05-15 16:12:34.835121 [Info.][MPMain]: TvNotify:LoadNotifies
2008-05-15 16:12:34.840004 [Info.][MPMain]: TvNotify: 0 notifies
2008-05-15 16:12:34.840980 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:34.842933 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:34.843910 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:37.490225 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:37.493154 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default DirectSound Device
2008-05-15 16:12:37.495107 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default DirectSound Device
2008-05-15 16:12:37.495107 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default WaveOut Device
2008-05-15 16:12:37.497060 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default WaveOut Device
2008-05-15 16:12:37.498037 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:37.499013 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:37.499990 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:37.501943 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:37.501943 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:39.484238 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:39.485214 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default DirectSound Device
2008-05-15 16:12:39.486191 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default DirectSound Device
2008-05-15 16:12:39.487167 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default WaveOut Device
2008-05-15 16:12:39.489120 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default WaveOut Device
2008-05-15 16:12:39.490097 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:39.491073 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:39.492050 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:39.494003 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:39.494003 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:41.437238 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:41.438214 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default DirectSound Device
2008-05-15 16:12:41.440167 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default DirectSound Device
2008-05-15 16:12:41.440167 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default WaveOut Device
2008-05-15 16:12:41.442120 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default WaveOut Device
2008-05-15 16:12:41.443097 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:41.445050 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:41.445050 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:41.447003 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:41.449932 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:43.452734 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:43.453710 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default DirectSound Device
2008-05-15 16:12:43.454687 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default DirectSound Device
2008-05-15 16:12:43.455663 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default WaveOut Device
2008-05-15 16:12:43.457616 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default WaveOut Device
2008-05-15 16:12:43.458593 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:43.459569 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:43.460546 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:43.462499 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Realtek Digital Output (Realtek
2008-05-15 16:12:43.463475 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:45.363744 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender CyberLink Audio Renderer (PDVD7.x)
2008-05-15 16:12:45.364721 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default DirectSound Device
2008-05-15 16:12:45.366674 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default DirectSound Device
2008-05-15 16:12:45.366674 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender Default WaveOut Device
2008-05-15 16:12:45.368627 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender Default WaveOut Device
2008-05-15 16:12:45.370580 [Info.][MPMain]: DirectShowUtils: (iosu) Start Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:45.375462 [Info.][MPMain]: DirectShowUtils: (iosu) Finish Removing AudioRender DirectSound: Realtek Digital Output (Realtek AC'97 Audio)
2008-05-15 16:12:45.376439 [Info.][MPMain]: DirectShowUtils: Passed removing audio renderer



Maybe Cyberlink is the bad boy somehow?

SecondTest generated:

2008-05-15 16:21:18.966960 [Info.][MPMain]: VMR9: added EVR Renderer to graph
2008-05-15 16:21:19.129059 [Debug][MPMain]: VMR9: Now active
2008-05-15 16:21:19.130036 [Debug][MPMain]: VMR9: Renderer successfully added
2008-05-15 16:21:19.131012 [Info.][MPMain]: TSReaderPlayer: add codecs
2008-05-15 16:21:21.825176 [Info.][MPMain]: added filter:Microsoft MPEG-2 Video Decoder to graph
2008-05-15 16:21:22.204058 [Info.][MPMain]: added filter:CyberLink H.264/AVC Decoder (PDVD7.x) to graph
2008-05-15 16:21:22.213823 [Info.][MPMain]: added filter:MPA Decoder Filter to graph
2008-05-15 16:21:22.219682 [Info.][MPMain]: added filter:MONOGRAM AAC Decoder to graph
2008-05-15 16:21:22.234329 [Info.][MPMain]: DirectShowUtils: IOSU First Try Insert new Audio Renderer Realtek Digital Output (Realtek
2008-05-15 16:21:22.235306 [Info.][MPMain]: DirectShowUtils: Passed finding Audio Renderer
2008-05-15 16:21:22.249953 [Debug][MPMain]: added filter:Realtek Digital Output (Realtek to graph
2008-05-15 16:21:22.252883 [Debug][MPMain]: setAsReferenceClock sync source No DX Error
2008-05-15 16:21:22.264601 [Info.][MPMain]: TSReaderPlayer:add TsReader to graph

AND WOW!!! YOU DID IT!!! NO DELAY!!!
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,052
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Another side effect of this is no dropping back to desktop in Vista whilst waiting for live TV to start.

    Downside is changing volume now happens in slow motion.

    edit: volume now seems ok
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    iosub, looks like you have managed to find a source one specific use case (bug in this case) that causes "program not responding" message. Unfortunately the actual issue lies much deeper in the MP design. The actual reason for the "program not responding" is that MP is running a lot of syncronous code in the main thread and when that thread gets blocked for too long (5 seconds) Windows decides that the program is not responding (same is happening under XP, but its just not show as visible to the user, but you can see that happening from Task Manager).
     

    iosub

    Portal Pro
    April 26, 2006
    572
    30
    San Sebastian
    iosub, looks like you have managed to find a source one specific use case (bug in this case) that causes "program not responding" message. Unfortunately the actual issue lies much deeper in the MP design. The actual reason for the "program not responding" is that MP is running a lot of syncronous code in the main thread and when that thread gets blocked for too long (5 seconds) Windows decides that the program is not responding (same is happening under XP, but its just not show as visible to the user, but you can see that happening from Task Manager).

    Yes I know that., but with my fix what it does is "add the AUdiorender filter First" and it the Graph fails do the old method, "check the filter, remove the filters and add the filter"

    I think that if you fix the code as I did you will fix 60% of the "no responding windows" these are:
    1.- Start LiveTV
    2.- Zapping from Channel 1 on TvCard1 to Channel2 on TvCard2
    3.- Start DVD
    4.- Start Movies..
    And also with the fix, the Windows Desktop does not show up..


    I have attach the code changes.. because I'm sure that some of the developers can do a better job that Me (remember I'm a VB developer and no C# :-(

    Hope this helps
    Iosu
     

    Users who are viewing this thread

    Top Bottom