Skip to content

Commit

Permalink
Include project's local headers for H.264 and HEVC
Browse files Browse the repository at this point in the history
- h264-ctrls.h
- hevc-ctrls.h

Signed-off-by: Ralf Zerres <[email protected]>
  • Loading branch information
rzerres committed Mar 8, 2019
1 parent 437da0b commit a55d409
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions presets.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <linux/media.h>
#include <linux/videodev2.h>
#include <mpeg2-ctrls.h>
#include <h264-ctrls.h>
#include <hevc-ctrls.h>
//#include <h264-ctrls.h>
//#include <hevc-ctrls.h>

#include "v4l2-request-test.h"

Expand Down
4 changes: 2 additions & 2 deletions v4l2-request-test.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <mpeg2-ctrls.h>
//#include <h264-ctrls.h>
//#include <hevc-ctrls.h>
#include <h264-ctrls.h>
#include <hevc-ctrls.h>

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define TS_REF_INDEX(index) ((index) * 1000)
Expand Down
9 changes: 5 additions & 4 deletions v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <linux/media.h>
#include <linux/videodev2.h>
#include <mpeg2-ctrls.h>
#include <h264-ctrls.h>
#include <hevc-ctrls.h>
//#include <h264-ctrls.h>
//#include <hevc-ctrls.h>

#include "v4l2-request-test.h"

Expand Down Expand Up @@ -453,13 +453,14 @@ static int set_control(int video_fd, int request_fd, unsigned int id,
controls.request_fd = request_fd;
}

if (!quiet)
if (!quiet) {
/* Ref: https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/vidioc-g-ext-ctrls.html */
fprintf(stderr, "Initialized 'controls' structure (ctrl_class: %d, which: %d)\n",
controls.ctrl_class, controls.which);
fprintf(stderr, " 'control' value (id: %d, size: %d)\n",
control.id, control.size);

}

rc = ioctl(video_fd, VIDIOC_S_EXT_CTRLS, &controls);
if (rc < 0) {
fprintf(stderr, "Unable to set control: %s (%d)\n",
Expand Down

0 comments on commit a55d409

Please sign in to comment.