@@ -101,6 +101,12 @@ private async Task EnsureConnectionAsync(CancellationToken cancellationToken)
101101 throw new InvalidOperationException ( "Enigma2 Streaming Port must be configured." ) ;
102102 }
103103
104+ if ( config . TranscodedStream && string . IsNullOrEmpty ( config . TranscodingPort ) )
105+ {
106+ _logger . LogError ( "[Enigma2] Transcoding Port must be configured." ) ;
107+ throw new InvalidOperationException ( "Enigma2 Transcoding Port must be configured." ) ;
108+ }
109+
104110 if ( string . IsNullOrEmpty ( config . WebInterfacePort ) )
105111 {
106112 _logger . LogError ( "[Enigma2] Web Interface Port must be configured." ) ;
@@ -552,6 +558,7 @@ public async Task<List<ChannelInfo>> GetChannelsForTVBouquetAsync(CancellationTo
552558 /// <returns>Task{IEnumerable{RecordingInfo}}</returns>
553559 public async Task < IEnumerable < RecordingInfo > > GetRecordingsAsync ( CancellationToken cancellationToken )
554560 {
561+ await Task . Delay ( 0 ) ; //to avoid await warnings
555562 return new List < RecordingInfo > ( ) ;
556563 }
557564
@@ -1127,8 +1134,15 @@ public async Task<MediaSourceInfo> GetChannelStream(string channelOid, string me
11271134 protocol = "https" ;
11281135 }
11291136
1130- var baseUrl = protocol + "://" + Plugin . Instance . Configuration . HostName + ":" + Plugin . Instance . Configuration . StreamingPort ;
1137+ var streamingPort = Plugin . Instance . Configuration . StreamingPort ;
1138+
1139+ if ( Plugin . Instance . Configuration . TranscodedStream )
1140+ {
1141+ streamingPort = Plugin . Instance . Configuration . TranscodingPort ;
1142+ }
11311143
1144+ var baseUrl = protocol + "://" + Plugin . Instance . Configuration . HostName + ":" + streamingPort ;
1145+
11321146 //check if we need to zap to channel - single tuner
11331147 if ( Plugin . Instance . Configuration . ZapToChannel )
11341148 {
@@ -1137,11 +1151,17 @@ public async Task<MediaSourceInfo> GetChannelStream(string channelOid, string me
11371151
11381152 if ( Plugin . Instance . Configuration . UseLoginForStreams && ! string . IsNullOrEmpty ( Plugin . Instance . Configuration . WebInterfaceUsername ) )
11391153 {
1140- baseUrl = protocol + "://" + Plugin . Instance . Configuration . WebInterfaceUsername + ":" + Plugin . Instance . Configuration . WebInterfacePassword + "@" + Plugin . Instance . Configuration . HostName + ":" + Plugin . Instance . Configuration . StreamingPort ;
1154+ baseUrl = protocol + "://" + Plugin . Instance . Configuration . WebInterfaceUsername + ":" + Plugin . Instance . Configuration . WebInterfacePassword + "@" + Plugin . Instance . Configuration . HostName + ":" + streamingPort ;
1155+ }
1156+
1157+ var trancodingUrl = "" ;
1158+ if ( Plugin . Instance . Configuration . TranscodedStream )
1159+ {
1160+ trancodingUrl = "?bitrate=1000000?width=1280?height=720?vcodec=h264?aspectratio=2?interlaced=0.mp4" ;
11411161 }
11421162
11431163 _liveStreams ++ ;
1144- var streamUrl = string . Format ( "{0}/{1}" , baseUrl , channelOid ) ;
1164+ var streamUrl = string . Format ( "{0}/{1}{2} " , baseUrl , channelOid , trancodingUrl ) ;
11451165 UtilsHelper . DebugInformation ( _logger , string . Format ( "[Enigma2] GetChannelStream url: {0}" , streamUrl ) ) ;
11461166
11471167 return new MediaSourceInfo
@@ -1258,6 +1278,7 @@ public async Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken ca
12581278 {
12591279 _logger . LogInformation ( "[Enigma2] Start GetNewTimerDefaultsAsync" ) ;
12601280
1281+ await Task . Delay ( 0 ) ; //to avoid await warnings
12611282 var seriesTimerInfo = new SeriesTimerInfo ( ) ;
12621283
12631284 return seriesTimerInfo ;
@@ -1553,12 +1574,14 @@ public async Task<LiveTvServiceStatusInfo> GetStatusInfoAsync(CancellationToken
15531574
15541575 public async Task < MediaSourceInfo > GetRecordingStream ( string recordingId , string mediaSourceId , CancellationToken cancellationToken )
15551576 {
1577+ await Task . Delay ( 0 ) ; //to avoid await warnings
15561578 throw new NotImplementedException ( ) ;
15571579 }
15581580
15591581
15601582 public async Task CloseLiveStream ( string id , CancellationToken cancellationToken )
15611583 {
1584+ await Task . Delay ( 0 ) ; //to avoid await warnings
15621585 throw new NotImplementedException ( ) ;
15631586 }
15641587
@@ -1589,7 +1612,7 @@ public Task RecordLiveStream(string id, CancellationToken cancellationToken)
15891612 public async Task < IEnumerable < SeriesTimerInfo > > GetSeriesTimersAsync ( CancellationToken cancellationToken )
15901613 {
15911614 _logger . LogInformation ( "[Enigma2] Start GetSeriesTimersAsync" ) ;
1592-
1615+ await Task . Delay ( 0 ) ; //to avoid await warnings
15931616 var seriesTimerInfo = new List < SeriesTimerInfo > ( ) ;
15941617 return seriesTimerInfo ;
15951618 }
@@ -1603,6 +1626,7 @@ public async Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(Cancellatio
16031626 /// <returns></returns>
16041627 public async Task CreateSeriesTimerAsync ( SeriesTimerInfo info , CancellationToken cancellationToken )
16051628 {
1629+ await Task . Delay ( 0 ) ; //to avoid await warnings
16061630 throw new NotImplementedException ( ) ;
16071631 }
16081632
@@ -1615,6 +1639,7 @@ public async Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken
16151639 /// <returns></returns>
16161640 public async Task UpdateSeriesTimerAsync ( SeriesTimerInfo info , CancellationToken cancellationToken )
16171641 {
1642+ await Task . Delay ( 0 ) ; //to avoid await warnings
16181643 throw new NotImplementedException ( ) ;
16191644 }
16201645
@@ -1627,6 +1652,7 @@ public async Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken
16271652 /// <returns></returns>
16281653 public async Task UpdateTimerAsync ( TimerInfo info , CancellationToken cancellationToken )
16291654 {
1655+ await Task . Delay ( 0 ) ; //to avoid await warnings
16301656 throw new NotImplementedException ( ) ;
16311657 }
16321658
@@ -1639,27 +1665,11 @@ public async Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellatio
16391665 /// <returns></returns>
16401666 public async Task CancelSeriesTimerAsync ( string timerId , CancellationToken cancellationToken )
16411667 {
1668+ await Task . Delay ( 0 ) ; //to avoid await warnings
16421669 throw new NotImplementedException ( ) ;
16431670 }
16441671
16451672
1646- /// <summary>
1647- /// Get the DefaultScheduleSettings
1648- /// </summary>
1649- /// <param name="cancellationToken">The CancellationToken</param>
1650- /// <returns></returns>
1651- //private async Task<ScheduleSettings> GetDefaultScheduleSettings(CancellationToken cancellationToken)
1652- //{
1653- // throw new NotImplementedException();
1654- //}
1655-
1656-
1657- public event EventHandler DataSourceChanged ;
1658-
1659-
1660- public event EventHandler < RecordingStatusChangedEventArgs > RecordingStatusChanged ;
1661-
1662-
16631673 public Task ResetTuner ( string id , CancellationToken cancellationToken )
16641674 {
16651675 throw new NotImplementedException ( ) ;
0 commit comments