-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Add device orientation information to header information #5894
base: dev
Are you sure you want to change the base?
Conversation
Hi, Thanks for your work. However, as I said in #5704 (comment), there is no really need to know the device orientation, since it can be inferred from the frame size in practice, and there are cases where the "orientation" to write is not clear. You replied:
You can do this based on the actual frame size. In theory, it could make sense to pass the device orientation (at least in some cases) in packets headers (even if it could be argued that it's overkill to pass it for each packet/frame). But then, the orientation must exactly match the frame it describes, which is not guaranteed here. There is no mechanism to make sure that the frame produced by MediaCodec is in the current device orientation (as returned by |
OK. What is the client on your screenshot? Is it a modified scrcpy client, or an alternative client you wrote?
If the orientation is sent "inline", it must be in sync with the encoded frames. Btw, it could allow to print a better error message for #1645. The current protocol has two "packet types":
To support your use case, I suggest to add a new packet type:
The session packet could be distinguished from the media packet with a single bit, and for simplicity both headers would have 12 bytes. It would be sent when a new encoding session starts, with the values in sync to what is passed to the encoder. |
Yes, I wrote an alternative client(browser-based). I will try to make some adjustments based on your suggestions and then submit a new implementation. |
This is useful if need to draw the device appearance correctly.
Related Discussions
#5704
#3605
#925