NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 13 14 15 16 17 … 93 Next »
Video Overlay Graphics

 
  • 0 Vote(s) - 0 Average
Video Overlay Graphics
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2011-07-08, 03:06 PM
I'd like to draw some stuff on top of a playing video - kinda like the VolumeOSD plugin does. I've had a look at its source code, but I can't understand it :confused:

Does anybody have some hints on how to get started with a simple example?

Thanks

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2011-07-08, 04:46 PM
What sort of thing are you wanting to display, and I'll give you an indication of the best way to go.

You can get a normal plugin to appear over the video, just like you could on the main menu, or you could have just a popup, or as little as a few graphics.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2011-07-08, 05:23 PM
Thanks sub. I'd like to get something similar to the current Ctrl+B popup (but obviously in a different position). So some basic skin elements and a bunch of text inside of it.

It's for my MediaInfo plugin; on video playback, channel change, or on-demand, I'd like to pop up a box with information about the current file/stream.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2011-07-08, 05:31 PM
You're probably best to create a class that implements the IScreenPlugin interface. Start by just giving all the methods a default implementation that does pretty much nothing (ie, OnClick() returns false, OnKeyDown() returns false, etc). Add a UiStatic member variable to the class, initialised with with the skinhelper, element name, and any parameters you need to display on the element. Next have NeedsRendering() 'return myUiStatic.NeedsRendering()', and have GetRenderList() 'return myUiStatic.GetRenderList()'.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#5
2011-07-13, 06:14 PM
Oops, missed this reply. Thanks though. Will try to give it a shot over the next couple of days...

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#6
2011-07-21, 07:57 PM
As a slight aside to the above (which I've still yet to try), what would I need to do (roughly) to have a popup in a plugin that acted like the details popup in the TV Guide/Recordings screens:

[ATTACHMENT NOT FOUND]

This is nothing to do with overlaying graphics on the video now, so just a standard popup. Would it just be a SimpleButtonListPlugin ? With a call to IPluginHelper.ActivatePopup to get it to appear?

I'm just after something with a bunch of buttons, and copying this screen looks like a great way of doing it.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#7
2011-07-21, 08:17 PM
imilne Wrote:This is nothing to do with overlaying graphics on the video now, so just a standard popup. Would it just be a SimpleButtonListPlugin ? With a call to IPluginHelper.ActivatePopup to get it to appear?
I've implemented mine using the SimplePopup base class, and add a UiButtonList on top (ie, overriding NeedsRendering() and GetRenderList() to add the uiButtonList etc).
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,108
Threads: 957
Joined: May 2006
#8
2011-07-21, 09:43 PM
imilne Wrote:I'm just after something with a bunch of buttons, and copying this screen looks like a great way of doing it.Iain

SearchLite actually uses that skin for one of its popups. If you want to PM me your email I can send you the code. It's too ugly to post I learn as I go, but if you clean it up it might help others.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#9
2011-07-21, 09:53 PM
Thanks (to both of you). PM on its way Martin...

Now I have to promise myself to actually *do* some of the stuff I keep asking about in this thread Smile

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#10
2011-07-23, 05:52 PM
Having made great progress with my details popup (thanks guys), I'm now attempting to do another one, this time to allow the user to enter a PIN.

I'm after something that looks like the normal OK/Cancel message boxes, just with some extra text fields. Using the other popup as a guide, I've made myself another IScreenPlugin class that is using a slightly modified MessageBox.xml as its skin.

[ATTACHMENT NOT FOUND]

As you can see though, the buttons are in the wrong place.

I'm basically stumped, and have no idea what I need to add to the skin to include buttons that are arranged like the following:

[ATTACHMENT NOT FOUND]

I've tried both a UiButtonList and a UiButtonStrip in the code. I think my main problem is knowing what I have to define versus what is already defined in a lot of the global skin stuff already.

(I also know the popup box isn't big enough yet, but that's the least of my worries Big Grin)

The source for the popup and the skin are in the attached zip file.

Iain
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Video streaming URL and parameters? cncb 1 1,917 2021-10-22, 06:58 PM
Last Post: sub
  Extras device - using hardware video encoder gdogg371 6 3,370 2021-03-09, 12:18 AM
Last Post: gdogg371
  Loading Local Video Files Syler 25 6,911 2021-03-07, 09:20 PM
Last Post: Syler
  Resuming a video imilne 28 15,024 2016-10-30, 09:27 PM
Last Post: mvallevand
  How to tell when video playback has finished in web client? cncb 6 4,373 2015-09-29, 08:07 PM
Last Post: cncb
  VIdeo playback from plugin mvallevand 5 3,608 2015-08-06, 10:43 PM
Last Post: sub
  Inset Video - Stop mvallevand 2 2,123 2013-08-07, 09:57 PM
Last Post: mvallevand
  Video Library Fanart Transparency tieke 7 4,029 2013-01-09, 08:23 AM
Last Post: tieke
  NMT Video Playback - does it receive start/stop events psycik 8 3,525 2012-07-15, 10:01 PM
Last Post: mvallevand
  Resume or Restart dialog for video psycik 6 3,124 2011-12-22, 02:52 AM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode