[TV] Unable to record/watch consecutive shows on the same channel (1 Viewer)

jaymode

Portal Pro
July 31, 2008
58
1
Home Country
United States of America United States of America
MediaPortal Version: 1.1.0 Beta SVN 24669
MediaPortal Skin: Default
Windows Version: Windows 7 32-bit
CPU Type: AMD Phenom II X3 710
HDD: 500GB Samsung
Memory: 4 GB
Motherboard: ASUS M3N78 Pro
Video Card: ATI Radeon 4350
Video Card Driver: Catalyst 9.12
Sound Card: ATI HDMI Audio
Sound Card AC3:
Sound Card Driver:
1. TV Card: Hauppauge HVR-1800
1. TV Card Type: ATSC/NTSC
1. TV Card Driver: Latest found here (Support for the WinTV-HVR-1800)
2. TV Card: Hauppauge HVR-2250
2. TV Card Type: Dual Hybrid ATSC/NTSC
2. TV Card Driver: Latest found here (WinTV-HVR-2250 Support page)
Satelite/CableTV Provider: Comcast
Power Supply: 600W OCZ
TV - HTPC Connection: HDMI

I have been having issues with TV shows not being recorded and tracked it down to an error when attempting to change channels; this has only happened with ATSC. In the TV Server error log there are many occurrences of this error:
Code:
2010-01-18 19:43:54.624000 [6]: Exception   :TvLibrary.TvException: Unable to tune to channel
   at TvLibrary.Implementations.DVB.TvCardDvbBase.SubmitTuneRequest(Int32 subChannelId, IChannel channel, ITuneRequest tuneRequest, Boolean performTune)
   at TvLibrary.Implementations.DVB.TvCardATSC.Tune(Int32 subChannelId, IChannel channel)
   at TvService.CardTuner.Tune(User& user, IChannel channel, Int32 idChannel)

I can easily reproduce across all of my ATSC tuners by running TV Server configuration, start timeshifting on one tuner, stop timeshifting, attempt to start timeshifting again on the same channel and get a popup with a message of "Unknown error". If I change the channel, timeshifting works again. It is only when it attempts to tune to the channel that had last been viewed. I have attached the logs from TV Server.

Please let me know what further information you require.
 

jaymode

Portal Pro
July 31, 2008
58
1
Home Country
United States of America United States of America
This may be a bug in the code. Reading through the code; the channel should not even be attempted to tune because it was the previous channel (my understanding).

From my tv log file
Code:
2010-01-18 19:03:39.126200 [6]: Controller: StartTimeShifting WTTG_HD 99
2010-01-18 19:03:39.126200 [6]: Controller: find free card for channel WTTG_HD
2010-01-18 19:03:39.136200 [6]: Controller:   got 1 tuning details for WTTG_HD
2010-01-18 19:03:39.136200 [6]: Controller:   channel #1 ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam 
2010-01-18 19:03:39.226200 [6]: Controller:    card:8 type:Atsc is available priority:8 #users:0 same transponder:False
2010-01-18 19:03:39.226200 [6]: Controller:    card:6 type:Atsc is available priority:7 #users:0 same transponder:False
2010-01-18 19:03:39.226200 [6]: Controller:    card:7 type:Atsc is available priority:6 #users:0 same transponder:False
2010-01-18 19:03:39.236200 [6]: Controller:    card:2 type:Analog cannot tune to channel
2010-01-18 19:03:39.236200 [6]: Controller:    card:3 type:Analog cannot tune to channel
2010-01-18 19:03:39.236200 [6]: Controller:    card:4 type:Analog cannot tune to channel
2010-01-18 19:03:39.236200 [6]: Controller:    card:9 type:Analog cannot tune to channel
2010-01-18 19:03:39.236200 [6]: Controller:    card:5 type:RadioWebStream is disabled
2010-01-18 19:03:39.236200 [6]: Controller: found 3 available
2010-01-18 19:03:39.246200 [6]: TV3BlasterPlugin: Received TV Server Event "StartZapChannel"
2010-01-18 19:03:39.246200 [6]: card: CardTune 8 WTTG_HD setuptv:8:-1
2010-01-18 19:03:39.256200 [6]: card: Tune 8 to WTTG_HD
2010-01-18 19:03:39.256200 [6]: card: user: setuptv:8:-1 tune ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam
2010-01-18 19:03:39.266200 [6]: atsc:Tune:ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam 
2010-01-18 19:03:39.266200 [6]: atsc:BuildGraph
2010-01-18 19:03:39.266200 [6]: dvb:AddNetworkProviderFilter
2010-01-18 19:03:39.266200 [6]: dvb:Add Generic Network Provider
2010-01-18 19:03:39.276200 [6]: atsc:CreateTuningSpace()
2010-01-18 19:03:39.276200 [6]: atsc:found correct tuningspace MediaPortal ATSC TuningSpace
2010-01-18 19:03:39.286200 [6]: dvb:Add MPEG2 Demultiplexer filter
2010-01-18 19:03:39.286200 [6]: dvb:add Inf Tee filter
2010-01-18 19:03:39.296200 [6]: dvb:AddAndConnectBDABoardFilters
2010-01-18 19:03:39.296200 [6]: dvb: find bda tuner
2010-01-18 19:03:39.316200 [6]: dvb:  using [Tuner]: Hauppauge WinTV 885 BDA Tuner/Demod
2010-01-18 19:03:39.316200 [6]: dvb:  Render [Network provider]->[Tuner] OK
2010-01-18 19:03:39.316200 [6]: dvb:  Find BDA receiver
2010-01-18 19:03:39.316200 [6]: dvb:  match Capture by Tuner device path
2010-01-18 19:03:39.326200 [6]: dvb:  -Hauppauge WinTV-7164 BDA Digital Capture
2010-01-18 19:03:39.326200 [6]: dvb:  -Hauppauge WinTV-7164 BDA Digital Capture
2010-01-18 19:03:39.326200 [6]: dvb:  -Hauppauge WinTV 885 TS Capture
2010-01-18 19:03:39.326200 [6]: dvb:  Render [Tuner]->[Capture] AOK
2010-01-18 19:03:39.336200 [6]: dvb:  WinTv CI module not detected.
2010-01-18 19:03:39.336200 [6]: dvb:  Render [capture]->[inftee]
2010-01-18 19:03:39.336200 [6]: dvb:  OK
2010-01-18 19:03:39.346200 [6]: dvb:  Render [inftee]->[demux]
2010-01-18 19:03:39.346200 [6]: dvb:  Add Mediaportal TsWriter filter
2010-01-18 19:03:39.356200 [6]: dvb:  Render [InfTee]->[TsWriter]
2010-01-18 19:03:39.356200 [6]: CAM is Default model
2010-01-18 19:03:39.356200 [6]: Check for ViXS ATSC QAM card
2010-01-18 19:03:39.356200 [6]: ViXS ATSC: card NOT found!
2010-01-18 19:03:39.366200 [6]: Check for Generic ATSC QAM card
2010-01-18 19:03:39.366200 [6]: GenericATSC: QAM capable card found!
2010-01-18 19:03:39.366200 [6]: Generic ATSC QAM card detected
2010-01-18 19:03:39.366200 [6]: dvb:  AddTransportStreamFiltersToGraph
2010-01-18 19:03:39.366200 [6]:     add BDA MPEG2 Transport Information Filter filter
2010-01-18 19:03:39.366200 [6]:     pinTif:name:IB Input [3/1] Direction:Input Connected:False
2010-01-18 19:03:39.366200 [6]:     Connect tif and mpeg2 sections and tables
2010-01-18 19:03:39.366200 [6]: dvb:try tif:name:001 [5/1] Direction:Output Connected:False
2010-01-18 19:03:39.376200 [6]:     tif connected
2010-01-18 19:03:39.426200 [6]: dvb: GetTunerSignalStatistics()
2010-01-18 19:03:39.426200 [6]: atsc:using new channel tuning settings
2010-01-18 19:03:39.426200 [6]: Setting Generic ATSC modulation to Mod256Qam
2010-01-18 19:03:39.426200 [6]: GenericATSC: Set ModulationType: Mod256Qam
2010-01-18 19:03:39.426200 [6]: dvb:Submiting tunerequest Channel:WTTG_HD subChannel:-1 
2010-01-18 19:03:39.426200 [6]: dvb:Getting new subchannel
2010-01-18 19:03:39.426200 [6]: dvb:GetNewSubChannel:0 #0
2010-01-18 19:03:39.436200 [6]: TvDvbChannel ctor new subchIndex:0
2010-01-18 19:03:39.436200 [6]: dvb:Submit tunerequest size:1 new:0
2010-01-18 19:03:39.436200 [6]: subch:0 OnBeforeTune
2010-01-18 19:03:39.436200 [6]: dvb:Submit tunerequest calling put_TuneRequest
2010-01-18 19:03:39.436200 [6]: dvb:Submit tunerequest done calling put_TuneRequest
2010-01-18 19:03:39.446200 [6]: subch:0 OnAfterTune
2010-01-18 19:03:39.446200 [6]: subch:0 OnGraphStart
2010-01-18 19:03:39.446200 [6]: dvb:  RunGraph
2010-01-18 19:03:40.206200 [6]: dvb:  LockedInOnSignal waiting 20ms
2010-01-18 19:03:40.276200 [6]: dvb:  LockedInOnSignal ok
2010-01-18 19:03:40.276200 [6]: subch:0 OnGraphStarted
2010-01-18 19:03:40.276200 [6]: subch:0 SetupPmtGrabber:pid 5DD sid:5DD
2010-01-18 19:03:40.276200 [6]: subch:0 set pmt grabber pmt:5DD sid:5DD
2010-01-18 19:03:40.286200 [6]: WaitForPMT: Waiting for PMT 5DD
2010-01-18 19:03:40.296200 [13]: subch:0 OnPMTReceived() pmt:5DD ran:True dynamic:False
2010-01-18 19:03:40.296200 [6]: WaitForPMT: Found PMT after 0.02 seconds.
2010-01-18 19:03:40.296200 [6]: subch:0 SendPmt:5DD 5DD FFFFFFFF 1A
2010-01-18 19:03:40.306200 [6]: Decode pmt
2010-01-18 19:03:40.306200 [6]: Set descriptor data with length 6
2010-01-18 19:03:40.306200 [6]: subch:0 SendPMT version:26 len:50 1501
2010-01-18 19:03:40.306200 [6]: subch:0 cam flags:True
2010-01-18 19:03:40.316200 [6]: subch:0 SetMpegPidMapping
2010-01-18 19:03:40.316200 [6]: subch:0  pid:5EC pcr
2010-01-18 19:03:40.316200 [6]: subch:0  pid:5DD pmt
2010-01-18 19:03:40.316200 [6]: subch:0  pid:5EC video type:MPEG-2
2010-01-18 19:03:40.316200 [6]: subch:0    map pid:5EC video type:MPEG-2
2010-01-18 19:03:40.316200 [6]: subch:0  pid:5ED audio lang: type:AC3
2010-01-18 19:03:40.316200 [6]: subch:0    map pid:5ED audio lang: type:AC3
2010-01-18 19:03:40.316200 [6]: subch:0 stop tif
2010-01-18 19:03:40.316200 [6]: WaitForPMT: sending PMT to CAM took 0.02 seconds.
2010-01-18 19:03:40.336200 [6]: card: Tuner locked: True
2010-01-18 19:03:40.336200 [6]: **************************************************
2010-01-18 19:03:40.336200 [6]: ***** SIGNAL LEVEL: 0, SIGNAL QUALITY: 100 *****
2010-01-18 19:03:40.336200 [6]: **************************************************
2010-01-18 19:03:40.336200 [6]: card: tuned user: setuptv subchannel: 0
2010-01-18 19:03:40.346200 [6]: user:setuptv add
2010-01-18 19:03:40.346200 [6]: card2:setuptv 8 0
2010-01-18 19:03:40.346200 [6]: Controller: setuptv 8 0
2010-01-18 19:03:40.346200 [6]: TV3BlasterPlugin: Received TV Server Event "EndZapChannel"
2010-01-18 19:03:40.346200 [6]: control2:setuptv 8 0
2010-01-18 19:03:40.346200 [6]: Controller: delete timeshift files C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts
2010-01-18 19:03:40.356200 [6]: TV3BlasterPlugin: Received TV Server Event "StartTimeShifting"
2010-01-18 19:03:40.356200 [6]: card: StartTimeShifting 8 C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts 
2010-01-18 19:03:40.356200 [6]: card: CAM enabled : False
2010-01-18 19:03:40.356200 [6]: subch:0 SetTimeShiftFileName:C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts
2010-01-18 19:03:40.356200 [6]: Set video / audio observer
2010-01-18 19:03:40.356200 [6]: subch:0 SetTimeShiftFileName fill in pids
2010-01-18 19:03:40.366200 [6]: subch:0-0 tswriter StartTimeshifting...
2010-01-18 19:03:40.366200 [6]: card: WaitForTimeShiftFile - waiting _eventAudio & _eventVideo
2010-01-18 19:03:40.376200 [13]: PID seen - type = Video
2010-01-18 19:03:40.376200 [13]: audioVideoEventHandler Video
2010-01-18 19:03:40.396200 [13]: PID seen - type = Audio
2010-01-18 19:03:40.396200 [13]: audioVideoEventHandler Audio
2010-01-18 19:03:40.396200 [6]: card: WaitForTimeShiftFile - video and audio are seen after 0.03 seconds
2010-01-18 19:03:40.406200 [6]: user:setuptv card:8 sub:0 add stream:C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts.tsbuffer
2010-01-18 19:03:40.406200 [6]: RTSP: start streamer
2010-01-18 19:03:40.406200 [RTSP Streaming thread]: RTSP: Streamer started
2010-01-18 19:03:40.406200 [6]: RTSP: add stream stream8.0 file:C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts.tsbuffer
2010-01-18 19:03:40.406200 [6]: Controller: StartTimeShifting started on card:8 to C:\ProgramData\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live8-0.ts.tsbuffer
2010-01-18 19:03:40.476200 [Channel state thread]: Controller: DoSetChannelStates for 52 channels
2010-01-18 19:03:46.026200 [6]: TV3BlasterPlugin: Received TV Server Event "EndTimeShifting"
2010-01-18 19:03:46.026200 [6]: Controller: StopTimeShifting 8
2010-01-18 19:03:46.026200 [6]: card Hauppauge WinTV 885 BDA Tuner/Demod: StopTimeShifting user:setuptv sub:0
2010-01-18 19:03:46.026200 [6]: card: StopTimeShifting user:setuptv sub:0
2010-01-18 19:03:46.026200 [6]: card not IDLE - freeing subch: 0
2010-01-18 19:03:46.026200 [6]: subch:0-0 tswriter StopTimeshifting...
2010-01-18 19:03:46.036200 [6]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=False
2010-01-18 19:03:46.036200 [6]: DVB subch:0 Decompose()
2010-01-18 19:03:46.036200 [6]: FreeSubChannel CA: freeing sub channel : 0
2010-01-18 19:03:46.036200 [6]: tvcard:FreeSubChannel : no subchannels present, stopping graph
2010-01-18 19:03:46.046200 [6]: dvb:StopGraph called
2010-01-18 19:03:46.046200 [6]: tvcard:FreeAllSubChannels
2010-01-18 19:03:46.046200 [6]: dvb:StopGraph
2010-01-18 19:03:46.046200 [6]: user:setuptv remove
2010-01-18 19:03:46.046200 [6]: Controller:Timeshifting stopped on card:8
2010-01-18 19:03:46.046200 [6]: RTSP: remove stream stream8.0
2010-01-18 19:03:46.076200 [Channel state thread]: Controller: DoSetChannelStates for 52 channels
2010-01-18 19:03:48.636200 [6]: Controller: StartTimeShifting WTTG_HD 99
2010-01-18 19:03:48.636200 [6]: Controller: find free card for channel WTTG_HD
2010-01-18 19:03:48.636200 [6]: Controller:   got 1 tuning details for WTTG_HD
2010-01-18 19:03:48.636200 [6]: Controller:   channel #1 ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam 
2010-01-18 19:03:48.636200 [6]: Controller:    card:8 type:Atsc is available priority:8 #users:0 same transponder:False
2010-01-18 19:03:48.636200 [6]: Controller:    card:6 type:Atsc is available priority:7 #users:0 same transponder:False
2010-01-18 19:03:48.646200 [6]: Controller:    card:7 type:Atsc is available priority:6 #users:0 same transponder:False
2010-01-18 19:03:48.646200 [6]: Controller:    card:2 type:Analog cannot tune to channel
2010-01-18 19:03:48.646200 [6]: Controller:    card:3 type:Analog cannot tune to channel
2010-01-18 19:03:48.646200 [6]: Controller:    card:4 type:Analog cannot tune to channel
2010-01-18 19:03:48.646200 [6]: Controller:    card:9 type:Analog cannot tune to channel
2010-01-18 19:03:48.646200 [6]: Controller:    card:5 type:RadioWebStream is disabled
2010-01-18 19:03:48.646200 [6]: Controller: found 3 available
2010-01-18 19:03:48.646200 [6]: TV3BlasterPlugin: Received TV Server Event "StartZapChannel"
2010-01-18 19:03:48.646200 [6]: card: CardTune 8 WTTG_HD setuptv:8:-1
2010-01-18 19:03:48.646200 [6]: card: Tune 8 to WTTG_HD
2010-01-18 19:03:48.646200 [6]: card: user: setuptv:8:-1 tune ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam
2010-01-18 19:03:48.656200 [6]: atsc:Tune:ATSC:tv:unknown WTTG_HD Freq:301250 ONID:0 TSID:4402 SID:1501 PMT:0x5DD FTA:False LCN:10000 phys:38 maj:5 min:1 mod:Mod256Qam 
2010-01-18 19:03:48.656200 [6]: atsc:using new channel tuning settings
2010-01-18 19:03:48.656200 [6]: Setting Generic ATSC modulation to Mod256Qam
2010-01-18 19:03:48.656200 [6]: GenericATSC: Set ModulationType: Mod256Qam
2010-01-18 19:03:48.656200 [6]: dvb:Submiting tunerequest Channel:WTTG_HD subChannel:-1 
2010-01-18 19:03:48.656200 [6]: dvb:Getting new subchannel
2010-01-18 19:03:48.656200 [6]: dvb:GetNewSubChannel:0 #0
2010-01-18 19:03:48.656200 [6]: TvDvbChannel ctor new subchIndex:0
2010-01-18 19:03:48.656200 [6]: dvb:Submit tunerequest size:1 new:0
2010-01-18 19:03:48.666200 [6]: subch:0 OnBeforeTune
2010-01-18 19:03:48.666200 [6]: dvb:Submit tunerequest calling put_TuneRequest
2010-01-18 19:03:48.666200 [6]: dvb:Submit tunerequest done calling put_TuneRequest
2010-01-18 19:03:48.666200 [6]: dvb:SubmitTuneRequest  returns:0x1 - S_FALSECall successful, but returned FALSE
2010-01-18 19:03:48.666200 [6]: dvb:SubmitTuneRequest  failed - removing subchannel: 0
2010-01-18 19:03:48.676200 [6]: card2:setuptv 8 -1
2010-01-18 19:03:48.676200 [6]: Controller: setuptv 8 -1
2010-01-18 19:03:48.676200 [6]: TV3BlasterPlugin: Received TV Server Event "EndZapChannel"
In TvCardDvbBase.cs:
Code:
    /// <summary>
    /// submits a tune request to the card.
    /// throws an TvException if card cannot tune to the channel requested
    /// </summary>
    /// <param name="subChannelId">The sub channel id.</param>
    /// <param name="channel">The channel.</param>
    /// <param name="tuneRequest">tune requests</param>
    /// <param name="performTune">Indicates if a tune is required</param>
    /// <returns></returns>
    protected ITvSubChannel SubmitTuneRequest(int subChannelId, IChannel channel, ITuneRequest tuneRequest,
                                              bool performTune)
    {
      Log.Log.Info("dvb:Submiting tunerequest Channel:{0} subChannel:{1} ", channel.Name, subChannelId);
      bool newSubChannel = false;
      if (_mapSubChannels.ContainsKey(subChannelId) == false)
      {
        Log.Log.Info("dvb:Getting new subchannel");
        newSubChannel = true;
        subChannelId = GetNewSubChannel(channel);
      }
      else
      {
        Log.Log.Info("dvb:using existing subchannel:{0}", subChannelId);
      }
      Log.Log.Info("dvb:Submit tunerequest size:{0} new:{1}", _mapSubChannels.Count, subChannelId);
      _mapSubChannels[subChannelId].CurrentChannel = channel;

      try
      {
        _mapSubChannels[subChannelId].OnBeforeTune();
        if (_interfaceEpgGrabber != null)
        {
          _interfaceEpgGrabber.Reset();
        }
        if (performTune)
        {
          Log.Log.WriteFile("dvb:Submit tunerequest calling put_TuneRequest");
          int hr = ((ITuner)_filterNetworkProvider).put_TuneRequest(tuneRequest);
          Log.Log.WriteFile("dvb:Submit tunerequest done calling put_TuneRequest");
          if (hr != 0)
          {
            Log.Log.WriteFile("dvb:SubmitTuneRequest  returns:0x{0:X} - {1}{2}", hr, HResult.GetDXErrorString(hr),
                              HResult.GetDXErrorDescription(hr));
            //remove subchannel.
            /*if (newSubChannel)
            {
            _mapSubChannels.Remove(subChannelId);
            }*/
            throw new TvException("Unable to tune to channel");
          }
        }
        _lastSignalUpdate = DateTime.MinValue;
        _mapSubChannels[subChannelId].OnAfterTune();
      }
      catch (Exception)
      {
        if (newSubChannel)
        {
          Log.Log.WriteFile("dvb:SubmitTuneRequest  failed - removing subchannel: {0}", subChannelId);
          if (_mapSubChannels.ContainsKey(subChannelId))
          {
            _mapSubChannels.Remove(subChannelId);
          }
        }
        throw;
      }

      return _mapSubChannels[subChannelId];
    }
However, it appears as though performTune is being set to true. It seems that when timeshifting stops, the previous channel information is lost. I see that "keep graph=False" in the tv log above and then the graph stops, which is why I believe the previousChannel information is lost. The previous channel information that I am thinking of is in the following function found in TvCardATSC.cs:

Code:
 /// <summary>
    /// Tunes the specified channel.
    /// </summary>
    /// <param name="subChannelId">The sub channel id.</param>
    /// <param name="channel">The channel.</param>
    /// <returns>true if succeeded else false</returns>
    public ITvSubChannel Tune(int subChannelId, IChannel channel)
    {
      Log.Log.WriteFile("atsc:Tune:{0} ", channel);
      try
      {
        ATSCChannel atscChannel = channel as ATSCChannel;
        if (atscChannel == null)
        {
          Log.Log.WriteFile("atsc:Channel is not a ATSC channel!!! {0}", channel.GetType().ToString());
          return null;
        }
        if (_graphState == GraphState.Idle)
        {
          BuildGraph();
        }
        ITvSubChannel ch;
        if (_previousChannel == null || _previousChannel.IsDifferentTransponder(atscChannel))
        {
          Log.Log.WriteFile("atsc:using new channel tuning settings");
          ITuneRequest request;
          int hr = _tuningSpace.CreateTuneRequest(out request);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - CreateTuneRequest");
          _tuneRequest = (IATSCChannelTuneRequest)request;
          ILocator locator;
          hr = _tuningSpace.get_DefaultLocator(out locator);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - get_DefaultLocator");
          IATSCLocator atscLocator = (IATSCLocator)locator;
          hr = atscLocator.put_SymbolRate(-1);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_SymbolRate");
          hr = atscLocator.put_TSID(-1);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_TSID");
          hr = atscLocator.put_CarrierFrequency((int)atscChannel.Frequency);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_CarrierFrequency");
          hr = atscLocator.put_Modulation(atscChannel.ModulationType);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_Modulation");
          hr = _tuneRequest.put_Channel(atscChannel.MajorChannel);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_Channel");
          hr = _tuneRequest.put_MinorChannel(atscChannel.MinorChannel);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_MinorChannel");
          hr = atscLocator.put_PhysicalChannel(atscChannel.PhysicalChannel);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_PhysicalChannel");
          hr = _tuneRequest.put_Locator(locator);
          if (hr != 0)
            Log.Log.WriteFile("atsc: Failed - put_Locator");
          //set QAM paramters if necessary...
          _conditionalAccess.CheckATSCQAM(atscChannel);
          ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, true);
          _previousChannel = atscChannel;
        }
        else
        {
          Log.Log.WriteFile("atsc:using previous channel tuning settings");
          ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, false);
        }
        try
        {
          RunGraph(ch.SubChannelId);
        }
        catch (TvExceptionNoSignal)
        {
          FreeSubChannel(ch.SubChannelId);
          throw;
        }
        return ch;
      }
      catch (Exception ex)
      {
        Log.Log.Write(ex);
        throw;
      }
    }
The following issues also look to be similar:
https://forum.team-mediaportal.com/1-0-final-svn-builds-303/tv-recording-streaming-52534/
https://forum.team-mediaportal.com/...-returns-0x1-vista-tv-pack-windows-7-a-52250/


Devs, is this really the desired behaviour?

After more investigation, I believe I found the culprit for the graph being stopped.

In TvCardBase.cs:
Code:
    /// <summary>
    /// Frees the sub channel.
    /// </summary>
    /// <param name="id">Handle to the subchannel.</param>
    public virtual void FreeSubChannel(int id)
    {
      FreeSubChannel(id, false);
    }
The code for DVB seems to have a lot of calls with just FreeSubChannel(id); what would be side effects of changing false to true?

I believe this link is another report of the same issue:
https://forum.team-mediaportal.com/...radio-channel-after-stopped-71793/#post534809
 

jaymode

Portal Pro
July 31, 2008
58
1
Home Country
United States of America United States of America
I found another user with the same problem, who fixed it by disabling UAC and setting the cards to ATSC. I attempted this but was not met with much success. When my ATSC cards are set to ATSC, the graphs are unable to build and I get the following output in my TV Server error log:

Code:
2010-01-20 07:16:34.466800 [6]: dvb:  No TVTuner installed
2010-01-20 07:16:34.482400 [6]: Exception   :TvLibrary.TvException: No TVTuner installed
   at TvLibrary.Implementations.DVB.TvCardDvbBase.AddAndConnectBDABoardFilters(DsDevice device)
   at TvLibrary.Implementations.DVB.TvCardATSC.BuildGraph()

2010-01-20 07:16:34.638400 [6]: Exception   :TvLibrary.TvExceptionGraphBuildingFailed: Graph building failed ---> TvLibrary.TvException: No TVTuner installed
   at TvLibrary.Implementations.DVB.TvCardDvbBase.AddAndConnectBDABoardFilters(DsDevice device)
   at TvLibrary.Implementations.DVB.TvCardATSC.BuildGraph()
   --- End of inner exception stack trace ---
   at TvLibrary.Implementations.DVB.TvCardATSC.BuildGraph()
   at TvLibrary.Implementations.DVB.TvCardATSC.Tune(Int32 subChannelId, IChannel channel)

2010-01-20 07:16:34.638400 [6]: Exception   :TvLibrary.TvExceptionGraphBuildingFailed: Graph building failed ---> TvLibrary.TvException: No TVTuner installed
   at TvLibrary.Implementations.DVB.TvCardDvbBase.AddAndConnectBDABoardFilters(DsDevice device)
   at TvLibrary.Implementations.DVB.TvCardATSC.BuildGraph()
   --- End of inner exception stack trace ---
   at TvLibrary.Implementations.DVB.TvCardATSC.BuildGraph()
   at TvLibrary.Implementations.DVB.TvCardATSC.Tune(Int32 subChannelId, IChannel channel)
   at TvLibrary.Implementations.Hybrid.HybridCardGroup.Tune(Int32 subChannelId, IChannel channel)
   at TvLibrary.Implementations.Hybrid.HybridCard.Tune(Int32 subChannelId, IChannel channel)
   at TvService.CardTuner.Tune(User& user, IChannel channel, Int32 idChannel)

2010-01-20 07:19:03.930400 [14]: Exception   :TvLibrary.TvException: Unable to tune to channel
   at TvLibrary.Implementations.DVB.TvCardDvbBase.SubmitTuneRequest(Int32 subChannelId, IChannel channel, ITuneRequest tuneRequest, Boolean performTune)
   at TvLibrary.Implementations.DVB.TvCardATSC.Tune(Int32 subChannelId, IChannel channel)

2010-01-20 07:19:03.930400 [14]: Exception   :TvLibrary.TvException: Unable to tune to channel
   at TvLibrary.Implementations.DVB.TvCardDvbBase.SubmitTuneRequest(Int32 subChannelId, IChannel channel, ITuneRequest tuneRequest, Boolean performTune)
   at TvLibrary.Implementations.DVB.TvCardATSC.Tune(Int32 subChannelId, IChannel channel)
   at TvLibrary.Implementations.Hybrid.HybridCardGroup.Tune(Int32 subChannelId, IChannel channel)
   at TvLibrary.Implementations.Hybrid.HybridCard.Tune(Int32 subChannelId, IChannel channel)
   at TvService.CardTuner.Tune(User& user, IChannel channel, Int32 idChannel)
 

kkozma

Portal Pro
February 16, 2009
189
6
Dayton, OH
Home Country
United States of America United States of America
UAC didn't have anything to do with it but I still left it disabled since it's more annoying than useful. When I changed both tuners of my hdhomerun to use atsc instead of generic provider it works with the latest svn... Go figure.

Another thing I observed is that this issue is not present with windows xp. My xp test machine worked perfectly out of the box with mp 1.1 whereas I can't even get it tune tune channels without an svn under windows 7.
Posted via Mobile Device
 

jaymode

Portal Pro
July 31, 2008
58
1
Home Country
United States of America United States of America
Sorry to reply to myself so many times, but I figured I would post an update. I formatted and did a clean install of Vista (in place of Windows 7) and did not install the TV pack and everything is now working. My feeling is that this is still a Vista TV Pack/Windows 7 issue with ATSC cards.
 

bnsaflsujt

Portal Pro
January 12, 2010
60
3
Home Country
United States of America United States of America
I would like to add my system to the pool of problem systems! I just got a new HVR-2250, and it hasn't recorded a single show since the ATSC tuners were added. Same thing, if it tries to tune consectutively (even if there is time after it has disconnected from the tuner) a different/same minor channel within a major channel, I get a "Unknown error".

I am still new to the mediaportal scene, so if you need error logs or such from me, just let me know, and I will post them!

Sincerely,
James
 

bnsaflsujt

Portal Pro
January 12, 2010
60
3
Home Country
United States of America United States of America
OK, I'm back;

I tried a few things like changing tuning type to ATSC from Generic in the card properties dialog in TV Server, and that didn't help. When I changed it to ATSC and tried to tune, I would just get a Can not create graph error. I switched it back to Generic, because I had a better time with that. This problem is a large one in my case, as the card will not tune 2 consecutive tunings on the same major channel. even if the minor is different! The only way to get it to is to put some other major channel change in between. I found the logs that I needed to post (I think). I would really appreciate getting some help on this issue, because as it stands, this will break about 100 of my upcoming 300 recordings, because they are on the same major channel group, and as I said before, it doesn't matter if one show ends and another begins in 3 hours on a different minor, it will still give an error when it tries to start.

I cleared my logs first, and tried to tune several different channels in a row. The first ones are all on the same major channel, with different minors. The last one is on a different major, which allowed it to tune. Hopefully, this will be enough for someone to fix the source of the problem. If someone needs help, I am willing to try, but I only have limited knowledge when it comes to programming.

Thanks in advance!

P.S> I have the current SVN 1-31-10 installed, and that is where these logs came from... This problem was also in the last SVN 1-08-10.

View attachment 54757
 

elliottmc
Country flag

Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Hi,

    It would be useful to know if anyone is using this card with no problems at all.

    Maybe MP is not yet compatible with this card, or some versions of drivers are not. In theory the TV server should work with all TV cards, but there are bound to be problems.

    Have you tried contacting Hauppauge support? They can be very helpful in forums.

    If it is a compatibility issue, it might take a while to resolve, as not many of the developers are familiar with this aspect.

    Best wishes,

    Mark
     

    bnsaflsujt

    Portal Pro
    January 12, 2010
    60
    3
    Home Country
    United States of America United States of America
    Let me clarify a little more as well, this issue happens with all 4 tuners on both my Hauppage HVR-2250, and ASUS EHD-100 tuner cards. Each tuner can only tune one major channel, before having to switch to another major channel, before it can tune the first major channel again (any minor channel).
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom