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

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Somehow that patch did look a little bit odd. Could you upload the full .cs file so its easier to do a compare with the changes. There were some completely commented out method. Please remove that and do only the changes.
     

    iosub

    Portal Pro
    April 26, 2006
    573
    30
    San Sebastian
    On line 91 of directshowutil.cs
    add
    public static IBaseFilter AddAudioRendererToGraph(IGraphBuilder graphBuilder, string strFilterName, bool setAsReferenceClock)
    //Iosu changes, First try to add the filter without checking or removing
    {
    try
    {
    IPin pinOut = null;
    IBaseFilter NewFilter = null;
    IEnumFilters enumFilters;
    HResult hr = new HResult(graphBuilder.EnumFilters(out enumFilters));
    Log.Info("DirectShowUtils: IOSU First Try Insert new Audio Renderer {0} ", strFilterName);
    // next add the new one...
    foreach (Filter filter in Filters.AudioRenderers)
    {
    if (String.Compare(filter.Name, strFilterName, true) == 0)
    {
    Log.Info("DirectShowUtils: Passed finding Audio Renderer");
    NewFilter = (IBaseFilter)Marshal.BindToMoniker(filter.MonikerString);
    hr.Set(graphBuilder.AddFilter(NewFilter, strFilterName));
    if (hr < 0)
    {
    Log.Error("failed:unable to add filter:{0} to graph", strFilterName);
    NewFilter = null;
    }
    else
    {
    Log.Debug("added filter:{0} to graph", strFilterName);
    if (pinOut != null)
    {
    hr.Set(graphBuilder.Render(pinOut));
    if (hr == 0) Log.Info(" pinout rendererd");
    else Log.Error(" failed: pinout render");
    }
    if (setAsReferenceClock)
    {
    hr.Set((graphBuilder as IMediaFilter).SetSyncSource(NewFilter as IReferenceClock));
    Log.Debug("setAsReferenceClock sync source " + hr.ToDXString());
    }
    return NewFilter;
    }
    }//if (String.Compare(filter.Name,strFilterName,true) ==0)
    }//foreach (Filter filter in filters.AudioRenderers)
    if (NewFilter == null)
    {
    Log.Error("failed filter:{0} not found", strFilterName);
    }
    }
    catch
    {
    Log.Info("DirectShowUtils: IOSU FAILD First Try Insert new Audio Renderer {0} ", strFilterName);
    }
    Log.Info("DirectShowUtils: IOSU FAILD First Try Insert new Audio Renderer {0} ", strFilterName);
    //End Iosu's change, It has fail so go to Old Methond

    try
    ====================================================================================


    Also another delay... 6sec on
    TsReaderPlayer.cs on line 410
    hr = interfaceFile.Load(filename, null);
    If the file is rtsp:\\ it takes only less 1sec but if the file is R:\MediaShift\live4-0.ts.tsbuffer it takes 6SEC!!...

    I think that if we speed up these issues... "we will fix the No responding...."


    Iosu
     

    Swede

    Portal Pro
    September 6, 2006
    490
    47
    West Coast Archipelago
    Home Country
    Sweden Sweden
    Yep, the "secondtest" is working nicely without problems. I still get a short "no responding" when I stop a movie but I can't see any long delays in the log. You might wanna test that.
     

    Swede

    Portal Pro
    September 6, 2006
    490
    47
    West Coast Archipelago
    Home Country
    Sweden Sweden
    OK log here. Short "not responding" when stopping movie:

    :Edit: This only seems to happen with movies that are on the same HD as MP.

    2008-05-16 22:12:10.409170 [Info.][MPMain]: g_Player.Play(C:\Filmer\10,000 BC.avi)
    2008-05-16 22:12:10.410146 [Info.][CommandProcessor]: Commandprocessor: MediaPortal.TV.Recording.StopRadioCommand failed reason: Inga tv-kort installerade time: 2,9295 msec
    2008-05-16 22:12:10.473619 [Info.][MPMain]: Loading external players plugins
    2008-05-16 22:12:10.488266 [Info.][MPMain]: found plugin:MediaPortal.ITunesPlayer.ITunesPlugin in C:\Program files\Team MediaPortal\MediaPortal\Plugins\ExternalPlayers\ExternalPlayers.dll
    2008-05-16 22:12:10.489243 [Info.][MPMain]: player:iTunes. author: Frodo
    2008-05-16 22:12:10.491196 [Info.][MPMain]: found plugin:MediaPortal.FoobarPlugin.FoobarPlugin in C:\Program files\Team MediaPortal\MediaPortal\Plugins\ExternalPlayers\ExternalPlayers.dll
    2008-05-16 22:12:10.492172 [Info.][MPMain]: player:Foobar2000. author: int_20h/rtv
    2008-05-16 22:12:10.493149 [Info.][MPMain]: found plugin:MediaPortal.WinampPlayer.WinampPlugin in C:\Program files\Team MediaPortal\MediaPortal\Plugins\ExternalPlayers\ExternalPlayers.dll
    2008-05-16 22:12:10.494125 [Info.][MPMain]: player:Winamp. author: int_20h
    2008-05-16 22:12:10.505843 [Info.][MPMain]: VideoPlayer: play C:\Filmer\10,000 BC.avi
    2008-05-16 22:12:10.598611 [Info.][MPMain]: VideoPlayerVMR9: Enabling DX9 exclusive mode
    2008-05-16 22:12:10.599587 [Info.][MPMain]: Main: Received DX exclusive mode switch message. Fullscreen && maximized == True
    2008-05-16 22:12:10.600564 [Debug][MPMain]: Main: Goto fullscreen: True
    2008-05-16 22:12:10.604470 [Info.][MPMain]: fonts.SetDevice()
    2008-05-16 22:12:10.620094 [Info.][MPMain]: DirectShowUtils: IOSU First Try Insert new Audio Renderer Realtek Digital Output (Realtek
    2008-05-16 22:12:12.722498 [Info.][MPMain]: DirectShowUtils: Passed finding Audio Renderer
    2008-05-16 22:12:12.725428 [Debug][MPMain]: added filter:Realtek Digital Output (Realtek to graph
    2008-05-16 22:12:12.739099 [Info.][MPMain]: VMR9: added EVR Renderer to graph
    2008-05-16 22:12:12.897292 [Debug][MPMain]: VMR9: Now active
    2008-05-16 22:12:12.898268 [Debug][MPMain]: VMR9: Renderer successfully added
    2008-05-16 22:12:13.261526 [Info.][MPMain]: PlaneScene: PresentSurface() dispose surfaces
    2008-05-16 22:12:13.390424 [Info.][MPMain]: VideoPlayerVMR9: add normal vob sub filter
    2008-05-16 22:12:13.497839 [Info.][MPMain]: VideoPlayer: Duration:6279,27978515625
    2008-05-16 22:12:13.517369 [Info.][MPMain]: g_Player.OnStarted() C:\Filmer\10,000 BC.avi media:Video
    2008-05-16 22:12:13.572053 [Debug][MPMain]: GUITVCropManager.g_Player_PlackBackStarted: media: Video tv:False ts:False
    2008-05-16 22:12:13.580842 [Debug][MPMain]: g_Player: ShowFullScreenWindow
    2008-05-16 22:12:13.586701 [Info.][MPMain]: g_Player: ShowFullScreenWindow switching to fullscreen video
    2008-05-16 22:12:13.615996 [Debug][MPMain]: Window: MediaPortal.GUI.Video.GUIVideoFiles deinit
    2008-05-16 22:12:13.714622 [Debug][MPMain]: TextureManager: CleanupThumbs()
    2008-05-16 22:12:13.807390 [Debug][MPMain]: Window: MediaPortal.GUI.Video.GUIVideoFullscreen init
    2008-05-16 22:12:13.873792 [Info.][MPMain]: xml:C:\Program files\Team MediaPortal\MediaPortal\Skin\Xface\videoOSD.xml image id:304 width:0 height:0 gfx:-
    2008-05-16 22:12:13.883557 [Info.][MPMain]: xml:C:\Program files\Team MediaPortal\MediaPortal\Skin\Xface\videoOSD.xml image id:350 width:0 height:0 gfx:-
    2008-05-16 22:12:14.024173 [Debug][MPMain]: VMR9Helper: Playing -> Repainting, Frames 50
    2008-05-16 22:12:14.136470 [Debug][MPMain]: g_Player.SeekAbsolute() - Preparing to seek to 0:3:42
    2008-05-16 22:12:14.138423 [Info.][MPMain]: seekabs:222
    2008-05-16 22:12:14.336653 [Info.][MPMain]: seekabs:222 done
    2008-05-16 22:12:14.340559 [Debug][MPMain]: Successfully set rate to 1
    2008-05-16 22:12:14.340559 [Info.][MPMain]: VideoPlayer: SetRate to:10000
    2008-05-16 22:12:14.382548 [Debug][MPMain]: VMR9: Repainting -> Playing, Frames: 50
    2008-05-16 22:12:14.679404 [Info.][12]: PlaneScene: crop T, B : 0, 0
    2008-05-16 22:12:14.680381 [Info.][12]: PlaneScene: crop L, R : 0, 0
    2008-05-16 22:12:14.681357 [Info.][12]: PlaneScene: video WxH : 1360x768
    2008-05-16 22:12:14.681357 [Info.][12]: PlaneScene: video AR : 85:48
    2008-05-16 22:12:14.682334 [Info.][12]: PlaneScene: screen WxH : 1360x768
    2008-05-16 22:12:14.682334 [Info.][12]: PlaneScene: AR type : Zoom14to9
    2008-05-16 22:12:14.683310 [Info.][12]: PlaneScene: PixelRatio : 1
    2008-05-16 22:12:14.684287 [Info.][12]: PlaneScene: src : (85,48)-(1275,720)
    2008-05-16 22:12:14.685263 [Info.][12]: PlaneScene: dst : (0,0)-(1360,768)
    2008-05-16 22:12:16.153919 [Info.][GenericPCQueue]: * / -1 / ACTION / 13
    2008-05-16 22:12:16.154896 [Info.][GenericPCQueue]: Executing: key 0 / 0 / Action: 13 / ACTION_STOP
    2008-05-16 22:12:16.193956 [Info.][MPMain]: GUIVideoFullscreen:stop
    2008-05-16 22:12:16.199815 [Info.][MPMain]: g_Player.doStop() keepTimeShifting = False keepExclusiveModeOn = False
    2008-05-16 22:12:16.200791 [Info.][MPMain]: g_Player.OnStopped()
    2008-05-16 22:12:16.241804 [Info.][MPMain]: GUIVideoFiles: OnPlayBackStopped idFile=357 timeMovieStopped=223 resumeData=
    2008-05-16 22:12:16.247663 [Debug][MPMain]: GUIVideoFiles: OnPlayBackStopped store resume time
    2008-05-16 22:12:16.248640 [Debug][MPMain]: GUIVideoFiles: No LoadDirectory needed OnPlaybackStopped
    2008-05-16 22:12:16.251569 [Info.][MPMain]: TvRecorded:OnStopped Video C:\Filmer\10,000 BC.avi
    2008-05-16 22:12:16.252546 [Info.][MPMain]: g_Player.doStop() - stop
    2008-05-16 22:12:16.254499 [Info.][MPMain]: VideoPlayer:ended C:\Filmer\10,000 BC.avi
    2008-05-16 22:12:16.254499 [Info.][MPMain]: VideoPlayer9:cleanup DShow graph
    2008-05-16 22:12:16.295512 [Info.][12]: planescene: PresentSurface() frame:22 enabled:False allowed:True 1360x768
    2008-05-16 22:12:16.335548 [Info.][12]: planescene: PresentSurface() frame:23 enabled:False allowed:True 1360x768
    2008-05-16 22:12:16.375585 [Info.][12]: planescene: PresentSurface() frame:24 enabled:False allowed:True 1360x768
    2008-05-16 22:12:16.380467 [Info.][MPMain]: state: Stopped 0
    2008-05-16 22:12:16.383397 [Debug][MPMain]: VMR9: Dispose
    2008-05-16 22:12:16.389256 [Debug][MPMain]: VMR9: Inactive
    2008-05-16 22:12:16.390232 [Info.][MPMain]: VMR9: ReleaseComObject(): 0
    2008-05-16 22:12:16.394138 [Info.][MPMain]: PlaneScene: PresentImage() dispose surfaces
    2008-05-16 22:12:16.396091 [Info.][MPMain]: PlaneScene: PresentSurface() dispose surfaces
    2008-05-16 22:12:16.905824 [Info.][MPMain]: VideoPlayerVMR9: Disabling DX9 exclusive mode
    2008-05-16 22:12:16.905824 [Info.][MPMain]: Main: Received DX exclusive mode switch message. Fullscreen && maximized == False
    2008-05-16 22:12:16.906801 [Debug][MPMain]: Main: Goto windowed mode: True
    2008-05-16 22:12:16.907777 [Info.][MPMain]: fonts.SetDevice()
    2008-05-16 22:12:16.911683 [Debug][MPMain]: Windowmanager: Goto previous window
    2008-05-16 22:12:16.912660 [Debug][MPMain]: Window: MediaPortal.GUI.Video.GUIVideoFullscreen deinit
    2008-05-16 22:12:16.916566 [Debug][MPMain]: TextureManager: CleanupThumbs()
    2008-05-16 22:12:17.018122 [Debug][MPMain]: Window: MediaPortal.GUI.Video.GUIVideoFiles init
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi iosub, thank you for that patch :p

    I have tryed quickly (my wife is watching tv...), switching from one tuner - channel to the second tuner HD channel without seeing the title bar and without seeing the desktop !!!

    Swichting to the recordings and back, no tb and no dt :D

    I hope there is no other side effect and this patch is going soon in to the weekly SVN.

    :D
    MoPhat
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi iosub, can you apply that patch in the actually SVN version and submit this that is imlemented in the next SVN?

    :D
    MoPhat
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Must admit have not found any downside to this in the last 48hrs, now if smartstretch could be incorporated as well, would be perfect. :)

    Thanks for the work iosu
     

    Users who are viewing this thread

    Top Bottom