[WiP] - Timeshifting in a single looping .ts file | Page 12

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by dvdfreak, February 6, 2011.

  1. dvdfreak

    dvdfreak Portal Pro

    Joined:
    June 13, 2006
    Messages:
    979
    Likes Received:
    178
    Ratings:
    +178 / 0
    Home Country:
    Belgium Belgium
    Starting with BETA 8 of For The Record 1.5.1 I have improved the .tsbuffer output (I think) by pre-creating the next .ts file beforehand. I've also enabled asynchronous I/O when writing the .ts files. It will be interesting to get some feedback on this, before exploring further into the .tshift format.


     
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mcrob83
    • Premium Supporter

    mcrob83 MP Donator

    Joined:
    November 10, 2009
    Messages:
    206
    Likes Received:
    12
    Occupation:
    student
    Location:
    St.Marienkirchen, Eferding
    Ratings:
    +12 / 0
    Home Country:
    Austria Austria
    AW: Timeshifting in a single looping .ts file

    It's working very good so far, it's getting mature:D
     
  4. dvdfreak

    dvdfreak Portal Pro

    Joined:
    June 13, 2006
    Messages:
    979
    Likes Received:
    178
    Ratings:
    +178 / 0
    Home Country:
    Belgium Belgium
    Well, so far the response on BETA 8 has been very positive, from people using the regular .tsbuffer format with the two enhancements I made (asynchronous I/O and pre-creating the next .ts file).

    So it looks like there may not be any need for the new .tshift streaming format after all?
     
  5. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Sounds good dvdfreak, maybe you should post new patches for testing :)
     
  6. dvdfreak

    dvdfreak Portal Pro

    Joined:
    June 13, 2006
    Messages:
    979
    Likes Received:
    178
    Ratings:
    +178 / 0
    Home Country:
    Belgium Belgium
    The cool thing is, there's no patches needed at all :D

    All of the improvements are in For The Record's Argus recorder/tuner's code that writes the .tsbuffer/.ts files. So an unpatched tsreader can show live TV just fine.
     
  7. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    What about users not using FTR? :) Would still require similar MPFileWriter and TSWriter change, no?
     
  8. dvdfreak

    dvdfreak Portal Pro

    Joined:
    June 13, 2006
    Messages:
    979
    Likes Received:
    178
    Ratings:
    +178 / 0
    Home Country:
    Belgium Belgium
    I would indeed guess that similar changes would give the same (good) results. But the code in Argus is written in C#, and tswriter in C++ (plus the internal handling of the stream and demuxer is totally different). So using (parts of) my code directly is not really an option.

    Duplicating the same two changes in behavior is an option. Perhaps disaster123 can look at this, like he did for the .tshift format?

    For those confused by the term, asynchronous I/O is a standard feature of Windows: Synchronous and Asynchronous I/O (Windows)

    And pre-creating the next .ts file is pretty easy too: just make sure the .ts2.ts is there when writing commences on .ts1.ts. Then create .ts3.ts the moment writing starts on .ts2.ts, and so on... Until you loop and all files are there.
     
    • Like Like x 1
  9. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Good explanation. Guess all we need now is some C++ volunteer to do the porting of improved code to MePo :)
     
  10. dvdfreak

    dvdfreak Portal Pro

    Joined:
    June 13, 2006
    Messages:
    979
    Likes Received:
    178
    Ratings:
    +178 / 0
    Home Country:
    Belgium Belgium
    Or everyone can start using Argus ;) :D
     
  11. gibman
    • Premium Supporter

    gibman Retired Team Member

    Joined:
    October 4, 2006
    Messages:
    2,998
    Likes Received:
    1,321
    Occupation:
    Developer
    Location:
    Aarhus
    Ratings:
    +1,372 / 0
    Home Country:
    Denmark Denmark
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!