home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Integration of MPC-HC subtitle's engine
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="damaster" data-source="post: 373578" data-attributes="member: 60795"><p><strong>2 bugs to report</strong></p><p><strong>1: </strong>Slight delay as others have reported.</p><p></p><p><strong>2: </strong>When I close MediaPortal, the MediaPortal.exe process keeps running in the background and I have to kill it with Task Manager. This is due to loading of mpcSubs.dll. As a test, I changed MpcSubtitles.cs to NOT import the DLL and just stubbed out empty methods as below, and then when I exit MediaPortal it exits just fine:</p><p></p><p>[code]</p><p> /*</p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern unsafe bool SetDevice(void* device, int w, int h);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]</p><p> public static extern void SetDefaultStyle([In] ref SubtitleStyle style);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]</p><p> public static extern bool LoadSubtitles(string filename, IGraphBuilder graphBuilder);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern int GetCount();</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> [return: MarshalAs(UnmanagedType.BStr)]</p><p> public static extern string GetLanguage(int i);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern int GetCurrent();</p><p> </p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern void SetCurrent(int current);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern bool GetEnable();</p><p> </p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern void SetEnable(bool enable);</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern void Render();</p><p></p><p> [DllImport("mpcSubs.dll", ExactSpelling = true)]</p><p> public static extern void FreeSubtitles();</p><p> */</p><p></p><p> public static unsafe bool SetDevice(void* device, int w, int h) { return true; }</p><p></p><p> public static void SetDefaultStyle([In] ref SubtitleStyle style) { }</p><p></p><p> public static bool LoadSubtitles(string filename, IGraphBuilder graphBuilder) { return true; }</p><p></p><p> public static int GetCount() { return 1; }</p><p></p><p> public static string GetLanguage(int i) { return "English"; }</p><p></p><p> public static int GetCurrent() { return 1; }</p><p> </p><p> public static void SetCurrent(int current) { }</p><p></p><p> public static bool GetEnable() { return true; }</p><p> </p><p> public static void SetEnable(bool enable) { }</p><p></p><p> public static void Render() { } </p><p></p><p> public static void FreeSubtitles() { }[/code]</p></blockquote><p></p>
[QUOTE="damaster, post: 373578, member: 60795"] [B]2 bugs to report[/B] [B]1: [/B]Slight delay as others have reported. [B]2: [/b]When I close MediaPortal, the MediaPortal.exe process keeps running in the background and I have to kill it with Task Manager. This is due to loading of mpcSubs.dll. As a test, I changed MpcSubtitles.cs to NOT import the DLL and just stubbed out empty methods as below, and then when I exit MediaPortal it exits just fine: [code] /* [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern unsafe bool SetDevice(void* device, int w, int h); [DllImport("mpcSubs.dll", ExactSpelling = true, CharSet = CharSet.Unicode)] public static extern void SetDefaultStyle([In] ref SubtitleStyle style); [DllImport("mpcSubs.dll", ExactSpelling = true, CharSet = CharSet.Unicode)] public static extern bool LoadSubtitles(string filename, IGraphBuilder graphBuilder); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern int GetCount(); [DllImport("mpcSubs.dll", ExactSpelling = true)] [return: MarshalAs(UnmanagedType.BStr)] public static extern string GetLanguage(int i); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern int GetCurrent(); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern void SetCurrent(int current); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern bool GetEnable(); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern void SetEnable(bool enable); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern void Render(); [DllImport("mpcSubs.dll", ExactSpelling = true)] public static extern void FreeSubtitles(); */ public static unsafe bool SetDevice(void* device, int w, int h) { return true; } public static void SetDefaultStyle([In] ref SubtitleStyle style) { } public static bool LoadSubtitles(string filename, IGraphBuilder graphBuilder) { return true; } public static int GetCount() { return 1; } public static string GetLanguage(int i) { return "English"; } public static int GetCurrent() { return 1; } public static void SetCurrent(int current) { } public static bool GetEnable() { return true; } public static void SetEnable(bool enable) { } public static void Render() { } public static void FreeSubtitles() { }[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Integration of MPC-HC subtitle's engine
Contact us
RSS
Top
Bottom