Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP1.35 Pre Release #331

Merged
merged 16 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
78cb7a1
MP1-5221: Core: FrameGrabber: Fix frame grabbing (for EVR)
Jul 18, 2024
90f8251
Merge pull request #324 from MediaPortal/MP1-5221-Fix_FrameGrabbing_f…
andrewjswan Jul 19, 2024
8a5dbf5
MP1-5222: TV Server: Fix ISO-8859-10/14 DVB text encodings
Jul 19, 2024
cd19c89
Merge pull request #325 from MediaPortal/MP1-5222-TV_Server_Fix_ISO-8…
andrewjswan Jul 22, 2024
d92ecf8
MP1-5223: Core: RefreshRateChanger: Round down detected FPS prior ada…
Jul 29, 2024
fb792c1
MP1-5223: Core: RefreshRateChanger: Improve FPS detection form VideoD…
Jul 29, 2024
720e641
Merge pull request #326 from MediaPortal/MP1-5223-Improvement_of_Refr…
andrewjswan Jul 30, 2024
02ef5a7
MP1-5224: TvServer: TvLibrary: Fix CancelTune request (remains perman…
Jul 30, 2024
96a5491
Merge pull request #327 from MediaPortal/MP1-5224_Fix_Card_CancelTune…
andrewjswan Jul 31, 2024
07ba889
MP1.35.Pre: Bump version number and set INFO level to DEBUG
andrewjswan Aug 31, 2024
ce78b0a
MP1.35.Pre: DWHD Update
andrewjswan Aug 31, 2024
5fca732
Merge pull request #328 from MediaPortal/MP1.35.Pre-Bump_version_numb…
andrewjswan Aug 31, 2024
2d2f7b8
Merge pull request #329 from MediaPortal/MP1.35.Pre-DWHD_Update
andrewjswan Sep 1, 2024
093230e
MP1.35.Pre: Bump version number and set INFO level to DEBUG
andrewjswan Aug 31, 2024
584a0ef
Merge branch 'MP1.35_Pre.Release_Test1' into MP1.35.Pre-Bump_version_…
andrewjswan Sep 1, 2024
cb4ca3e
Merge pull request #330 from MediaPortal/MP1.35.Pre-Bump_version_numb…
andrewjswan Sep 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Common-MP-TVE3/SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.34.000.0")]
[assembly: AssemblyFileVersion("1.34.000.0")]
[assembly: AssemblyVersion("1.34.100.0")]
[assembly: AssemblyFileVersion("1.34.100.0")]

//[assembly: AssemblyInformationalVersion("")]
//[assembly: CompatibleVersion("1.1.8.*", "1.1.8.*")]
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

!define VER_MAJOR 1
!define VER_MINOR 34
!define VER_REVISION 000
!define VER_REVISION 100

#**********************************************************************************************************#

Expand Down
8 changes: 4 additions & 4 deletions Tools/MediaPortal.DeployTool/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,8 @@ public static Version GetPackageVersion(string type)
break;
case "max":
major = 1;
minor = 33;
revision = 100;
minor = 34;
revision = 000;
break;
}
Version ver = new Version(major, minor, revision);
Expand All @@ -803,7 +803,7 @@ public static Version GetCurrentPackageVersion()
{
int major = 1;
int minor = 34;
int revision = 000;
int revision = 100;

Version ver = new Version(major, minor, revision);
return ver;
Expand Down Expand Up @@ -853,7 +853,7 @@ public static Version VersionFromRegistry(string regkey)

public static string GetDisplayVersion()
{
return "1.34 Dune";
return "1.35 Pre Release";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3399,7 +3399,7 @@ public bool IsChannelMappedToCard(Channel dbChannel, Card card, bool forEpg)
/// </summary>
public void SetLogLevel()
{
var logLevel = (LogLevel)int.Parse(GetSetting("loglevel", "4").Value); // debug is "5", info is "4"
var logLevel = (LogLevel)int.Parse(GetSetting("loglevel", "5").Value); // debug is "5", info is "4"
Log.SetLogLevel(logLevel);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,41 +319,44 @@ public virtual ITvSubChannel Tune(int subChannelId, IChannel channel)
}

private ITvSubChannel DoTune(int subChannelId, IChannel channel, bool ignorePMT)
{
bool performTune = (_previousChannel == null || _previousChannel.IsDifferentTransponder(channel));
ITvSubChannel ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, performTune);
_previousChannel = channel;

{
try
{
if (ch != null)
bool performTune = (_previousChannel == null || _previousChannel.IsDifferentTransponder(channel));
ITvSubChannel ch = SubmitTuneRequest(subChannelId, channel, _tuneRequest, performTune);
_previousChannel = channel;

try
{
try
if (ch != null)
{
RunGraph(ch.SubChannelId);
}
catch (TvExceptionNoPMT)
{
if (!ignorePMT)
try
{
RunGraph(ch.SubChannelId);
}
catch (TvExceptionNoPMT)
{
throw;
if (!ignorePMT)
{
throw;
}
}
OnAfterTune(channel);
return ch;
}
else
{
throw new TvException("TvCardDvbBase.Tune: Subchannel was null");
}
OnAfterTune(channel);
return ch;
}
else
{
throw new TvException("TvCardDvbBase.Tune: Subchannel was null");
}
}
catch (Exception)
{
if (ch != null)
catch (Exception)
{
FreeSubChannel(ch.SubChannelId);
if (ch != null)
{
FreeSubChannel(ch.SubChannelId);
}
throw;
}
throw;
}
finally
{
Expand Down Expand Up @@ -953,6 +956,7 @@ public override void StopGraph()
_epgGrabbing = false;
_isScanning = false;
FreeAllSubChannels();
_cancelTune = false;
if (_mdplugs != null)
{
_mdplugs.FreeAllChannels();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ public static string Convert(IntPtr ptr, string lang)
string result;
if (encoding == 20269)
result = ISOTextDecoder.from_ISO_6937_EU(text);
else if (encoding == 20600)
else if (encoding == 28600)
result = ISOTextDecoder.from_ISO_8859_10(text);
else if (encoding == 20604)
else if (encoding == 28604)
result = ISOTextDecoder.from_ISO_8859_14(text);
else
result = System.Text.Encoding.GetEncoding(encoding).GetString(text);
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.34.Final.{build}
version: 1.35.Pre.Release.{build}
image: Visual Studio 2019
clone_folder: c:\project\mediaportal
environment:
Expand Down
2 changes: 1 addition & 1 deletion mediaportal/Configuration/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<loadFromRemoteSources enabled="true" />
</runtime>
<appSettings>
<add key="version" value="1.34-Dune" />
<add key="version" value="1.35-Pre Release" />
</appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319" />
Expand Down
2 changes: 1 addition & 1 deletion mediaportal/Configuration/Sections/General.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public General(string name)
InitializeComponent();
}

private string loglevel = "2"; // 1= error, 2 = info, 3 = debug
private string loglevel = "3"; // 1= error, 2 = info, 3 = debug

/// <summary>
/// Erforderliche Designervariable.
Expand Down
10 changes: 5 additions & 5 deletions mediaportal/Core/Player/FrameGrabber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private FrameGrabber()
}

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

public event NewFrameHandler OnNewFrame;
// MP1-4248 : End* Ambilight Capture
Expand Down Expand Up @@ -315,7 +315,7 @@ public void OnFrameGUI(Surface surface)
{
unsafe
{
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, surface, FrameSource.GUI);
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, (IntPtr)surface, FrameSource.GUI);
}
}
}
Expand All @@ -328,7 +328,7 @@ public void OnFrameGUI(Surface surface)
/// <param name="arWidth"></param>
/// <param name="arHeight"></param>
/// <param name="pTargetmadVrDib"></param>
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
public void OnFrameMadVrDib(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
{
FrameGrabberD3D9Enable = false;
//Dont pass GUI frames to GetCurrentImage() -> VideoModeSwitcher is using it
Expand Down Expand Up @@ -408,7 +408,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, In
/// <param name="arWidth"></param>
/// <param name="arHeight"></param>
/// <param name="pSurface"></param>
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Surface pSurface, FrameSource FrameSource)
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pSurface, FrameSource FrameSource)
{
FrameGrabberD3D9Enable = true;
// MP1-4248 :Start* Line Code for Ambilight System Capture (Atmolight)
Expand Down Expand Up @@ -471,7 +471,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Su
// Log.Debug("Calling VideoSurfaceToRGBSurface");
if (rgbSurface != null)
{
VideoSurfaceToRGBSurface((IntPtr)pSurface, (IntPtr)rgbSurface);
VideoSurfaceToRGBSurface(pSurface, (IntPtr)rgbSurface);
}
lock (grabNotifier)
{
Expand Down
2 changes: 1 addition & 1 deletion mediaportal/Core/Player/PlaneScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public void RenderFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight
lock (GUIGraphicsContext.RenderModeSwitch)
{
if (grabber != null)
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, surfaceMadVr,
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, (IntPtr)surfaceMadVr,
FrameGrabber.FrameSource.Video);
}
}
Expand Down
62 changes: 50 additions & 12 deletions mediaportal/Core/Player/RefreshRateChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ private static void FindExtCmdfromSettings(double fps, out double newRR,
newExtCmd = "";
newRRDescription = "";

//Round fps down to 3 decimal places
fps = Math.Round(fps, 3);

foreach (RefreshRateSetting setting in _refreshRateSettings)
{
foreach (double fpsSetting in setting.Fps)
Expand Down Expand Up @@ -1089,30 +1092,65 @@ public static void AdaptRefreshRateFromVideoDecoder(string strFile)
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Video Decoder found.");

DirectShowLib.IPin pin;
int iResult = filter.FindPin("In", out pin);
int iResult = filter.FindPin("Out", out pin);
if (iResult == 0)
{
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Input Pin of Video Decoder retrieved.");
Log.Debug("[AdaptRefreshRateFromVideoDecoder] Output Pin of Video Decoder retrieved.");
DirectShowLib.AMMediaType mediatype = new DirectShowLib.AMMediaType();
iResult = pin.ConnectionMediaType(mediatype);

if (iResult == 0)
{
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AMMediaType: " + mediatype.formatType.ToString());

DirectShowLib.VideoInfoHeader videoHeader = new DirectShowLib.VideoInfoHeader();
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);
bool bInterlaced = false;
string strGUID = mediatype.formatType.ToString();
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AMMediaType: " + strGUID);

if (videoHeader != null)
if (strGUID.Equals("F72A76A0-EB0A-11D0-ACE4-0000C0CC16BA", StringComparison.OrdinalIgnoreCase) //VIDEOINFOHEADER2
|| strGUID.Equals("E06D80E3-DB46-11CF-B4D1-00805F6CBBEA", StringComparison.OrdinalIgnoreCase)) //WMFORMAT_MPEG2Video
{
DirectShowLib.VideoInfoHeader2 videoHeader = new DirectShowLib.VideoInfoHeader2();
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);
if (videoHeader != null)
{
bInterlaced = (videoHeader.InterlaceFlags & DirectShowLib.AMInterlace.IsInterlaced) == DirectShowLib.AMInterlace.IsInterlaced;
dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader2: {0}, Interlaced: {1}",
videoHeader.AvgTimePerFrame, bInterlaced);
}
}
else
{
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader: " + videoHeader.AvgTimePerFrame);
DirectShowLib.VideoInfoHeader videoHeader = new DirectShowLib.VideoInfoHeader();
Marshal.PtrToStructure(mediatype.formatPtr, videoHeader);

if (videoHeader != null)
{
Log.Debug("[AdaptRefreshRateFromVideoDecoder] AvgTimePerFrame from VideoInfoHeader: " + videoHeader.AvgTimePerFrame);
dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
}
}

dFps = Math.Round(10000000F / videoHeader.AvgTimePerFrame, 2);
if (dFps == 23.98)
dFps = 23.976;

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

Log.Info("[AdaptRefreshRateFromVideoDecoder] Detected FPS from Video Decoder: " + dFps);
if (bInterlaced)
{
switch (dFps)
{
case 25:
dFps = 50.0;
break;

case 29.97:
dFps = 59.97;
break;

case 30:
dFps = 60.0;
break;
}
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion mediaportal/MediaPortal.Application/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<loadFromRemoteSources enabled="true" />
</runtime>
<appSettings>
<add key="version" value="1.34-Dune" />
<add key="version" value="1.35-Pre Release" />
<add key="edtftp.log.level" value="ALL" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
Expand Down
42 changes: 38 additions & 4 deletions mediaportal/MediaPortal.Base/skin/DefaultWideHD/BasicHome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<align>left</align>
<width>1800</width>
<height>58</height>
<visible>!skin.hastheme(Xmas)</visible>
<visible>!skin.hastheme(Xmas)+[plugin.isenabled(World Weather)|plugin.isenabled(World Weather Lite)]</visible>
<control>
<type>fadelabel</type>
<description>Date Time Weather Label</description>
Expand Down Expand Up @@ -93,7 +93,7 @@
<align>left</align>
<width>1800</width>
<height>58</height>
<visible>skin.hastheme(Xmas)</visible>
<visible>skin.hastheme(Xmas)+[plugin.isenabled(World Weather)|plugin.isenabled(World Weather Lite)]</visible>
<control>
<type>fadelabel</type>
<description>Date Time Weather Label</description>
Expand All @@ -103,8 +103,8 @@
<maxWidth>1600</maxWidth>
<textcolor>gold</textcolor>
<shadowAngle>10</shadowAngle>
<shadowDistance>2</shadowDistance>
<shadowColor>ff000000</shadowColor>
<shadowDistance>2</shadowDistance>
<shadowColor>ff000000</shadowColor>
<align>left</align>
<font>Label</font>
</control>
Expand Down Expand Up @@ -132,6 +132,40 @@
<font>Label</font>
</control>
</control>
<control>
<description>Date</description>
<type>label</type>
<id>0</id>
<posX>45</posX>
<posY>15</posY>
<width>1800</width>
<height>58</height>
<label>#time #scroll.wrap #date</label>
<font>Label</font>
<align>left</align>
<textcolor>ff6FAFE1</textcolor>
<shadowAngle>10</shadowAngle>
<shadowDistance>2</shadowDistance>
<shadowColor>ff000000</shadowColor>
<visible>!skin.hastheme(Xmas)+!plugin.isenabled(World Weather)+!plugin.isenabled(World Weather Lite)</visible>
</control>
<control>
<description>Date</description>
<type>label</type>
<id>0</id>
<posX>45</posX>
<posY>15</posY>
<width>1800</width>
<height>58</height>
<label>#time #scroll.wrap #date</label>
<font>Label</font>
<align>left</align>
<textcolor>gold</textcolor>
<shadowAngle>10</shadowAngle>
<shadowDistance>2</shadowDistance>
<shadowColor>ff000000</shadowColor>
<visible>skin.hastheme(Xmas)+!plugin.isenabled(World Weather)+!plugin.isenabled(World Weather Lite)</visible>
</control>

<!-- ******************************************************************************************* -->
<!-- *************************** INFOS ON BASIC HOME (NOW PLAYING AUDIO) *********************** -->
Expand Down
Loading
Loading