Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With Dual display support no video on secondary display. #32

Open
punith444 opened this issue Oct 11, 2014 · 27 comments
Open

With Dual display support no video on secondary display. #32

punith444 opened this issue Oct 11, 2014 · 27 comments

Comments

@punith444
Copy link

i ported mpv with cedarx in my A20 ubuntu board , so now i am able to play videos smoothly.
but with dual display support i am not getting video output on second display (its full black screen).

[disp_init]
disp_init_enable = 1
disp_mode = 4
screen0_output_type = 3
screen0_output_mode = 4
screen1_output_type = 2
screen1_output_mode = 11
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0
fb0_width = 0
fb0_height = 0
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
fb1_width = 0
fb1_height = 0
lcd0_backlight = 197
lcd1_backlight = 197
lcd0_bright = 50
lcd0_contrast = 50
lcd0_saturation = 57
lcd0_hue = 50
lcd1_bright = 50
lcd1_contrast = 50
lcd1_saturation = 57
lcd1_hue = 50

Regards
Punith

@Moorviper
Copy link

mittorn@319bd47

this is not implemented at master branch so only one display is supported

@punith444
Copy link
Author

Hi Mittron,
Thanks for your reply. I want two display same frame buffer , so i can play one video in both display smoothly.
Is it possible with your branch or can you tell how can i do it.
Regards
Punith

@punith444
Copy link
Author

Hi Mittrron,
some improvements.
with export VDPAU_SCREEN=0 i am getting video in HDMI.
with export VDPAU_SCREEN=1 i am getting video in TV.
But i want on both.
can you tell me what need to change in code.

Regards
Punith

Regards
Punith

@mittorn
Copy link

mittorn commented Oct 13, 2014

No, it's only possible to use one display now.
But you can create layer on both displays, look at https://github.com/linux-sunxi/libvdpau-sunxi/blob/master/presentation_queue.c#L264
Screen number is set in first arg at https://github.com/linux-sunxi/libvdpau-sunxi/blob/master/presentation_queue.c#L322 and other disp ioctls.
Note that scaler layer count is limited and if you are using scaler on hdmi (it is needed to prevent image jumping on high resolutions), this will not work.

@punith444
Copy link
Author

i dont any need any scaler to enabled , could this possible by changing the code,

@mittorn
Copy link

mittorn commented Oct 14, 2014

You need two scaler layers to convert colorspace in video.
And in almost all cases you neen scaler in dualscreen configuration. You can use a10disp to check configuration.

@mittorn
Copy link

mittorn commented Oct 14, 2014

You also can do it without any code change by wrapping ioctl. Look preload code in cedarxplayertest-gui. I wrapped some functions in CedarXPlayerTest and rescaled image and moved it to another screen.

@punith444
Copy link
Author

hi mittorn,
if you see my script i disabled bot fb0 and fb1 scaler enable.
can you tell me what changes need to do to get video on both display.

@punith444
Copy link
Author

Hi Mittron,
i look at source code and did some changes but not yet worked for me.
can you kindly tell what needs to do to get video on both display.
Regards
Punith

@mittorn
Copy link

mittorn commented Oct 14, 2014

http://codepad.org/giQv9CXj
presentation_queue.c
You also need to add layer2 to vdpau_private.h
It is dirty and break OSD implementation, but work for me.

@punith444
Copy link
Author

Hi Mittorn,
i tested with your new code presentation_queue.c and added layer2 to vdpau_private.h.
but i am not getting video in second display(TV). getting fallowing errors while playing video.

without osd enabled.
<4>[DISP] request scaler layer fail!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] layer released: 0,101
<4>[DISP] layer released: 1,101

With osd enabled

<4>[DISP] layer 2 in screen 0 not inited!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] layer 2 in screen 0 not inited!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] layer 2 in screen 0 not inited!
<4>[DISP] request scaler fail
<4>[DISP] request scaler layer fail!
<4>[DISP] layer 2 in screen 0 not inited!
<4>[DISP] layer released: 0,101
<4>[DISP] layer released: 1,101
<4>[DISP] layer released: 1,102

@mittorn
Copy link

mittorn commented Oct 15, 2014

Try to reboot and manually disable scaller on both displays with a10disp. You also should disable hardware cursor, if present. OSD must be disabled because it is broken with my changes and it uses another layer.

@mittorn
Copy link

mittorn commented Oct 15, 2014

After few crashes layers was not released because of disp bug, it is only way to reboot to release them.

@Moorviper
Copy link

which player do you use
on newer kernel the memory for the cedarx ist hardcoded to 80 MB
if you use vdr-softhd-device you have to increase it to min. 120MB better 140MB

192 MB is afik the highest amount which could be assigned save.

@punith444
Copy link
Author

hi Mittorn,
i am using mpv player and kernel is linux-sunxi 3.4 and how to increase cedarx memory?.
and how to disable scaler on both display using a10disp because i am using A20 board.
i fallowed the procedure from below link,
http://linux-sunxi.org/Cedrus

@punith444
Copy link
Author

thank you mittorn, finally its working on both display once i disable scaler by using a10 disp.
but hdmi display ok but in tv display video is not scaled.
Is it any way to get video on both display properly (with alittle portion is missing fine).

@Moorviper
Copy link

by the way

bildschirmfoto 2014-10-15 um 12 48 24 != bildschirmfoto 2014-10-15 um 12 48 19

this was a link ;-)

bildschirmfoto 2014-10-15 um 12 48 34

@mittorn
Copy link

mittorn commented Oct 15, 2014

You can recalculate video size in presentation_queue. Or you can simply use only one output. Are you sure that you really need video on both displays at the same time?
scalers count is hardcoded in disp code and i think that it's a hardware limit.

@mittorn
Copy link

mittorn commented Oct 15, 2014

Also you can control layers by a10disp by specifing layer_handle. It is 102 when hardware cursor enabled and 101 when disabled.
for example, a10disp --screen 1 --layer-handle 102 enablescaler 0 w100h100 will rescale the video to 100x100, but it wil be reset on window move or other para changes.

@punith444
Copy link
Author

Yes i want on both display , is it possible by changing layerinfo(2 times paasing) for screen0 and screen1. or is it possible with a10disp command. i want video to play on both display without any missing of portion(alittle is ok).
Screen 0:
Display dimensions are 1280 x 720.
Output type is HDMI.
Screen 1:
Display dimensions are 720 x 576.
Output type is TV.

@punith444
Copy link
Author

i dont have --layer-handle option in a10disp command.

@mittorn
Copy link

mittorn commented Oct 16, 2014

Try use https://github.com/mittorn/a10disp/ , testing branch. It has many new options. https://github.com/mittorn/a10disp/blob/testing/README

@punith444
Copy link
Author

hi mittorn,
i tried
a10disp --screen 1 disablescaler
a10disp --screen 1 --layer-handle 102 enablescaler 0 w100h100
but not get any improvements.
how about changing in layer info in presentation_queue.c file?.
Regards
Punith

@mittorn
Copy link

mittorn commented Nov 2, 2014

Second command will only work when video is showing.

@punith444
Copy link
Author

Hi MIttron,
In my android4.2 i have two display
1.screen 0 is TV 2.screen 1 is HDMI.
i am getting mirror image on both display but HDMI is not full screen.
so i changed fb0_width to 1280 and fb0_height to 720 then hdmi is full screen
but lot of portion is missing in tv display.
in my case both display tyes are normal.
Is it possible to scale the width and height of tv display without enabling scaler?.
can you tell how can i get full screen on both display?.

Regards
Punith

@mittorn
Copy link

mittorn commented Jan 26, 2015

I don't know how it works on android

@G332657060
Copy link

hi punith444

Can you tell me how you add the layer2 layer? I just need to modify this thing in my hands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants