override CPPFLAGS += -I../include -I../../../../linux/include
CFLAGS := -g -O1
-CFLAGS += -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes
+CFLAGS += -Wall -Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
LIBS = -lpthread
#include <linux/videodev.h>
#include <linux/videodev2.h>
#include <libv4l2.h>
+#include "libv4l1.h"
#include "libv4l1-priv.h"
#define V4L1_SUPPORTS_ENUMINPUT 0x01
input2.index = chan->channel;
result = v4l2_ioctl(fd, VIDIOC_ENUMINPUT, &input2);
if (result == 0) {
- snprintf(chan->name, sizeof(chan->name), "%s", input2.name);
+ snprintf(chan->name, sizeof(chan->name), "%s", (char*)input2.name);
if (input2.type == V4L2_INPUT_TYPE_TUNER) {
chan->tuners = 1;
chan->type = VIDEO_TYPE_TV;
#include <asm/types.h>
/* end broken header workaround includes */
#include <linux/videodev.h>
+#include "libv4l1-priv.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
break;
case VIDIOCGWIN:
case VIDIOCSWIN:
- fprintf(v4l1_log_file,"width\t%d\n",
+ fprintf(v4l1_log_file,"width\t%u\n",
((struct video_window *)arg)->width);
- fprintf(v4l1_log_file,"height\t%d\n",
+ fprintf(v4l1_log_file,"height\t%u\n",
((struct video_window *)arg)->height);
break;
fprintf(v4l1_log_file,"palette %d\n",( (int)((struct video_picture*)arg)->palette) );
break;
- case VIDIOCCAPTURE: fprintf(v4l1_log_file,"on/of? %d\n", *((int *)arg) );
+ case VIDIOCCAPTURE: fprintf(v4l1_log_file,"on/off? %d\n", *((int *)arg) );
break;
case VIDIOCSYNC: fprintf(v4l1_log_file,"sync %d\n", *((int *)arg) );
#include <fcntl.h>
#include <libv4l1.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+
/* Check that open/read/mmap is not a define */
#if defined open || defined read || defined mmap
#error open/read/mmap is a prepocessor macro !!
override CPPFLAGS += -I../include -I../../../../linux/include
CFLAGS := -g -O1
-CFLAGS += -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes
+CFLAGS += -Wall -Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
LIBS = -lpthread
#include <asm/types.h>
/* end broken header workaround includes */
#include <linux/videodev2.h>
+#include "libv4l2-priv.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
int pixfmt = fmt->fmt.pix.pixelformat;
if (fmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
- fprintf(v4l2_log_file, " pixelformat: %c%c%c%c %dx%d\n",
+ fprintf(v4l2_log_file, " pixelformat: %c%c%c%c %ux%u\n",
pixfmt & 0xff,
(pixfmt >> 8) & 0xff,
(pixfmt >> 16) & 0xff,
struct v4l2_requestbuffers *req = arg;
fprintf(v4l2_log_file, " count: %u type: %d memory: %d\n",
- req->count, req->type, req->memory);
+ req->count, (int)req->type, (int)req->memory);
}
break;
}
#include <syscall.h>
#include <fcntl.h>
#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
/* These headers are not needed by us, but by linux/videodev2.h,
which is broken on some systems and doesn't include them itself :( */
#include <sys/time.h>
override CPPFLAGS += -I../include -I../../../../linux/include
CFLAGS := -g -O1
-CFLAGS += -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes
+CFLAGS += -Wall -Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
ifeq ($(LINKTYPE),static)
CONVERT_LIB = libv4lconvert.a
if (header_width != dest_fmt->fmt.pix.width || header_height != dest_fmt->fmt.pix.height) {
V4LCONVERT_ERR("unexpected width / height in JPEG header\n");
- V4LCONVERT_ERR("expected: %dx%d, header: %ux%u\n",
+ V4LCONVERT_ERR("expected: %ux%u, header: %ux%u\n",
dest_fmt->fmt.pix.width, dest_fmt->fmt.pix.height,
header_width, header_height);
errno = EIO;
signed char val;
} table[256];
-void init_pixart_decoder(void)
+static void init_pixart_decoder(void)
{
int i;
int is_abs, val, len;
*/
+#include "libv4lconvert-priv.h"
+
#define RGB2YUV(r,g,b,y,u,v) \
(y) = (( 8453*(r) + 16594*(g) + 3223*(b) + 524288) >> 15); \
(u) = (( -4878*(r) - 9578*(g) + 14456*(b) + 4210688) >> 15); \
present at the MSB of byte x.
*/
-void sonix_decompress_init(void)
+static void sonix_decompress_init(void)
{
int i;
int is_abs, val, len, unk;
* but it might work with other spca561 cameras
*/
#include <string.h>
+#include "libv4lconvert-priv.h"
/*fixme: not reentrant */
static unsigned int bit_bucket;
unsigned char c; \
if (stream >= priv->stream_end) { \
snprintf(priv->error_string, sizeof(priv->error_string), \
- "fill_nbits error: need %d more bits\n", \
+ "fill_nbits error: need %u more bits\n", \
nbits_wanted - nbits_in_reservoir); \
longjmp(priv->jump_state, -EIO); \
} \
error("We do not support more than %d DC Huffman table\n",
HUFFMAN_TABLES);
if (cid != priv->component_infos[i].cid)
- error("SOS cid order (%d:%d) isn't compatible with the SOF marker (%d:%d)\n",
+ error("SOS cid order (%u:%u) isn't compatible with the SOF marker (%u:%u)\n",
i, cid, i, priv->component_infos[i].cid);
- trace("ComponentId:%d tableAC:%d tableDC:%d\n", cid, table&0xf, table>>4);
+ trace("ComponentId:%u tableAC:%d tableDC:%d\n", cid, table&0xf, table>>4);
#endif
priv->component_infos[i].AC_table = &priv->HTAC[table&0xf];
priv->component_infos[i].DC_table = &priv->HTDC[table>>4];