Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
ee284a56
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ee284a56
编写于
5月 05, 2015
作者:
J
Jim
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #424 from fryshorts/bsd-build-fixes
BSD build fixes
上级
2ef3f1a2
64fae808
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
83 addition
and
9 deletion
+83
-9
cmake/Modules/FindLibsysinfo.cmake
cmake/Modules/FindLibsysinfo.cmake
+24
-0
deps/glad/CMakeLists.txt
deps/glad/CMakeLists.txt
+6
-1
deps/jansson/CMakeLists.txt
deps/jansson/CMakeLists.txt
+1
-1
libobs/CMakeLists.txt
libobs/CMakeLists.txt
+9
-0
libobs/graphics/graphics.h
libobs/graphics/graphics.h
+1
-1
libobs/obs-nix.c
libobs/obs-nix.c
+4
-0
libobs/util/platform-nix.c
libobs/util/platform-nix.c
+0
-1
libobs/util/threading-posix.c
libobs/util/threading-posix.c
+6
-0
obs/obs-app.cpp
obs/obs-app.cpp
+2
-0
plugins/CMakeLists.txt
plugins/CMakeLists.txt
+5
-0
plugins/linux-jack/CMakeLists.txt
plugins/linux-jack/CMakeLists.txt
+4
-1
plugins/linux-pulseaudio/CMakeLists.txt
plugins/linux-pulseaudio/CMakeLists.txt
+4
-1
plugins/linux-v4l2/CMakeLists.txt
plugins/linux-v4l2/CMakeLists.txt
+5
-0
plugins/linux-v4l2/v4l2-helpers.c
plugins/linux-v4l2/v4l2-helpers.c
+1
-1
plugins/linux-v4l2/v4l2-input.c
plugins/linux-v4l2/v4l2-input.c
+11
-2
未找到文件。
cmake/Modules/FindLibsysinfo.cmake
0 → 100644
浏览文件 @
ee284a56
# Once done these will be defined:
#
# SYSINFO_FOUND
# SYSINFO_INCLUDE_DIRS
# SYSINFO_LIBRARIES
find_path
(
SYSINFO_INCLUDE_DIR
NAMES sys/sysinfo.h
PATHS
/usr/include /usr/local/include /opt/local/include
)
find_library
(
SYSINFO_LIB
NAMES sysinfo libsysinfo
PATHS
/usr/lib /usr/local/lib /opt/local/lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
sysinfo DEFAULT_MSG SYSINFO_LIB SYSINFO_INCLUDE_DIR
)
mark_as_advanced
(
SYSINFO_INCLUDE_DIR SYSINFO_LIB
)
if
(
SYSINFO_FOUND
)
set
(
SYSINFO_INCLUDE_DIRS
${
SYSINFO_INCLUDE_DIR
}
)
set
(
SYSINFO_LIBRARIES
${
SYSINFO_LIB
}
)
endif
()
deps/glad/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -43,8 +43,13 @@ endif()
if
(
NOT WIN32 AND NOT APPLE
)
set
(
glad_PLATFORM_DEPS
-ldl
${
X11_X11_LIB
}
)
# only link to libdl on linux
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
set
(
glad_PLATFORM_DEPS
${
glad_PLATFORM_DEPS
}
-ldl
)
endif
()
endif
()
target_link_libraries
(
glad
...
...
deps/jansson/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -95,7 +95,7 @@ if (MSVC)
endif
()
if
(
NOT WIN32
AND
(
CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX
)
)
if
(
NOT WIN32 AND
NOT APPLE
)
set
(
CMAKE_C_FLAGS
"-fPIC"
)
endif
()
...
...
libobs/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -77,6 +77,15 @@ elseif(UNIX)
util/threading-posix.c
util/pipe-posix.c
util/platform-nix.c
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"FreeBSD"
)
# use the sysinfo compatibility library on bsd
find_package
(
Libsysinfo REQUIRED
)
include_directories
(
${
SYSINFO_INCLUDE_DIRS
}
)
set
(
libobs_PLATFORM_DEPS
${
libobs_PLATFORM_DEPS
}
${
SYSINFO_LIBRARIES
}
)
endif
()
endif
()
if
(
MSVC
)
...
...
libobs/graphics/graphics.h
浏览文件 @
ee284a56
...
...
@@ -426,7 +426,7 @@ struct gs_window {
void
*
hwnd
;
#elif defined(__APPLE__)
__unsafe_unretained
id
view
;
#elif defined(__linux__)
#elif defined(__linux__)
|| defined(__FreeBSD__)
/* I'm not sure how portable defining id to uint32_t is. */
uint32_t
id
;
void
*
display
;
...
...
libobs/obs-nix.c
浏览文件 @
ee284a56
...
...
@@ -16,6 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifdef __FreeBSD__
#define _WITH_GETLINE
#endif
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
...
...
libobs/util/platform-nix.c
浏览文件 @
ee284a56
...
...
@@ -26,7 +26,6 @@
#if !defined(__APPLE__)
#include <sys/times.h>
#include <sys/vtimes.h>
#endif
#include "darray.h"
...
...
libobs/util/threading-posix.c
浏览文件 @
ee284a56
...
...
@@ -26,6 +26,10 @@
#include <semaphore.h>
#endif
#if defined(__FreeBSD__)
#include <pthread_np.h>
#endif
#include "bmem.h"
#include "threading.h"
...
...
@@ -256,6 +260,8 @@ void os_set_thread_name(const char *name)
{
#if defined(__APPLE__)
pthread_setname_np
(
name
);
#elif defined(__FreeBSD__)
pthread_set_name_np
(
pthread_self
(),
name
);
#elif !defined(__MINGW32__)
pthread_setname_np
(
pthread_self
(),
name
);
#endif
...
...
obs/obs-app.cpp
浏览文件 @
ee284a56
...
...
@@ -357,6 +357,8 @@ string OBSApp::GetVersionString() const
ver
<<
"windows)"
;
#elif __APPLE__
ver
<<
"mac)"
;
#elif __FreeBSD__
ver
<<
"freebsd)"
;
#else
/* assume linux for the time being */
ver
<<
"linux)"
;
#endif
...
...
plugins/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -15,6 +15,11 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
add_subdirectory
(
linux-v4l2
)
add_subdirectory
(
linux-jack
)
add_subdirectory
(
decklink/linux
)
elseif
(
"
${
CMAKE_SYSTEM_NAME
}
"
MATCHES
"FreeBSD"
)
add_subdirectory
(
linux-capture
)
add_subdirectory
(
linux-pulseaudio
)
add_subdirectory
(
linux-v4l2
)
add_subdirectory
(
linux-jack
)
endif
()
add_subdirectory
(
image-source
)
...
...
plugins/linux-jack/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -13,7 +13,10 @@ elseif(NOT JACK_FOUND)
return
()
endif
()
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
)
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
${
JACK_INCLUDE_DIR
}
)
set
(
linux-jack_SOURCES
linux-jack.c
...
...
plugins/linux-pulseaudio/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -13,7 +13,10 @@ elseif(NOT PULSEAUDIO_FOUND)
return
()
endif
()
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
)
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
${
PULSEAUDIO_INCLUDE_DIR
}
)
set
(
linux-pulseaudio_SOURCES
linux-pulseaudio.c
...
...
plugins/linux-v4l2/CMakeLists.txt
浏览文件 @
ee284a56
...
...
@@ -24,6 +24,11 @@ else()
add_definitions
(
-DHAVE_UDEV
)
endif
()
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
${
LIBV4L2_INCLUDE_DIRS
}
)
set
(
linux-v4l2_SOURCES
linux-v4l2.c
v4l2-input.c
...
...
plugins/linux-v4l2/v4l2-helpers.c
浏览文件 @
ee284a56
...
...
@@ -240,7 +240,7 @@ int_fast32_t v4l2_set_standard(int_fast32_t dev, int *standard)
int_fast32_t
v4l2_enum_dv_timing
(
int_fast32_t
dev
,
struct
v4l2_dv_timings
*
dvt
,
int
index
)
{
#if
ndef VIDIOC_ENUM_DV_TIMINGS
#if
!defined(VIDIOC_ENUM_DV_TIMINGS) || !defined(V4L2_IN_CAP_DV_TIMINGS)
UNUSED_PARAMETER
(
dev
);
UNUSED_PARAMETER
(
dvt
);
UNUSED_PARAMETER
(
index
);
...
...
plugins/linux-v4l2/v4l2-input.c
浏览文件 @
ee284a56
...
...
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* The new dv timing api was introduced in Linux 3.4
* Currently we simply disable dv timings when this is not defined */
#if
ndef VIDIOC_ENUM_DV_TIMINGS
#if
!defined(VIDIOC_ENUM_DV_TIMINGS) || !defined(V4L2_IN_CAP_DV_TIMINGS)
#define V4L2_IN_CAP_DV_TIMINGS 0
#endif
...
...
@@ -269,7 +269,11 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings)
size_t
cur_device_index
;
const
char
*
cur_device_name
;
#ifdef __FreeBSD__
dirp
=
opendir
(
"/dev"
);
#else
dirp
=
opendir
(
"/sys/class/video4linux"
);
#endif
if
(
!
dirp
)
return
;
...
...
@@ -285,6 +289,11 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings)
uint32_t
caps
;
struct
v4l2_capability
video_cap
;
#ifdef __FreeBSD__
if
(
strstr
(
dp
->
d_name
,
"video"
)
==
NULL
)
continue
;
#endif
if
(
dp
->
d_type
==
DT_DIR
)
continue
;
...
...
@@ -949,7 +958,7 @@ static void *v4l2_create(obs_data_t *settings, obs_source_t *source)
#ifndef V4L2_CAP_DEVICE_CAPS
blog
(
LOG_WARNING
,
"Plugin built without device caps support!"
);
#endif
#if
ndef VIDIOC_ENUM_DV_TIMINGS
#if
!defined(VIDIOC_ENUM_DV_TIMINGS) || !defined(V4L2_IN_CAP_DV_TIMINGS)
blog
(
LOG_WARNING
,
"Plugin built without dv-timing support!"
);
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录