Skip to content

Commit

Permalink
Merge pull request CatxFish#8 from twz123/fix-build
Browse files Browse the repository at this point in the history
Set CXX11 standard, add missing import, correct cmake params in README
  • Loading branch information
CatxFish committed Oct 13, 2018
2 parents b38ffb3 + 408a2ac commit 1ec3c8a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project(obs-v4l2sink)
include(external/FindLibObs.cmake)
find_package(LibObs REQUIRED)

set (CMAKE_CXX_STANDARD 11)
set(CMAKE_PREFIX_PATH "${QTDIR}")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
```
4 changes: 2 additions & 2 deletions src/v4l2sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include "v4l2sink.h"
#include "v4l2sinkproperties.h"

Expand All @@ -31,7 +32,7 @@
#define V4L2SINK_ERROR_OTHER 3

struct v4l2sink_data{
obs_output_t *output = nullptr;
obs_output_t *output = nullptr;
bool active = false;
int v4l2_fd = 0;
int width = 0;
Expand Down Expand Up @@ -375,4 +376,3 @@ signal_handler_t* v4l2sink_get_signal_handler()
{
return obs_output_get_signal_handler(v4l2_out);
}

0 comments on commit 1ec3c8a

Please sign in to comment.