Move all into device/
This commit is contained in:
parent
45724981ad
commit
42ab32b1a6
10
Makefile
10
Makefile
@ -1,6 +1,6 @@
|
||||
TARGET := camera_stream
|
||||
SRC := $(wildcard **/*.c)
|
||||
HEADERS := $(wildcard **/*.h)
|
||||
SRC := $(wildcard **/*.c) $(wildcard **/*/*.c)
|
||||
HEADERS := $(wildcard **/*.h) $(wildcard **/*/*.h)
|
||||
HTML := $(wildcard html/*.js html/*.html)
|
||||
|
||||
CFLAGS := -Werror -g -I$(PWD)
|
||||
@ -18,14 +18,16 @@ OBJS = $(subst .c,.o,$(SRC) $(HTML_SRC))
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
all: $(TARGET)
|
||||
|
||||
%: cmd/%.c $(filter-out cmd/%, $(OBJS))
|
||||
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
install: $(TARGET)
|
||||
install $(TARGET) /usr/local/bin/
|
||||
|
||||
clean:
|
||||
rm -f .depend $(OBJS) $(HTML_SRC) $(TARGET)
|
||||
rm -f .depend $(OBJS) $(OBJS:.o=.d) $(HTML_SRC) $(TARGET)
|
||||
|
||||
-include $(OBJS:.o=.d)
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "http/http.h"
|
||||
#include "opts/opts.h"
|
||||
#include "camera.h"
|
||||
#include "device/camera.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "camera.h"
|
||||
|
||||
#include "hw/device.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
|
||||
void camera_init(camera_t *camera)
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "hw/links.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
#define MAX_DEVICES 20
|
||||
#define MAX_HTTP_METHODS 20
|
@ -1,11 +1,11 @@
|
||||
#include "camera.h"
|
||||
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
int camera_configure_decoder(camera_t *camera)
|
@ -1,11 +1,11 @@
|
||||
#include "camera.h"
|
||||
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
int camera_configure_direct(camera_t *camera)
|
@ -1,11 +1,11 @@
|
||||
#include "camera.h"
|
||||
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
void write_yuvu(buffer_t *buffer);
|
@ -1,11 +1,11 @@
|
||||
#include "camera.h"
|
||||
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "hw/links.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/links.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
void write_yuvu(buffer_t *buffer)
|
@ -1,6 +1,6 @@
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
buffer_t *buffer_open(const char *name, buffer_list_t *buf_list, int index) {
|
||||
buffer_t *buf = calloc(1, sizeof(buffer_t));
|
@ -1,6 +1,6 @@
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
buffer_list_t *buffer_list_open(const char *name, struct device_s *dev, unsigned type, bool do_mmap)
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
#include "hw/buffer_lock.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/buffer_lock.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
|
||||
bool buffer_lock_is_used(buffer_lock_t *buf_lock)
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "hw/device.h"
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
|
||||
device_t *device_open(const char *name, const char *path) {
|
||||
device_t *dev = calloc(1, sizeof(device_t));
|
@ -1,4 +1,4 @@
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
@ -1,4 +1,4 @@
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "hw/device.h"
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/links.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/links.h"
|
||||
|
||||
#define N_FDS 50
|
||||
#define QUEUE_ON_CAPTURE // seems to provide better latency
|
@ -1,4 +1,4 @@
|
||||
#include "hw/v4l2.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
|
||||
int xioctl(const char *name, int fd, int request, void *arg)
|
||||
{
|
@ -11,7 +11,7 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "http/http.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
|
||||
#define BUFSIZE 256
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "http/http.h"
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_lock.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_lock.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
#include "ffmpeg/remuxer.h"
|
||||
|
||||
buffer_lock_t *http_h264_buffer_for_res(http_worker_t *worker);
|
||||
|
@ -2,10 +2,10 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "http/http.h"
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_lock.h"
|
||||
#include "hw/buffer_list.h"
|
||||
#include "hw/device.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_lock.h"
|
||||
#include "device/hw/buffer_list.h"
|
||||
#include "device/hw/device.h"
|
||||
|
||||
DEFINE_BUFFER_LOCK(http_h264, 0);
|
||||
DEFINE_BUFFER_LOCK(http_h264_lowres, 0);
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "http/http.h"
|
||||
#include "hw/buffer.h"
|
||||
#include "hw/buffer_lock.h"
|
||||
#include "device/hw/buffer.h"
|
||||
#include "device/hw/buffer_lock.h"
|
||||
|
||||
DEFINE_BUFFER_LOCK(http_jpeg, 1000);
|
||||
DEFINE_BUFFER_LOCK(http_jpeg_lowres, 1000);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "opts.h"
|
||||
#include "hw/v4l2.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user