You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case for this library is to get a stream of jpeg images, and I was expecting to have to encode them myself (or, rather, integrate with another library to do it). But, I noticed that, although the example still displays exactly as it should, messages of the form "Corrupt JPEG data: 1 extraneous bytes before marker 0xd4" (the marker's hex and number of extraneous bytes varies) spam the terminal when I run the mirror example, suggesting that libuvc is decoding jpeg images internally. Obviously, it's less than idea to have the library decode jpeg images only for them to be immediately re-encoded back into jpeg. As such, is there some way to access these images as jpeg?
The text was updated successfully, but these errors were encountered:
Occasionally magnled output is normal (see e.g. libuvc/libuvc#122), and depends on the camera. You could file an issue towards libuvc if you would like to examine this in further detail.
The decoding of jpeg frames are done in the frame_to_raw_image crate in the mirror example. You can change the callback to use the raw bytes directly if you'd like, simply call to_bytes on the Frame in the callback. This should not involve any decoding by libuvc.
My use case for this library is to get a stream of jpeg images, and I was expecting to have to encode them myself (or, rather, integrate with another library to do it). But, I noticed that, although the example still displays exactly as it should, messages of the form "Corrupt JPEG data: 1 extraneous bytes before marker 0xd4" (the marker's hex and number of extraneous bytes varies) spam the terminal when I run the mirror example, suggesting that libuvc is decoding jpeg images internally. Obviously, it's less than idea to have the library decode jpeg images only for them to be immediately re-encoded back into jpeg. As such, is there some way to access these images as jpeg?
The text was updated successfully, but these errors were encountered: