[Approved] Freesat EPG patch, no mantis number sorry. (1 Viewer)

DJBlu

Portal Pro
August 14, 2007
1,670
813
Llanelli
Home Country
United Kingdom United Kingdom
Hi guys,

Thought I would upload the patch for the addition of freesat EPG to the TSWriter. To ensure it grabs the 181 channels on Freesat the end user needs to select the following channel in the TV EPG grabber. "Brit Shorts". They are also required to de-select the "Store data only for selected channels".

Let me know what you think.

Thanks.

DJBlu

Removed patch see below.
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Few quick notes about the patch (I didn't check the whole code):

    • raw_huffman_data1 should be introduced in it's own header file, having such huge non-code block in start of CPP file makes the class really hard to read
    • TABs should be two spaces
    • MP coding conventions should be followed (i.e. '{' on next line after for, while etc.)
    • CAutoString buffer(500); <--- this could cause crash if the show description is longer. Some better way that just hard coding the buffer length must be found
    • if(buf[off+1]==0x1f) <-- is the huffman decoding detection really based on one char? It could be triggered falsely if stream contains such char (pretty unlikely, but for example transmission error could cause such)
     

    DJBlu

    Portal Pro
    August 14, 2007
    1,670
    813
    Llanelli
    Home Country
    United Kingdom United Kingdom
    Few quick notes about the patch (I didn't check the whole code):

    • raw_huffman_data1 should be introduced in it's own header file, having such huge non-code block in start of CPP file makes the class really hard to read
      Done.
    • TABs should be two spaces
      Done. Moved from 2005 to 2008 and didn't set it.
    • MP coding conventions should be followed (i.e. '{' on next line after for, while etc.)
      Done.
    • CAutoString buffer(500); <--- this could cause crash if the show description is longer. Some better way that just hard coding the buffer length must be found
      Fixed, using string.append to solve this one.
    • if(buf[off+1]==0x1f) <-- is the huffman decoding detection really based on one char? It could be triggered falsely if stream contains such char (pretty unlikely, but for example transmission error could cause such)
      In the modified TSWriter I have I use the pid to define the Freesat Data, how ever the 0x1f is the header byte for encoded information. As freesat sends both encoded and standard information.
      I removed this as it wasn't needed, I will add it again if you wish.


    DJBlu
     

    DJBlu

    Portal Pro
    August 14, 2007
    1,670
    813
    Llanelli
    Home Country
    United Kingdom United Kingdom
    Patch with ammendments.

    Have tested and its fully functional.
     

    Attachments

    • Freesat_EPGwithSVN22770_AL1.patch
      30.7 KB

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    2nd version looks much better (althou tabs seems to be still 4 spaces wide...:)) . I'll check it at some point more closely and as it seems to be now pretty safe (when it comes to the old functionality) it will be most likely integrated into SVN.

    Thanks!
     

    DJBlu

    Portal Pro
    August 14, 2007
    1,670
    813
    Llanelli
    Home Country
    United Kingdom United Kingdom
    I'll check tortoise SVN but C++ is set to 2 space. Weird.

    Update, was being a biff. Didn't select "Insert Spaces", re-uploaded with 2 space tabs.
     

    Users who are viewing this thread

    Top Bottom