mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-19 08:16:31 +00:00
device: don't expose dma for jpeg
This commit is contained in:
@@ -194,7 +194,8 @@ int us_device_open(us_device_s *dev) {
|
||||
if (_device_open_queue_buffers(dev) < 0) {
|
||||
goto error;
|
||||
}
|
||||
if (dev->dma_export) {
|
||||
if (dev->dma_export && !us_is_jpeg(run->format)) {
|
||||
// uStreamer doesn't have any component that could handle JPEG capture via DMA
|
||||
run->dma = !_device_open_export_to_dma(dev);
|
||||
if (!run->dma && dev->dma_required) {
|
||||
goto error;
|
||||
|
||||
@@ -245,7 +245,7 @@ static us_workers_pool_s *_stream_init_loop(us_stream_s *stream) {
|
||||
stream->dev->dma_export = (
|
||||
stream->enc->type == US_ENCODER_TYPE_M2M_VIDEO
|
||||
|| stream->enc->type == US_ENCODER_TYPE_M2M_IMAGE
|
||||
|| (_RUN(h264) && !us_is_jpeg(stream->dev->run->format))
|
||||
|| _RUN(h264) != NULL
|
||||
);
|
||||
if (us_device_open(stream->dev) == 0) {
|
||||
return us_encoder_workers_pool_init(stream->enc, stream->dev);
|
||||
|
||||
Reference in New Issue
Block a user