Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
24c45458
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,发现更多精彩内容 >>
提交
24c45458
编写于
12月 18, 2013
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use the preview window as the main window associated with the OpenGL context
上级
a8ada497
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
15 deletion
+23
-15
build/data/obs-studio/locale/en.txt
build/data/obs-studio/locale/en.txt
+1
-1
libobs/obs-video.c
libobs/obs-video.c
+17
-5
obs/obs-app.cpp
obs/obs-app.cpp
+5
-8
obs/obs-app.hpp
obs/obs-app.hpp
+0
-1
未找到文件。
build/data/obs-studio/locale/en.txt
浏览文件 @
24c45458
...
...
@@ -42,7 +42,7 @@ Settings.Video.DisableAeroWindows="Disable Aero (Windows only)"
Settings.Video.FPS="FPS:"
Settings.Video.FPS.Common="Common FPS Values"
Settings.Video.FPS.Integer="Integer FPS Value"
Settings.VIdeo.FPS.Fraction="Fra
me Interval (fraction)
"
Settings.VIdeo.FPS.Fraction="Fra
ctional FPS Value
"
Settings.Video.FPS.Nanoseconds="Frame Interval (nanoseconds)"
Settings.Video.FPS.Numerator="Numerator:"
Settings.Video.FPS.Denominator="Denominator:"
...
...
libobs/obs-video.c
浏览文件 @
24c45458
...
...
@@ -36,11 +36,10 @@ static void tick_sources(uint64_t cur_time, uint64_t *last_time)
*
last_time
=
cur_time
;
}
static
inline
void
render_
display
(
struct
obs_display
*
display
)
static
inline
void
render_
begin
(
struct
obs_display
*
display
)
{
struct
vec4
clear_color
;
uint32_t
width
,
height
;
size_t
i
;
gs_load_swapchain
(
display
?
display
->
swap
:
NULL
);
...
...
@@ -58,6 +57,19 @@ static inline void render_display(struct obs_display *display)
gs_ortho
(
0
.
0
f
,
(
float
)
width
,
0
.
0
f
,
(
float
)
height
,
-
100
.
0
f
,
100
.
0
f
);
gs_setviewport
(
0
,
0
,
width
,
height
);
}
static
inline
void
render_end
(
struct
obs_display
*
display
)
{
gs_endscene
();
gs_present
();
}
static
void
render_display
(
struct
obs_display
*
display
)
{
size_t
i
;
render_begin
(
display
);
for
(
i
=
0
;
i
<
MAX_CHANNELS
;
i
++
)
{
struct
obs_source
**
p_source
;
...
...
@@ -74,8 +86,7 @@ static inline void render_display(struct obs_display *display)
}
}
gs_endscene
();
gs_present
();
render_end
(
display
);
}
static
inline
void
render_displays
(
void
)
...
...
@@ -85,8 +96,9 @@ static inline void render_displays(void)
/* render extra displays/swaps */
pthread_mutex_lock
(
&
obs
->
data
.
displays_mutex
);
for
(
i
=
0
;
i
<
obs
->
data
.
displays
.
num
;
i
++
)
for
(
i
=
0
;
i
<
obs
->
data
.
displays
.
num
;
i
++
)
{
render_display
(
obs
->
data
.
displays
.
array
[
i
]);
}
pthread_mutex_unlock
(
&
obs
->
data
.
displays_mutex
);
...
...
obs/obs-app.cpp
浏览文件 @
24c45458
...
...
@@ -199,24 +199,24 @@ bool OBSApp::OnInit()
wxInitAllImageHandlers
();
dummyWindow
=
new
wxFrame
(
NULL
,
wxID_ANY
,
"Dummy Window"
);
OBSBasic
*
mainWindow
=
new
OBSBasic
();
wxSize
size
=
mainWindow
->
GetPreviewPanel
()
->
GetClientSize
();
/* this is a test */
struct
obs_video_info
ovi
;
ovi
.
graphics_module
=
"libobs-opengl"
;
ovi
.
fps_num
=
30000
;
ovi
.
fps_den
=
1001
;
ovi
.
window_width
=
2
;
ovi
.
window_height
=
2
;
ovi
.
window_width
=
size
.
x
;
ovi
.
window_height
=
size
.
y
;
ovi
.
base_width
=
1920
;
ovi
.
base_height
=
1080
;
ovi
.
output_width
=
1280
;
ovi
.
output_height
=
720
;
ovi
.
output_format
=
VIDEO_FORMAT_RGBA
;
ovi
.
adapter
=
0
;
ovi
.
window
=
WxToGSWindow
(
dummyWindow
);
ovi
.
window
=
WxToGSWindow
(
mainWindow
->
GetPreviewPanel
()
);
if
(
!
obs_reset_video
(
&
ovi
))
return
false
;
...
...
@@ -229,9 +229,6 @@ int OBSApp::OnExit()
{
obs_shutdown
();
delete
dummyWindow
;
dummyWindow
=
NULL
;
return
wxApp
::
OnExit
();
}
...
...
obs/obs-app.hpp
浏览文件 @
24c45458
...
...
@@ -29,7 +29,6 @@ public:
class
OBSApp
:
public
OBSAppBase
{
ConfigFile
globalConfig
;
TextLookup
textLookup
;
wxFrame
*
dummyWindow
;
bool
InitGlobalConfig
();
bool
InitGlobalConfigDefaults
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录