encoders subdir

This commit is contained in:
Devaev Maxim
2019-03-04 15:29:11 +03:00
parent 924665c1a3
commit b2ca0ea998
14 changed files with 23 additions and 25 deletions

View File

@@ -8,13 +8,13 @@ LDFLAGS ?=
CC = gcc CC = gcc
LIBS = -lm -ljpeg -pthread -levent -levent_pthreads -luuid LIBS = -lm -ljpeg -pthread -levent -levent_pthreads -luuid
override CFLAGS += -c -std=c99 -Wall -Wextra -D_GNU_SOURCE override CFLAGS += -c -std=c99 -Wall -Wextra -D_GNU_SOURCE
SOURCES = $(shell ls src/*.c src/jpeg/*.c src/hw/*.c) SOURCES = $(shell ls src/*.c src/encoders/jpeg/*.c src/encoders/hw/*.c)
OBJECTS = $(SOURCES:.c=.o) OBJECTS = $(SOURCES:.c=.o)
PROG = ustreamer PROG = ustreamer
ifeq ($(shell ls -d /opt/vc/include 2>/dev/null), /opt/vc/include) ifeq ($(shell ls -d /opt/vc/include 2>/dev/null), /opt/vc/include)
SOURCES += $(shell ls src/omx/*.c) SOURCES += $(shell ls src/encoders/omx/*.c)
LIBS += -lbcm_host -lvcos -lopenmaxil -L/opt/vc/lib LIBS += -lbcm_host -lvcos -lopenmaxil -L/opt/vc/lib
override CFLAGS += -DOMX_ENCODER -DOMX_SKIP64BIT -I/opt/vc/include override CFLAGS += -DOMX_ENCODER -DOMX_SKIP64BIT -I/opt/vc/include
endif endif
@@ -59,5 +59,5 @@ push:
clean-all: clean clean-all: clean
clean: clean:
rm -f src/*.o src/{jpeg,hw,omx}/*.o vgcore.* *.sock $(PROG) rm -f src/*.o src/encoders/*/*.o vgcore.* *.sock $(PROG)
rm -rf pkg src/$(PROG)-* src/v*.tar.gz v*.tar.gz $(PROG)-*.pkg.tar.xz rm -rf pkg src/$(PROG)-* src/v*.tar.gz v*.tar.gz $(PROG)-*.pkg.tar.xz

View File

@@ -30,11 +30,11 @@
#include "device.h" #include "device.h"
#include "encoder.h" #include "encoder.h"
#include "jpeg/encoder.h" #include "encoders/jpeg/encoder.h"
#include "hw/encoder.h" #include "encoders/hw/encoder.h"
#ifdef OMX_ENCODER #ifdef OMX_ENCODER
# include "omx/encoder.h" # include "encoders/omx/encoder.h"
#endif #endif

View File

@@ -28,7 +28,7 @@
#include "device.h" #include "device.h"
#ifdef OMX_ENCODER #ifdef OMX_ENCODER
# include "omx/encoder.h" # include "encoders/omx/encoder.h"
# define ENCODER_TYPES_OMX_HINT ", OMX" # define ENCODER_TYPES_OMX_HINT ", OMX"
#else #else
# define ENCODER_TYPES_OMX_HINT "" # define ENCODER_TYPES_OMX_HINT ""

View File

@@ -25,10 +25,10 @@
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include "../tools.h" #include "../../tools.h"
#include "../logging.h" #include "../../logging.h"
#include "../xioctl.h" #include "../../xioctl.h"
#include "../device.h" #include "../../device.h"
int hw_encoder_prepare_live(struct device_t *dev, unsigned quality) { int hw_encoder_prepare_live(struct device_t *dev, unsigned quality) {

View File

@@ -22,7 +22,7 @@
#pragma once #pragma once
#include "../device.h" #include "../../device.h"
int hw_encoder_prepare_live(struct device_t *dev, unsigned quality); int hw_encoder_prepare_live(struct device_t *dev, unsigned quality);

View File

@@ -33,8 +33,8 @@
#include <jpeglib.h> #include <jpeglib.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include "../tools.h" #include "../../tools.h"
#include "../device.h" #include "../../device.h"
#include "encoder.h" #include "encoder.h"

View File

@@ -22,7 +22,7 @@
#pragma once #pragma once
#include "../device.h" #include "../../device.h"
void jpeg_encoder_compress_buffer(struct device_t *dev, unsigned index, unsigned quality); void jpeg_encoder_compress_buffer(struct device_t *dev, unsigned index, unsigned quality);

View File

@@ -25,7 +25,7 @@
#include <IL/OMX_Core.h> #include <IL/OMX_Core.h>
#include <IL/OMX_Component.h> #include <IL/OMX_Component.h>
#include "../logging.h" #include "../../logging.h"
#include "formatters.h" #include "formatters.h"
#include "component.h" #include "component.h"

View File

@@ -33,9 +33,9 @@
#include <IL/OMX_Broadcom.h> #include <IL/OMX_Broadcom.h>
#include <interface/vcos/vcos_semaphore.h> #include <interface/vcos/vcos_semaphore.h>
#include "../logging.h" #include "../../logging.h"
#include "../tools.h" #include "../../tools.h"
#include "../device.h" #include "../../device.h"
#include "formatters.h" #include "formatters.h"
#include "component.h" #include "component.h"

View File

@@ -27,7 +27,7 @@
#include <IL/OMX_Component.h> #include <IL/OMX_Component.h>
#include <interface/vcos/vcos_semaphore.h> #include <interface/vcos/vcos_semaphore.h>
#include "../device.h" #include "../../device.h"
#define OMX_MAX_ENCODERS 3 #define OMX_MAX_ENCODERS 3

View File

@@ -26,7 +26,7 @@
#include <IL/OMX_IVCommon.h> #include <IL/OMX_IVCommon.h>
#include <IL/OMX_Core.h> #include <IL/OMX_Core.h>
#include "../tools.h" #include "../../tools.h"
#include "formatters.h" #include "formatters.h"

View File

@@ -30,8 +30,8 @@
#include <IL/OMX_Core.h> #include <IL/OMX_Core.h>
#include <IL/OMX_Image.h> #include <IL/OMX_Image.h>
#include "../logging.h" #include "../../logging.h"
#include "../tools.h" #include "../../tools.h"
#define LOG_OMX_ERROR(_error, _msg, ...) { \ #define LOG_OMX_ERROR(_error, _msg, ...) { \

View File

@@ -36,8 +36,6 @@
#include "encoder.h" #include "encoder.h"
#include "stream.h" #include "stream.h"
#include "jpeg/encoder.h"
static long double _stream_get_fluency_delay(struct device_t *dev, struct workers_pool_t *pool); static long double _stream_get_fluency_delay(struct device_t *dev, struct workers_pool_t *pool);
static void _stream_expose_picture(struct stream_t *stream, unsigned buf_index); static void _stream_expose_picture(struct stream_t *stream, unsigned buf_index);