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

fix mjpegstream logic for returning screenshots #1039

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

Jonahss
Copy link
Member

@Jonahss Jonahss commented Aug 14, 2019

So, a typo here prevented screenshots from being returned from the mjpegstream.

Here's something interesting though, fixing this caused screenshots on my machine to go from taking ~172ms each to taking ~436ms. So by fixing this, screenshots are actually less performant on iOS.

@Jonahss Jonahss requested a review from jlipps August 14, 2019 04:42
@imurchie
Copy link
Contributor

Screenshots in general, or streamed screenshots?

@jlipps
Copy link
Member

jlipps commented Aug 14, 2019

I guess this kinda makes sense, since the built-in mjpeg streamer is itself a consumer of device screenshots, and uses them to build the stream. To get a performance improvement, we'd have to use an mjpeg server that was faster at getting screen images than WDA's screenshot method.

This is definitely the case on Android, where ADB's screenshotter is super slow compared to other methods, and there are mjpeg implementations for Android which are extremely fast.

What could a faster method be on iOS? Presumably getting the video stream directly from Apple's own video out, or maybe reading from a vnc session sized to fit exactly over the simulator window? I imagine cloud services have ways outside of Appium to get real time video, which could also lead to an mjpeg stream if they wanted.

@@ -17,7 +17,8 @@ commands.getScreenshot = async function getScreenshot () {
};

// if we've specified an mjpeg server, use that
if (this.mjpegStrem) {
if (this.mjpegStream) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bug that would not have been possible in some other languages :-/ i'm guessing it's my typo!

@jlipps jlipps merged commit 07a9868 into appium:master Aug 14, 2019
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
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

Successfully merging this pull request may close these issues.

5 participants