Creating a direct-mode graphical plug-in

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating a direct-mode graphical plug-in

807 Views
jhollister
Contributor II

I'm trying to create a direct-mode graphical plug-in. My understanding (acquired from reading the  ifxui_plugin.c example) is that I set my plug-in's mode in the 'CreateElement' call to my plug-in, like so:

pProperty->mode = IFX_MODE_ELEMENT_BUFFERED; 

The defined values for mode are:

IFX_MODE_ELEMENT_INVALID

IFX_MODE_ELEMENT_OPENGL_TEXTURE

IFX_MODE_ELEMENT_BUFFERED_AND_DIRECT

IFX_MODE_ELEMENT_BUFFERED

IFX_MODE_ELEMENT_BUFFERED_NORMAL

How do I indicate that I just want DIRECT mode? I tried specifying mode IFX_MODE_ELEMENT_BUFFERED_AND_DIRECT, hoping that I'd get a 'ChangeElementMode' call from the engine telling me which mode I was actually in but I never seem to get that call. In fact, after I get the 'CreateElement' call, I don't get any other calls until DestroyElement. The documentation seems to say that I should also be getting ChangeElementMode, PositionElement, and ActivateElement calls.

Can anyone help me understand what I'm doing wrong?

Jim

Tags (2)
0 Kudos
6 Replies

752 Views
jhollister
Contributor II

I have confirmed that a preview graphic is displayed for my plugin in UI Express, if I provide one. If I don't provide one the red image appears instead.

We will move forward with the plan to render the Inflexion UI to one hardware layer and the video to another.

Thanks again for your help.

0 Kudos

752 Views
PhilBrumby
Contributor I

Hi Jim,

Can you confirm that if you set up a preview graphic to be displayed (like with the graph sample workshop) you see this in the UI Express tool when running the theme in the previewer? (alternatively you should get a red square if you don't set up a preview graphic). If not then we still have a configuration problem at the theme level.

Historically we have found that rendering video via standard product features is too much for the hardware as we cannot access the multimedia pipeline content in an efficient way via plugins (see your other thread on this topic).

My only only advice is to potentially render your video to a separate hardware layer and use a simple plugin element to form a link between the UI, module software and your separate layer which will play the video. Not something we have an example of implementing however sorry.

Thanks,

Phil.

0 Kudos

752 Views
jhollister
Contributor II

I forgot to mention that, at your suggestion, I checked my plugin element and it does have a fully-specified extent and location, but I still don't get PositionElement or ActivateElement.

0 Kudos

752 Views
jhollister
Contributor II

I'd like to use the OpenGL/ES Runtime so that I can take advantage of the acceleration hardware in the iMX535, so now I'm running my plugin in OPENGL_TEXTURE mode. I'm getting the CreateElement and DestroyElement calls, but still don't get ActivateElement. I can get functional link calls to my plugin between CreateElement and DestroyElement.

The purpose of this plugin is to play video (full screen or partial screen) using the GStreamer framework. I was trying to use DIRECT mode so that the Inflexion runtime would stop rendering to my LCD display in the region where GStreamer is going to render. Is this possible in OPENGL_TEXTURE mode? What's the correct way of coordinating Inflexion and an external video source when using OpenGL/ES and the accelerated runtime?

0 Kudos

752 Views
jhollister
Contributor II

Phil,

Thanks for your help. I'm try your suggestions and post my results.

Jim

0 Kudos

752 Views
PhilBrumby
Contributor I

Hi Jim,

You can't define in direct mode only, however you can run in it. The purpose of having the dual property is to enable the plugin to be animated if you wish, when doing so it switches to buffered mode. If you don't animated the element in any way it continues to be of direct mode type (if the alternate mode wasn't available during animation the element would disappear).

Please note that this type of plugin is only useable in non-accelerated render mode, so if you are using the OpenGL/ES Runtime you can't use a direct mode plugin element. (there is no advantage in this mode so it is not supported, you are better off using OPENGL_TEXTURE or BUFFERED mode).

If you are using the non-accelerated runtime then regarding your lack of function calls I think there must be a problem in the element definition. Please check that in UI Express the plugin has a position and importantly an extent in the layout being used.

Hope this helps!

Thanks,

Phil.

0 Kudos