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

Supporting alternate display orientations #121

Open
alexwhittemore opened this issue Apr 1, 2024 · 3 comments
Open

Supporting alternate display orientations #121

alexwhittemore opened this issue Apr 1, 2024 · 3 comments

Comments

@alexwhittemore
Copy link

I was able to compile and use lazycast per the readme with basically no fuss (after picking the right legacy RasPi OS version!), thanks!

My Pi is connected to a Waveshare 5.5" OLED touch screen that I'm trying to use as the target, but this display has a quirk that it adopts portrait orientation by default, and must be rotated in Linux for landscape use.

It seems Lazycast makes an assumption about the display orientation and just smacks the remote image center-screen rotated right-side-up, scaled to fit.

There's probably some easy spot to add in a 90* rotation to this, but I haven't looked yet.

image

@homeworkc
Copy link
Owner

I believe this could be done but I haven't implemented it in h264.c yet. Omxplayer has an option to do rotation and from a quick look at its code, it seems that an extra parameter OMX_DISPLAY_ROT90 has to be set.

@homeworkc
Copy link
Owner

Actually I found an easier method. Add this snippet at Line 422 of h264.c:

OMX_CONFIG_ROTATIONTYPE rotation;
memset(&rotation, 0, sizeof(rotation));
rotation.nSize = sizeof(rotation);
rotation.nVersion.nVersion = OMX_VERSION;
rotation.nRotation = 90;
rotation.nPortIndex = 90;
if (OMX_SetConfig(ILC_GET_HANDLE(video_render), OMX_IndexConfigCommonRotate, &rotation) != OMX_ErrorNone)
status = -15;

@alexwhittemore
Copy link
Author

I haven't had a chance to try that yet but thank you so much for suggesting it!

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

2 participants