NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 50 51 52 53 54 … 93 Next »
Simple Plugin Demonstrates Render Bug

 
  • 0 Vote(s) - 0 Average
Simple Plugin Demonstrates Render Bug
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#1
2006-09-19, 05:54 PM
I'm about to post some code. Just build it, stick it in the plugin directly, and run config to initialize it or whatever. It doesn't need a skin file.

So anyway, here are some steps to take to demonstrate the problem:
  1. From the main men, select Interference (this is the new plugin).
  2. Black screen. Alternates between "true" and "false." About every second. What we'd expect.
  3. Press [back/exit] (or escape). Now you're back at the main menu.
  4. Select Live TV. Wait for it.
  5. Now press [menu] (not sure what the keyboard equivalent is). Now you're back at the main menu, with the Live TV playing "in the background."
  6. Now select the Interference plugin. The screen never refreshes. Stays the same. And yet, render() is called.
  7. Press [back/exit] to return to the Main Menu, close Live TV, then go back into the Main Menu and run the Interference plugin again. It alternates, as expected.
It's a mystery. Who will solve it first?! lol

Oh, I almost forgot.

Code:
public class Interference_Task : IMenuTask
    {

        private string m_Message = "Hiya.";
        private string m_Name = "Interference";
        private bool m_TickTock = false;

        public Interference_Task()
        {
        }

        #region IMenuTask Members

        void IMenuTask.Activate()
        {
        }

        void IMenuTask.Deactivate()
        {
        }

        System.Windows.Forms.Form IMenuTask.GetConfigFormInstance(System.Xml.XmlDocument document)
        {
            return null;
        }

        void IMenuTask.OnClick(System.Drawing.Point location)
        {

        }

        void IMenuTask.OnDoubleClick(System.Drawing.Point location)
        {

        }

        bool IMenuTask.OnKeyDown(System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                PluginHelperFactory.getPluginHelper().ReturnToMainMenu();
            return true;
        }

        void IMenuTask.OnMouseWheel(System.Windows.Forms.MouseEventArgs e)
        {

        }

        string IMenuTask.getDescription()
        {
            return "Smell the purple concrete";
        }

        string IMenuTask.getName()
        {
            return m_Name;
        }

        string IMenuTask.getSkinSubdirectory()
        {
            return m_Name;
        }

        System.Drawing.Image IMenuTask.getTaskImage()
        {
            return null;
        }

        bool IMenuTask.needsRendering()
        {
            return true;
        }

        System.Drawing.Image IMenuTask.render(out bool requiresMoreRendering)
        {
            requiresMoreRendering = false;

            m_TickTock = !m_TickTock;
            m_Message = m_TickTock.ToString();

            Bitmap canvas = new Bitmap(720, 480);
            Graphics g = Graphics.FromImage(canvas);

            g.Clear(Color.Black);

            RectangleF textArea = new RectangleF(0, 0, canvas.Width, canvas.Height);

            StringFormat strFormat = new StringFormat();
            strFormat.Alignment = StringAlignment.Center;
            strFormat.LineAlignment = StringAlignment.Center;

            g.DrawString(m_Message, new Font("Tahoma", 18), Brushes.White,
            textArea, strFormat);

            return canvas;
        }
        #endregion
    }
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#2
2006-09-19, 05:59 PM
And I have confirmed that substituting recorded TV for live TV causes the same symptoms. But Net Radio does not interfere with the rendering.
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#3
2006-09-19, 06:02 PM
[ATTACHMENT NOT FOUND]
I uploaded a compiled assembly with this test plugin in it. There's a generic one in there called "Hello World" too. Just ignore that.
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,684
Threads: 767
Joined: Nov 2003
#4
2006-09-19, 06:57 PM
Ok, I've fixed this for the next release.
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#5
2006-09-20, 10:42 AM
sub Wrote:Ok, I've fixed this for the next release.
Sweet.
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,823 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,349 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,460 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,905 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,770 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,091 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,947 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 4,993 2012-08-12, 07:56 PM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 2,240 2012-02-11, 05:42 PM
Last Post: mvallevand
  Weather Plugin imilne 0 1,432 2012-01-15, 08:33 PM
Last Post: imilne

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode