[Rejected] Support for IPTV Tuner MoonSoon Hava (1 Viewer)

morinhe1

Portal Member
September 19, 2009
9
1
Home Country
France France
Here is a patch to 1.1RC1 25080, that enables the support of IPTV Tuner Hava Moonsoon.
(reference on Play Your TV Anywhere - Video Streamer; Place-Shifter; Mobile TV)

Description of the change: The detection logic of tvlibrary analog implementation was kicking an error
in the graph creation procedure (automatic and from saved configuration)
Changed the error handling to avoid triggering an error due to the sort procedure.

Should improve anyway the procedure resilience for others tuners.



View attachment hava ptf for svn25080.patch
 

Automate

Portal Pro
December 14, 2008
55
1
Home Country
United States of America United States of America
It looks as though the "Adaptec USB TVTuner" has the same issue as the Hava tuner. Rather than having two different methods of handling this problem I would recommend using morinhe1's try/catch method rather than using a long list of hard coded "if TvTuner1 or TvTuner2 or TvTuner3" etc.

so I recommend removing:

Code:
if (tuner.TunerName == "Adaptec USB TvTuner")
{
      Log.Log.WriteFile("analog: Adaptec USB device detected!");
      devices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);
}

and replacing morinhe1's log statement

Code:
Log.Log.WriteFile("analog: AddTvCaptureFilter sort error, ignored");

with

Code:
Log.Log.WriteFile("analog: AddTvCaptureFilter sort error, ignored for device " + tuner.TunerName);

So the name of the device that was handled by this method shows up in the log like the original Adaptec USV TVTuner code.
 

morinhe1

Portal Member
September 19, 2009
9
1
Home Country
France France
That make sense.
by the way, i know it does enter into the scope of RC2, but i had once an idea to improve a bit the way, MP handles
the connection to tv tuners

May be would be possible to create a special type of tuner, called lets say virtual.
Upon activation of this type of tuner, the system would read a pre built directshow graph file (from graphbuilder..by example)
of course with certain constraints..
but this would have the advantage to facilitate the support of new tuners, and also to bring MP the ability to use additional DS filters..

I can try to do something on that side if needed.
 

Automate

Portal Pro
December 14, 2008
55
1
Home Country
United States of America United States of America
I did not notice previously that there is one other difference between the standard tuners and the way the "Adaptec USB TvTuner" is handled.

standard and Hava tuners:
devices = DsDevice.GetDevicesOfCat(FilterCategory.AMKSCapture); //shouldn't be VideoInputDevice

Adaptec USB TvTuner:
devices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);


Can anyone comment on the difference between "AMKSCapture" and "VideoInputDevice"
 

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    AW: Support for IPTV Tuner MoonSoon Hava

    just a question, wouldn't it be the better way to find and fix the exception that occure in DeviceSorter.Sort ?
     

    Automate

    Portal Pro
    December 14, 2008
    55
    1
    Home Country
    United States of America United States of America
    Re: AW: Support for IPTV Tuner MoonSoon Hava

    just a question, wouldn't it be the better way to find and fix the exception that occure in DeviceSorter.Sort ?
    Good point. morinhe1's original changes were made against version 1.0.2. He may not have verified that they were all needed with version 1.1. It seems as though maybe DeviceSorter.Sort was fixed between 1.0.2 and 1.1. I just tried a version of TVLibrary.dll that only has morinhe1's TvAudio.cs changes (none of the Try/Catch changes in Capture.cs) and it works. So I think that only the 6 new lines of code at the bottom of his patch file are all that are needed.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    AW: Support for IPTV Tuner MoonSoon Hava

    can you please post the graph (.grf) files from the TvServer data folder? (i.e. C:\ProgramData\Team MediaPortal\MediaPortal TV Server\TechnoTrend BDA_DVB-C Tuner - DVBC Graph.grf)

    please attach 2 versions: one with plain RC2 build, and one with your patch applied. What I want to see is the effect of overriding the pin selection.
     

    Automate

    Portal Pro
    December 14, 2008
    55
    1
    Home Country
    United States of America United States of America
    Attached is the grf file from the patched TVLibary.dll

    I can't seem to get MP to create a grf file with the RC2 dll. I stopped the TVService replaced the patched TVLibary with the original RC2 dll, restarted TVService and try and use the TV tuner and it just says "Unknown Error" and no grf file created.

    Directory I found the grf file was C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server, running on XP.

    This post https://forum.team-mediaportal.com/...or-occured-hava-devices-patch-included-78977/ contains error logs from RC1, let me know if you need new RC2 logs.
     

    Attachments

    • analog with patch.zip
      30.6 KB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    AW: Support for IPTV Tuner MoonSoon Hava

    can't see the constructed graph because of the missing filters, can you please attach a screenshot?
     

    Users who are viewing this thread

    Top Bottom