mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-11 01:53:43 +00:00
keep pixel format
This commit is contained in:
@@ -59,6 +59,7 @@ static frame_s *_init_internal(void) {
|
|||||||
frame_set_data(blank, BLANK_JPEG_DATA, BLANK_JPEG_DATA_SIZE);
|
frame_set_data(blank, BLANK_JPEG_DATA, BLANK_JPEG_DATA_SIZE);
|
||||||
blank->width = BLANK_JPEG_WIDTH;
|
blank->width = BLANK_JPEG_WIDTH;
|
||||||
blank->height = BLANK_JPEG_HEIGHT;
|
blank->height = BLANK_JPEG_HEIGHT;
|
||||||
|
blank->format = V4L2_PIX_FMT_JPEG;
|
||||||
return blank;
|
return blank;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,6 +68,7 @@ static frame_s *_init_external(const char *path) {
|
|||||||
frame_s *blank;
|
frame_s *blank;
|
||||||
|
|
||||||
blank = frame_init("blank_external");
|
blank = frame_init("blank_external");
|
||||||
|
blank->format = V4L2_PIX_FMT_JPEG;
|
||||||
|
|
||||||
if ((fp = fopen(path, "rb")) == NULL) {
|
if ((fp = fopen(path, "rb")) == NULL) {
|
||||||
LOG_PERROR("Can't open blank placeholder '%s'", path);
|
LOG_PERROR("Can't open blank placeholder '%s'", path);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
|
#include <linux/videodev2.h>
|
||||||
|
|
||||||
#include "../common/tools.h"
|
#include "../common/tools.h"
|
||||||
#include "../common/logging.h"
|
#include "../common/logging.h"
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ int encoder_compress_buffer(encoder_s *encoder, unsigned worker_number, frame_s
|
|||||||
|
|
||||||
frame->width = raw->width;
|
frame->width = raw->width;
|
||||||
frame->height = raw->height;
|
frame->height = raw->height;
|
||||||
// frame->format = V4L2_PIX_FMT_JPEG;
|
frame->format = V4L2_PIX_FMT_JPEG;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user