Skip to content

Commit 8ae80e8

Browse files
authored
Merge pull request #331 from MediaPortal/MP1.35_Pre.Release
MP1.35 Pre Release
2 parents 58c9558 + cb4ca3e commit 8ae80e8

File tree

15 files changed

+138
-62
lines changed

15 files changed

+138
-62
lines changed

Common-MP-TVE3/SolutionInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
// You can specify all the values or you can default the Revision and Build Numbers
5151
// by using the '*' as shown below:
5252

53-
[assembly: AssemblyVersion("1.34.000.0")]
54-
[assembly: AssemblyFileVersion("1.34.000.0")]
53+
[assembly: AssemblyVersion("1.34.100.0")]
54+
[assembly: AssemblyFileVersion("1.34.100.0")]
5555

5656
//[assembly: AssemblyInformationalVersion("")]
5757
//[assembly: CompatibleVersion("1.1.8.*", "1.1.8.*")]

Tools/InstallationScripts/include/MediaPortalCurrentVersion.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
!define VER_MAJOR 1
3434
!define VER_MINOR 34
35-
!define VER_REVISION 000
35+
!define VER_REVISION 100
3636

3737
#**********************************************************************************************************#
3838

Tools/MediaPortal.DeployTool/Utils.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,8 @@ public static Version GetPackageVersion(string type)
781781
break;
782782
case "max":
783783
major = 1;
784-
minor = 33;
785-
revision = 100;
784+
minor = 34;
785+
revision = 000;
786786
break;
787787
}
788788
Version ver = new Version(major, minor, revision);
@@ -803,7 +803,7 @@ public static Version GetCurrentPackageVersion()
803803
{
804804
int major = 1;
805805
int minor = 34;
806-
int revision = 000;
806+
int revision = 100;
807807

808808
Version ver = new Version(major, minor, revision);
809809
return ver;
@@ -853,7 +853,7 @@ public static Version VersionFromRegistry(string regkey)
853853

854854
public static string GetDisplayVersion()
855855
{
856-
return "1.34 Dune";
856+
return "1.35 Pre Release";
857857
}
858858

859859
/// <summary>

TvEngine3/TVLibrary/TVDatabase/TvBusinessLayer/BusinessLayer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3399,7 +3399,7 @@ public bool IsChannelMappedToCard(Channel dbChannel, Card card, bool forEpg)
33993399
/// </summary>
34003400
public void SetLogLevel()
34013401
{
3402-
var logLevel = (LogLevel)int.Parse(GetSetting("loglevel", "4").Value); // debug is "5", info is "4"
3402+
var logLevel = (LogLevel)int.Parse(GetSetting("loglevel", "5").Value); // debug is "5", info is "4"
34033403
Log.SetLogLevel(logLevel);
34043404
}
34053405
}

TvEngine3/TVLibrary/TVLibrary/Implementations/DVB/Graphs/TvCardDvbBase.cs

+29-25
Original file line numberDiff line numberDiff line change
@@ -319,41 +319,44 @@ public virtual ITvSubChannel Tune(int subChannelId, IChannel channel)
319319
}
320320

321321
private ITvSubChannel DoTune(int subChannelId, IChannel channel, bool ignorePMT)
322-
{
323-
bool performTune = (_previousChannel == null || _previousChannel.IsDifferentTransponder(channel));
324-
ITvSubChannel ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, performTune);
325-
_previousChannel = channel;
326-
322+
{
327323
try
328324
{
329-
if (ch != null)
325+
bool performTune = (_previousChannel == null || _previousChannel.IsDifferentTransponder(channel));
326+
ITvSubChannel ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, performTune);
327+
_previousChannel = channel;
328+
329+
try
330330
{
331-
try
331+
if (ch != null)
332332
{
333-
RunGraph(ch.SubChannelId);
334-
}
335-
catch (TvExceptionNoPMT)
336-
{
337-
if (!ignorePMT)
333+
try
334+
{
335+
RunGraph(ch.SubChannelId);
336+
}
337+
catch (TvExceptionNoPMT)
338338
{
339-
throw;
339+
if (!ignorePMT)
340+
{
341+
throw;
342+
}
340343
}
344+
OnAfterTune(channel);
345+
return ch;
346+
}
347+
else
348+
{
349+
throw new TvException("TvCardDvbBase.Tune: Subchannel was null");
341350
}
342-
OnAfterTune(channel);
343-
return ch;
344-
}
345-
else
346-
{
347-
throw new TvException("TvCardDvbBase.Tune: Subchannel was null");
348351
}
349-
}
350-
catch (Exception)
351-
{
352-
if (ch != null)
352+
catch (Exception)
353353
{
354-
FreeSubChannel(ch.SubChannelId);
354+
if (ch != null)
355+
{
356+
FreeSubChannel(ch.SubChannelId);
357+
}
358+
throw;
355359
}
356-
throw;
357360
}
358361
finally
359362
{
@@ -953,6 +956,7 @@ public override void StopGraph()
953956
_epgGrabbing = false;
954957
_isScanning = false;
955958
FreeAllSubChannels();
959+
_cancelTune = false;
956960
if (_mdplugs != null)
957961
{
958962
_mdplugs.FreeAllChannels();

TvEngine3/TVLibrary/TvLibrary.Interfaces/DvbTextConverter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ public static string Convert(IntPtr ptr, string lang)
126126
string result;
127127
if (encoding == 20269)
128128
result = ISOTextDecoder.from_ISO_6937_EU(text);
129-
else if (encoding == 20600)
129+
else if (encoding == 28600)
130130
result = ISOTextDecoder.from_ISO_8859_10(text);
131-
else if (encoding == 20604)
131+
else if (encoding == 28604)
132132
result = ISOTextDecoder.from_ISO_8859_14(text);
133133
else
134134
result = System.Text.Encoding.GetEncoding(encoding).GetString(text);

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1.34.Final.{build}
1+
version: 1.35.Pre.Release.{build}
22
image: Visual Studio 2019
33
clone_folder: c:\project\mediaportal
44
environment:

mediaportal/Configuration/App.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<loadFromRemoteSources enabled="true" />
2424
</runtime>
2525
<appSettings>
26-
<add key="version" value="1.34-Dune" />
26+
<add key="version" value="1.35-Pre Release" />
2727
</appSettings>
2828
<startup useLegacyV2RuntimeActivationPolicy="true">
2929
<supportedRuntime version="v4.0.30319" />

mediaportal/Configuration/Sections/General.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public General(string name)
4242
InitializeComponent();
4343
}
4444

45-
private string loglevel = "2"; // 1= error, 2 = info, 3 = debug
45+
private string loglevel = "3"; // 1= error, 2 = info, 3 = debug
4646

4747
/// <summary>
4848
/// Erforderliche Designervariable.

mediaportal/Core/Player/FrameGrabber.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private FrameGrabber()
6262
}
6363

6464
// MP1-4248 : Start* Line Code for Ambilight System Capture (Atmolight)
65-
public delegate void NewFrameHandler(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Surface pSurface, FrameSource FrameSource);
65+
public delegate void NewFrameHandler(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pSurface, FrameSource FrameSource);
6666

6767
public event NewFrameHandler OnNewFrame;
6868
// MP1-4248 : End* Ambilight Capture
@@ -315,7 +315,7 @@ public void OnFrameGUI(Surface surface)
315315
{
316316
unsafe
317317
{
318-
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, surface, FrameSource.GUI);
318+
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, (IntPtr)surface, FrameSource.GUI);
319319
}
320320
}
321321
}
@@ -328,7 +328,7 @@ public void OnFrameGUI(Surface surface)
328328
/// <param name="arWidth"></param>
329329
/// <param name="arHeight"></param>
330330
/// <param name="pTargetmadVrDib"></param>
331-
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
331+
public void OnFrameMadVrDib(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
332332
{
333333
FrameGrabberD3D9Enable = false;
334334
//Dont pass GUI frames to GetCurrentImage() -> VideoModeSwitcher is using it
@@ -408,7 +408,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, In
408408
/// <param name="arWidth"></param>
409409
/// <param name="arHeight"></param>
410410
/// <param name="pSurface"></param>
411-
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Surface pSurface, FrameSource FrameSource)
411+
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pSurface, FrameSource FrameSource)
412412
{
413413
FrameGrabberD3D9Enable = true;
414414
// MP1-4248 :Start* Line Code for Ambilight System Capture (Atmolight)
@@ -471,7 +471,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Su
471471
// Log.Debug("Calling VideoSurfaceToRGBSurface");
472472
if (rgbSurface != null)
473473
{
474-
VideoSurfaceToRGBSurface((IntPtr)pSurface, (IntPtr)rgbSurface);
474+
VideoSurfaceToRGBSurface(pSurface, (IntPtr)rgbSurface);
475475
}
476476
lock (grabNotifier)
477477
{

mediaportal/Core/Player/PlaneScene.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ public void RenderFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight
786786
lock (GUIGraphicsContext.RenderModeSwitch)
787787
{
788788
if (grabber != null)
789-
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, surfaceMadVr,
789+
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, (IntPtr)surfaceMadVr,
790790
FrameGrabber.FrameSource.Video);
791791
}
792792
}

mediaportal/Core/Player/RefreshRateChanger.cs

+50-12
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,9 @@ private static void FindExtCmdfromSettings(double fps, out double newRR,
651651
newExtCmd = "";
652652
newRRDescription = "";
653653

654+
//Round fps down to 3 decimal places
655+
fps = Math.Round(fps, 3);
656+
654657
foreach (RefreshRateSetting setting in _refreshRateSettings)
655658
{
656659
foreach (double fpsSetting in setting.Fps)
@@ -1089,30 +1092,65 @@ public static void AdaptRefreshRateFromVideoDecoder(string strFile)
10891092
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Video Decoder found.");
10901093

10911094
DirectShowLib.IPin pin;
1092-
int iResult = filter.FindPin("In", out pin);
1095+
int iResult = filter.FindPin("Out", out pin);
10931096
if (iResult == 0)
10941097
{
1095-
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Input Pin of Video Decoder retrieved.");
1098+
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Output Pin of Video Decoder retrieved.");
10961099
DirectShowLib.AMMediaType mediatype = new DirectShowLib.AMMediaType();
10971100
iResult = pin.ConnectionMediaType(mediatype);
10981101

10991102
if (iResult == 0)
11001103
{
1101-
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AMMediaType: " + mediatype.formatType.ToString());
1102-
1103-
DirectShowLib.VideoInfoHeader videoHeader = new DirectShowLib.VideoInfoHeader();
1104-
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);
1104+
bool bInterlaced = false;
1105+
string strGUID = mediatype.formatType.ToString();
1106+
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AMMediaType: " + strGUID);
11051107

1106-
if (videoHeader != null)
1108+
if (strGUID.Equals("F72A76A0-EB0A-11D0-ACE4-0000C0CC16BA", StringComparison.OrdinalIgnoreCase) //VIDEOINFOHEADER2
1109+
|| strGUID.Equals("E06D80E3-DB46-11CF-B4D1-00805F6CBBEA", StringComparison.OrdinalIgnoreCase)) //WMFORMAT_MPEG2Video
1110+
{
1111+
DirectShowLib.VideoInfoHeader2 videoHeader = new DirectShowLib.VideoInfoHeader2();
1112+
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);
1113+
if (videoHeader != null)
1114+
{
1115+
bInterlaced = (videoHeader.InterlaceFlags & DirectShowLib.AMInterlace.IsInterlaced) == DirectShowLib.AMInterlace.IsInterlaced;
1116+
dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
1117+
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader2: {0}, Interlaced: {1}",
1118+
videoHeader.AvgTimePerFrame, bInterlaced);
1119+
}
1120+
}
1121+
else
11071122
{
1108-
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader: " + videoHeader.AvgTimePerFrame);
1123+
DirectShowLib.VideoInfoHeader videoHeader = new DirectShowLib.VideoInfoHeader();
1124+
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);
1125+
1126+
if (videoHeader != null)
1127+
{
1128+
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader: " + videoHeader.AvgTimePerFrame);
1129+
dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
1130+
}
1131+
}
11091132

1110-
dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
1133+
if (dFps == 23.98)
1134+
dFps = 23.976;
11111135

1112-
if (dFps == 23.98)
1113-
dFps = 23.976;
1136+
Log.Info("[AdaptRefreshRateFromVideoDecoder] Detected FPS from Video Decoder: " + dFps);
11141137

1115-
Log.Info("[AdaptRefreshRateFromVideoDecoder] Detected FPS from Video Decoder: " + dFps);
1138+
if (bInterlaced)
1139+
{
1140+
switch (dFps)
1141+
{
1142+
case 25:
1143+
dFps = 50.0;
1144+
break;
1145+
1146+
case 29.97:
1147+
dFps = 59.97;
1148+
break;
1149+
1150+
case 30:
1151+
dFps = 60.0;
1152+
break;
1153+
}
11161154
}
11171155
}
11181156
else

mediaportal/MediaPortal.Application/App.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<loadFromRemoteSources enabled="true" />
3636
</runtime>
3737
<appSettings>
38-
<add key="version" value="1.34-Dune" />
38+
<add key="version" value="1.35-Pre Release" />
3939
<add key="edtftp.log.level" value="ALL" />
4040
<add key="ClientSettingsProvider.ServiceUri" value="" />
4141
</appSettings>

mediaportal/MediaPortal.Base/skin/DefaultWideHD/BasicHome.xml

+38-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<align>left</align>
4545
<width>1800</width>
4646
<height>58</height>
47-
<visible>!skin.hastheme(Xmas)</visible>
47+
<visible>!skin.hastheme(Xmas)+[plugin.isenabled(World Weather)|plugin.isenabled(World Weather Lite)]</visible>
4848
<control>
4949
<type>fadelabel</type>
5050
<description>Date Time Weather Label</description>
@@ -93,7 +93,7 @@
9393
<align>left</align>
9494
<width>1800</width>
9595
<height>58</height>
96-
<visible>skin.hastheme(Xmas)</visible>
96+
<visible>skin.hastheme(Xmas)+[plugin.isenabled(World Weather)|plugin.isenabled(World Weather Lite)]</visible>
9797
<control>
9898
<type>fadelabel</type>
9999
<description>Date Time Weather Label</description>
@@ -103,8 +103,8 @@
103103
<maxWidth>1600</maxWidth>
104104
<textcolor>gold</textcolor>
105105
<shadowAngle>10</shadowAngle>
106-
<shadowDistance>2</shadowDistance>
107-
<shadowColor>ff000000</shadowColor>
106+
<shadowDistance>2</shadowDistance>
107+
<shadowColor>ff000000</shadowColor>
108108
<align>left</align>
109109
<font>Label</font>
110110
</control>
@@ -132,6 +132,40 @@
132132
<font>Label</font>
133133
</control>
134134
</control>
135+
<control>
136+
<description>Date</description>
137+
<type>label</type>
138+
<id>0</id>
139+
<posX>45</posX>
140+
<posY>15</posY>
141+
<width>1800</width>
142+
<height>58</height>
143+
<label>#time #scroll.wrap #date</label>
144+
<font>Label</font>
145+
<align>left</align>
146+
<textcolor>ff6FAFE1</textcolor>
147+
<shadowAngle>10</shadowAngle>
148+
<shadowDistance>2</shadowDistance>
149+
<shadowColor>ff000000</shadowColor>
150+
<visible>!skin.hastheme(Xmas)+!plugin.isenabled(World Weather)+!plugin.isenabled(World Weather Lite)</visible>
151+
</control>
152+
<control>
153+
<description>Date</description>
154+
<type>label</type>
155+
<id>0</id>
156+
<posX>45</posX>
157+
<posY>15</posY>
158+
<width>1800</width>
159+
<height>58</height>
160+
<label>#time #scroll.wrap #date</label>
161+
<font>Label</font>
162+
<align>left</align>
163+
<textcolor>gold</textcolor>
164+
<shadowAngle>10</shadowAngle>
165+
<shadowDistance>2</shadowDistance>
166+
<shadowColor>ff000000</shadowColor>
167+
<visible>skin.hastheme(Xmas)+!plugin.isenabled(World Weather)+!plugin.isenabled(World Weather Lite)</visible>
168+
</control>
135169

136170
<!-- ******************************************************************************************* -->
137171
<!-- *************************** INFOS ON BASIC HOME (NOW PLAYING AUDIO) *********************** -->

0 commit comments

Comments
 (0)