NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 64 65 66 67 68 … 93 Next »
Anyone got IVideoPlugin working?

 
  • 0 Vote(s) - 0 Average
Anyone got IVideoPlugin working?
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#1
2005-11-17, 10:59 PM
below is my render method for a caller id plugin. I see that the mode is set correctly.

The section in bold is invoked. The image is correct I can save it to a file. I return it, but I never see it on top of the video. I do implement the IVideoPlugin interface and have it in the config.xml I see all of the other methods get invoked.

Ideas?

public Image render(out bool requiresMoreRendering)
{
requiresMoreRendering = false;
renderAgain = false;

// reset clickable regions
clickableNames = new Hashtable();

// alpha blend with background
float[][] matrixItems ={ // Note the value 0.8 in row 4, column 4.
new float[] {1, 0, 0, 0, 0},
new float[] {0, 1, 0, 0, 0},
new float[] {0, 0, 1, 0, 0},
new float[] {0, 0, 0, 0.8f, 0},
new float[] {0, 0, 0, 0, 1}};
ColorMatrix colorMatrix = new ColorMatrix(matrixItems);

ImageAttributes imageAttr = new ImageAttributes();
imageAttr.SetColorMatrix(
colorMatrix,
ColorMatrixFlag.Default,
ColorAdjustType.Bitmap);

// prepare background

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

// g.Clear(Color.Transparent);
g.SmoothingMode = SmoothingMode.AntiAlias;

Font generalFont = skinHelper.getNamedFont("GeneralText");
Brush generalFontBrush = skinHelper.getNamedFontBrush("GeneralText");
Font selectedGeneralFont = skinHelper.getNamedFont("SelectedGeneralText");
Brush selectedGeneralFontBrush = skinHelper.getNamedFontBrush("SelectedGeneralText");
Brush selectionBrush = skinHelper.getNamedBrush("Selection");


if ( this.bVideoMode )
{
string displayString = szLabel + "... (" + DateTime.Now.ToShortTimeString() + ")\n" + szName + _name + "\n" + szNumber + _number;


g = Graphics.FromImage(compositeScreenImage);
g.FillRectangle(new SolidBrush(GBPVR.Public.PluginHelperFactory.getPluginHelper().GetOSDTransparentColor()),0,0,720,480);

//g.FillRectangle( new SolidBrush(Color.Black), new Rectangle(5, 105, 305, 25) );
g.DrawString( displayString, generalFont, generalFontBrush, new Rectangle(10, 100, 300, 20) );
Logger.Info("Drawing string " + displayString );
//return ( foregroundImage );
return ( compositeScreenImage );
}
else
{
Graphics.FromImage(backgroundImage).DrawImage(backgroundPicture, 0,0,backgroundPicture.Width,backgroundPicture.Height);
g.Clear(Color.Transparent);


// g.DrawString( "Call Data " + szCallData, generalFont, generalFontBrush, new Rectangle(10, 10, 300, 20) );
// g.DrawString( "Adj Call Data " + szAdjustedCallData, generalFont, generalFontBrush, new Rectangle(10, 40, 300, 20 ) );
// g.DrawString( "Label " + szLabel, generalFont, generalFontBrush, new Rectangle(10, 70, 300, 20) );
g.DrawString( "Number " + szNumber, generalFont, generalFontBrush, new Rectangle(10, 100, 300, 20) );

Graphics.FromImage(backgroundImage).DrawImage(foregroundImage, new System.Drawing.Rectangle(0,0,720,480),0,0,720,480,GraphicsUnit.Pixel,imageAttr);
return ( backgroundImage );
}


// return blended result
return backgroundImage;
}
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#2
2005-11-17, 11:04 PM
You added the plugin name to the video plugins list in the config.xml?
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#3
2005-11-18, 04:09 PM
yes

I have logs in setVideoMode, needsToBeShown, needsToBeHidden

I see that they are invoked. Then the render is called.
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#4
2005-11-18, 04:23 PM
If you can email me some sample code, I'll check it out and let you know what is going wrong.
DaveC
Offline

Junior Member

Posts: 40
Threads: 3
Joined: Jan 2005
#5
2005-11-21, 04:31 AM
Jorm, I have IVideo working in a soon-to-be-released (in beta test) plugin ... I'm not so good with the C#, but did do a quick lessons learned, attached, a kittle rough but maybe it will help. If not, you likely already have it fixed.
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#6
2005-11-21, 04:43 AM
He's got it working now. It was just a small bug in his logic.
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#7
2005-11-21, 11:33 AM
thanks again
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  visible="!@hasImage & folder.jpg in Music not working Jaggy 0 1,204 2012-02-10, 10:29 PM
Last Post: Jaggy
  NPVR IVideoPlugin McBainUK 19 6,348 2011-05-06, 12:12 PM
Last Post: Ommina
  PluginHelper.SetPlayerMetaData(Hashtable args) not working alibert 12 4,622 2011-01-23, 05:33 PM
Last Post: sub
  IVideoPlugin Problem SummerTimeBlues 9 3,841 2009-07-31, 04:02 AM
Last Post: sgilani
  anyone for working reminders? pBS 7 2,948 2009-07-03, 07:37 PM
Last Post: pBS
  setPopup not working + minimize window question bgowland 5 2,285 2007-12-15, 01:15 AM
Last Post: whurlston
  Working with Character sets... zehd 7 2,599 2007-05-07, 11:56 AM
Last Post: MixMan
  IMenuTask and IEventNotification not working well together since 0.98 psycik 5 2,160 2006-10-01, 05:27 PM
Last Post: sub
  IVideoPlugin and the MVP Spartan 6 2,094 2006-06-22, 05:31 PM
Last Post: Spartan
  Weather Plugin SI units not working Paul Gordash 6 2,239 2006-03-23, 02:09 AM
Last Post: fla

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

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

Linear Mode
Threaded Mode