Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Playing Video on Secondary HDMI screen using Native API

ok. looks like you are doing the 2 things I suggested: make sure the parent window and mm-renderer window are part of the same group.

does SCREEN_EVENT_CREATE fire and give you the expected windowid?

fprintf(stderr, "window ID is %s\n", id);

 

you shouldn't have to try changing the SCREEN_PROPERTY_DISPLAY on the mm-renderer child window, FYI, as it is supposed to inherit the parent's display. (not even sure if you would have permission to do so).  does this window show up on the handheld display instead of HDMI?  have you tried flushing the context, out of curiosity?

 

I'll see if someone from mm-renderer can have a look.

 

 

 

Please use plain text.
Contributor
CrystalBullet
Posts: 19
Registered: ‎02-14-2013
My Device: Red Z10
My Carrier: WIND Mobile

Re: Playing Video on Secondary HDMI screen using Native API

SCREEN_EVENT_CREATE is triggered twice:

window ID is videosamplewindowgroup

window ID is

 

The video does not show anywhere visible. The device displays stays at the "BlackBerry" black splash screen. 

The second screen goes full back, or what ever color I set at screen_fill

--
Martin Larochelle
Macadamian
http://bb10ize.me
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Playing Video on Secondary HDMI screen using Native API

one other thing to consider --> when the mm-renderer window creation event is caught, set the ZORDER to some positive value and then flush your context.

the window may be behind the application window possibly.

in fact, feel free to also try setting size, position, and visibility.  not sure what the defaults would be.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Playing Video on Secondary HDMI screen using Native API

ok.  sounds about right.  you likely don't have an application window on the LCD then, so you are still just seeing a splash screen.

 

one best-practices note here... make sure that any window operations you are performing in that event loop are only being applied to the window that you want to apply them too.. eg. do a strcmp() on your video window id so you don't inadvertently mess with other windows :smileyhappy:

 

Please use plain text.
Contributor
CrystalBullet
Posts: 19
Registered: ‎02-14-2013
My Device: Red Z10
My Carrier: WIND Mobile

Re: Playing Video on Secondary HDMI screen using Native API

Got it to work. Thanks for your help!

 

What I was missing was calling:
int screen_val = 1;
screen_set_window_property_iv(newWindow, SCREEN_PROPERTY_ZORDER, &screen_val);

 

In:
SCREEN_EVENT_CREATE

 

I'll keep this too just for good mesure:
screen_set_window_property_iv(newWindow, SCREEN_PROPERTY_VISIBLE, &screen_val);
screen_flush_context(screen_context, SCREEN_WAIT_IDLE);

 

That works on Miracast too

 

The 2nd call to
screen_set_window_property_pv(newWindow, SCREEN_PROPERTY_DISPLAY, (void **) &screen_dpy[1]); is needed too.

 

Sensing and Understanding was nice, but now I can actually Adapt!

--
Martin Larochelle
Macadamian
http://bb10ize.me
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Playing Video on Secondary HDMI screen using Native API

glad to hear!

 

the fact that you need to manually move the window to another display seems odd.  I was assured by the graphics lead that this shouldn't be the case -- could be a bug.

If can provide the standalone sample code to me offline via email (smcveigh@qnx.com), I will have them investigate.

 

Cheers,

Sean

Please use plain text.