mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-07-20 18:51:58 +00:00
removed frame name
This commit is contained in:
@@ -23,10 +23,9 @@
|
||||
#include "frame.h"
|
||||
|
||||
|
||||
frame_s *frame_init(const char *name) {
|
||||
frame_s *frame_init(void) {
|
||||
frame_s *frame;
|
||||
A_CALLOC(frame, 1);
|
||||
frame->name = name;
|
||||
frame->managed = true;
|
||||
frame_realloc_data(frame, 512 * 1024);
|
||||
return frame;
|
||||
@@ -43,8 +42,6 @@ void frame_destroy(frame_s *frame) {
|
||||
void frame_realloc_data(frame_s *frame, size_t size) {
|
||||
assert(frame->managed);
|
||||
if (frame->allocated < size) {
|
||||
//LOG_DEBUG("Increasing frame buffer '%s': %zu -> %zu (+%zu)",
|
||||
// frame->name, frame->allocated, size, size - frame->allocated);
|
||||
A_REALLOC(frame->data, size);
|
||||
frame->allocated = size;
|
||||
}
|
||||
|
||||
@@ -32,12 +32,9 @@
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "tools.h"
|
||||
//#include "logging.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
|
||||
uint8_t *data;
|
||||
size_t used;
|
||||
size_t allocated;
|
||||
@@ -88,7 +85,7 @@ inline void frame_copy_meta(const frame_s *src, frame_s *dest) {
|
||||
)
|
||||
|
||||
|
||||
frame_s *frame_init(const char *name);
|
||||
frame_s *frame_init(void);
|
||||
void frame_destroy(frame_s *frame);
|
||||
|
||||
void frame_realloc_data(frame_s *frame, size_t size);
|
||||
|
||||
@@ -87,6 +87,6 @@ static void _jpeg_error_handler(j_common_ptr jpeg) {
|
||||
char msg[JMSG_LENGTH_MAX];
|
||||
|
||||
(*jpeg_error->mgr.format_message)(jpeg, msg);
|
||||
LOG_ERROR("Can't decompress %s JPEG: %s", jpeg_error->frame->name, msg);
|
||||
LOG_ERROR("Can't decompress JPEG: %s", msg);
|
||||
longjmp(jpeg_error->jmp, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user