A guide to stutter free playback with Reclock | Page 10

Discussion in 'Codecs, External Players' started by ErikLarsson, September 30, 2008.

  1. red5goahead
    • Premium Supporter

    red5goahead MP Donator

    Joined:
    November 24, 2007
    Messages:
    695
    Likes Received:
    96
    Gender:
    Male
    Occupation:
    Software engineering
    Location:
    Italy, North West
    Ratings:
    +144 / 1
    Home Country:
    Italy Italy
    Show System Specs
    A good solution could be a reclock exposed com on .net library to query the exactly refresh used by reclock itself.
    I'll try to ask this to Jong or James (reclock devs team). (better if reclock is not necessary indeed)


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Preferably a C++ based library, since dshowhelper.dll is not a NET component :) I guess ReClock is just asking from the DirectDraw / DirectX about the refresh rate (and neither of those are as accurate as PowerStrip)
     
  4. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    If thread context switch happens during a sleep (most likely it will since sleep is telling system that it is allowed to do it :)) it could be as high as 10 ms that the sleep will take. And that is already almost the whole frame with 60hz display that the v-sync can "travel" during that time.

    Causing high CPU usage in that part of code is not a sin, it won't be causing any playback issues like it would be if done in some other places. Also since the v-sync is most likely already in the place the high CPU spike wont be a long one. After all, that part of the code should be doing only a small fine tuning to the paint position.

    I think the Sleep(1) was a relic, and shouldn't be there in the first place. Also I think I didn't see any CPU usage rise when busy polling in that part of the code.
     
  5. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,538
    Likes Received:
    2,830
    Location:
    Cambridge
    Ratings:
    +4,132 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    AFAIK, if it's not in it's timings database, it measures the refresh rate (this is the red/green flashing icon period - quite a long time period sometimes). Once it's got the display timing stored, it then just recalls the values each time (to speed things up at start of play).

    Tony

    What about the timer + callback technique used in scheduler.cpp ? (but I don't have enough windows programming knowledge to understand how that really works.....)

    Tony
     
  6. mrmojo666
    • Premium Supporter

    mrmojo666 MP Donator

    Joined:
    January 24, 2006
    Messages:
    595
    Likes Received:
    94
    Gender:
    Male
    Occupation:
    ALM
    Location:
    Turin
    Ratings:
    +141 / 0
    Home Country:
    Italy Italy
    Show System Specs
    GOOD JOB!

    I don't know what you exactly did but it work like a charm on my htpc this almost fix my hard stuttering problem https://forum.team-mediaportal.com/606737-post21.html.
    Finally i get all working as it must work, playing pal 50i tv hd and sd is Ok at 50hz just get few framedrops, but they are not visible during play, no more stuttering :)

    I think you found the right way to fix this annoying problem.

    i don't use reclock , all is perfectly sync witout that.

    Thank you i'll keep your directshowhelper as my treasssssure ;)
     
  7. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,538
    Likes Received:
    2,830
    Location:
    Cambridge
    Ratings:
    +4,132 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    OK, good - and you are using Win 7 with an ATi 4670 video card too :) (I can only test it on Vista with nVidia 9500GT)

    It doesn't need/assume ReClock, but it tries to accomdate the timing changes ReClock can perform....

    Tony
     
    • Like Like x 1
  8. mrmojo666
    • Premium Supporter

    mrmojo666 MP Donator

    Joined:
    January 24, 2006
    Messages:
    595
    Likes Received:
    94
    Gender:
    Male
    Occupation:
    ALM
    Location:
    Turin
    Ratings:
    +141 / 0
    Home Country:
    Italy Italy
    Show System Specs

    Would be nice if us will keep in contact, to fine tuning.............. now , as i told , is stutter free....... would be GREAT if you can reach total stutter free with no framedrops at all ;)


    I'm really happy to help you in testing this customization, seems no one of the team is interested in get for ALL mp users stutter free experience ;)
     
  9. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    I'm not sure how reliable those are, but in any case CPU polling is most accurate so I would suggest you to do some testing if it has any affect on CPU usage (if I remember correct I didn't see any increase in CPU usage with my low end dev pc).
     
  10. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,538
    Likes Received:
    2,830
    Location:
    Cambridge
    Ratings:
    +4,132 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    OK, I'll give it a try (but I'll incorporate the latest 'crash to the desktop' fixes from SVN 25556 first - I've had those crashes happen a few times...)

    I take your point about sleep() allowing Windows to steal to much time sometimes :)

    Tony
     
  11. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Just do a SVN update and the merging should be automatic (unless there are conflicts with the local changes you have made).
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!