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
MediaPortal 1 Plugins
Screencast video
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="Michael.K" data-source="post: 845911" data-attributes="member: 118906"><p>Now if save picture in hard disk and it displing but blinking, but if I load picture into GUITextureManager it does non happen(picture don't show). <span style="font-size: 12px"><span style="color: #000000"><span style="font-family: 'arial'">Who knows why this happens?</span></span></span></p><p>[CODE] public override void onStartVideo()</p><p> {</p><p> timer = new System.Timers.Timer(100);</p><p> timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);</p><p> timer.Enabled = true; // Enable it</p><p> }</p><p> </p><p> void _timer_Elapsed(object sender, ElapsedEventArgs e)</p><p> {</p><p> timer.Stop();</p><p> PixelFormat format = PixelFormat.Undefined;</p><p> skypeBitmap = getFrame(format); // return Bitmap 640x480</p><p> if (skypeBitmap == null)</p><p> {</p><p> timer.Start();</p><p> return;</p><p> }</p><p> try</p><p> {</p><p> _oldTextureName = _textureName;</p><p> bmskypeCrop = skypeBitmap.Clone(new Rectangle(0, 0, 640, 480), skypeBitmap.PixelFormat);</p><p> // bmskypeCrop.Save(@"C:\" + sFrame.ToString() + ".png");</p><p> _textureName = BuildMemoryImage(bmskypeCrop,"video" + sFrame);</p><p> _videoImage.SetFileName(_textureName);</p><p> // _videoImage.SetFileName(@"C:\" + sFrame.ToString() + ".png");</p><p> // GUITextureManager.ReleaseTexture(@"C:\" + (sFrame - 1).ToString() + ".png");</p><p> GUITextureManager.ReleaseTexture(_oldTextureName);</p><p> //if (File.Exists(@"C:\" + sFrame.ToString() + ".png"))</p><p> // File.Delete(@"C:\" + sFrame.ToString() + ".png");</p><p> _videoImage.Render(0f);</p><p> }</p><p> catch (Exception)</p><p> { </p><p> }</p><p> sFrame++;</p><p> timer.Start();</p><p> }</p><p> </p><p> private string BuildMemoryImage(Bitmap image,string identifier)</p><p> {</p><p> string str = string.Format("MyPlugin:[{0}]", identifier);</p><p> try</p><p> {</p><p> GUITextureManager.LoadFromMemory(image, str, 0L,640,480);</p><p> }</p><p> catch(Exception)</p><p> {</p><p> </p><p> }</p><p> return str;</p><p> }[/CODE]</p></blockquote><p></p>
[QUOTE="Michael.K, post: 845911, member: 118906"] Now if save picture in hard disk and it displing but blinking, but if I load picture into GUITextureManager it does non happen(picture don't show). [SIZE=3][COLOR=#000000][FONT=arial]Who knows why this happens?[/FONT][/COLOR][/SIZE] [CODE] public override void onStartVideo() { timer = new System.Timers.Timer(100); timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed); timer.Enabled = true; // Enable it } void _timer_Elapsed(object sender, ElapsedEventArgs e) { timer.Stop(); PixelFormat format = PixelFormat.Undefined; skypeBitmap = getFrame(format); // return Bitmap 640x480 if (skypeBitmap == null) { timer.Start(); return; } try { _oldTextureName = _textureName; bmskypeCrop = skypeBitmap.Clone(new Rectangle(0, 0, 640, 480), skypeBitmap.PixelFormat); // bmskypeCrop.Save(@"C:\" + sFrame.ToString() + ".png"); _textureName = BuildMemoryImage(bmskypeCrop,"video" + sFrame); _videoImage.SetFileName(_textureName); // _videoImage.SetFileName(@"C:\" + sFrame.ToString() + ".png"); // GUITextureManager.ReleaseTexture(@"C:\" + (sFrame - 1).ToString() + ".png"); GUITextureManager.ReleaseTexture(_oldTextureName); //if (File.Exists(@"C:\" + sFrame.ToString() + ".png")) // File.Delete(@"C:\" + sFrame.ToString() + ".png"); _videoImage.Render(0f); } catch (Exception) { } sFrame++; timer.Start(); } private string BuildMemoryImage(Bitmap image,string identifier) { string str = string.Format("MyPlugin:[{0}]", identifier); try { GUITextureManager.LoadFromMemory(image, str, 0L,640,480); } catch(Exception) { } return str; }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Screencast video
Contact us
RSS
Top
Bottom