Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
f6dc7108
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,发现更多精彩内容 >>
未验证
提交
f6dc7108
编写于
5月 03, 2020
作者:
J
Jim
提交者:
GitHub
5月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2814 from cg2121/media-hotkeys
obs-plugins: Check if sources are showing for media hotkeys
上级
3b8dd47f
62b1911e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
plugins/image-source/obs-slideshow.c
plugins/image-source/obs-slideshow.c
+5
-5
plugins/obs-ffmpeg/obs-ffmpeg-source.c
plugins/obs-ffmpeg/obs-ffmpeg-source.c
+5
-5
plugins/vlc-video/vlc-video-source.c
plugins/vlc-video/vlc-video-source.c
+5
-5
未找到文件。
plugins/image-source/obs-slideshow.c
浏览文件 @
f6dc7108
...
...
@@ -529,7 +529,7 @@ static void play_pause_hotkey(void *data, obs_hotkey_id id,
struct
slideshow
*
ss
=
data
;
if
(
pressed
&&
obs_source_
active
(
ss
->
source
))
if
(
pressed
&&
obs_source_
showing
(
ss
->
source
))
ss_play_pause
(
ss
);
}
...
...
@@ -541,7 +541,7 @@ static void restart_hotkey(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey,
struct
slideshow
*
ss
=
data
;
if
(
pressed
&&
obs_source_
active
(
ss
->
source
))
if
(
pressed
&&
obs_source_
showing
(
ss
->
source
))
ss_restart
(
ss
);
}
...
...
@@ -553,7 +553,7 @@ static void stop_hotkey(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey,
struct
slideshow
*
ss
=
data
;
if
(
pressed
&&
obs_source_
active
(
ss
->
source
))
if
(
pressed
&&
obs_source_
showing
(
ss
->
source
))
ss_stop
(
ss
);
}
...
...
@@ -568,7 +568,7 @@ static void next_slide_hotkey(void *data, obs_hotkey_id id,
if
(
!
ss
->
manual
)
return
;
if
(
pressed
&&
obs_source_
active
(
ss
->
source
))
if
(
pressed
&&
obs_source_
showing
(
ss
->
source
))
ss_next_slide
(
ss
);
}
...
...
@@ -583,7 +583,7 @@ static void previous_slide_hotkey(void *data, obs_hotkey_id id,
if
(
!
ss
->
manual
)
return
;
if
(
pressed
&&
obs_source_
active
(
ss
->
source
))
if
(
pressed
&&
obs_source_
showing
(
ss
->
source
))
ss_previous_slide
(
ss
);
}
...
...
plugins/obs-ffmpeg/obs-ffmpeg-source.c
浏览文件 @
f6dc7108
...
...
@@ -391,7 +391,7 @@ static void restart_hotkey(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey,
return
;
struct
ffmpeg_source
*
s
=
data
;
if
(
obs_source_
active
(
s
->
source
))
if
(
obs_source_
showing
(
s
->
source
))
obs_source_media_restart
(
s
->
source
);
}
...
...
@@ -460,7 +460,7 @@ static bool ffmpeg_source_play_hotkey(void *data, obs_hotkey_pair_id id,
struct
ffmpeg_source
*
s
=
data
;
if
(
s
->
state
==
OBS_MEDIA_STATE_PLAYING
||
!
obs_source_
active
(
s
->
source
))
!
obs_source_
showing
(
s
->
source
))
return
false
;
obs_source_media_play_pause
(
s
->
source
,
false
);
...
...
@@ -479,7 +479,7 @@ static bool ffmpeg_source_pause_hotkey(void *data, obs_hotkey_pair_id id,
struct
ffmpeg_source
*
s
=
data
;
if
(
s
->
state
!=
OBS_MEDIA_STATE_PLAYING
||
!
obs_source_
active
(
s
->
source
))
!
obs_source_
showing
(
s
->
source
))
return
false
;
obs_source_media_play_pause
(
s
->
source
,
true
);
...
...
@@ -497,7 +497,7 @@ static void ffmpeg_source_stop_hotkey(void *data, obs_hotkey_id id,
struct
ffmpeg_source
*
s
=
data
;
if
(
obs_source_
active
(
s
->
source
))
if
(
obs_source_
showing
(
s
->
source
))
obs_source_media_stop
(
s
->
source
);
}
...
...
@@ -599,7 +599,7 @@ static void ffmpeg_source_restart(void *data)
{
struct
ffmpeg_source
*
s
=
data
;
if
(
obs_source_
active
(
s
->
source
))
if
(
obs_source_
showing
(
s
->
source
))
ffmpeg_source_start
(
s
);
set_media_state
(
s
,
OBS_MEDIA_STATE_PLAYING
);
...
...
plugins/vlc-video/vlc-video-source.c
浏览文件 @
f6dc7108
...
...
@@ -779,7 +779,7 @@ static void vlcs_play_pause_hotkey(void *data, obs_hotkey_id id,
enum
obs_media_state
state
=
obs_source_media_get_state
(
c
->
source
);
if
(
pressed
&&
obs_source_
active
(
c
->
source
))
{
if
(
pressed
&&
obs_source_
showing
(
c
->
source
))
{
if
(
state
==
OBS_MEDIA_STATE_PLAYING
)
obs_source_media_play_pause
(
c
->
source
,
true
);
else
if
(
state
==
OBS_MEDIA_STATE_PAUSED
)
...
...
@@ -795,7 +795,7 @@ static void vlcs_restart_hotkey(void *data, obs_hotkey_id id,
struct
vlc_source
*
c
=
data
;
if
(
pressed
&&
obs_source_
active
(
c
->
source
))
if
(
pressed
&&
obs_source_
showing
(
c
->
source
))
obs_source_media_restart
(
c
->
source
);
}
...
...
@@ -807,7 +807,7 @@ static void vlcs_stop_hotkey(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey,
struct
vlc_source
*
c
=
data
;
if
(
pressed
&&
obs_source_
active
(
c
->
source
))
if
(
pressed
&&
obs_source_
showing
(
c
->
source
))
obs_source_media_stop
(
c
->
source
);
}
...
...
@@ -819,7 +819,7 @@ static void vlcs_playlist_next_hotkey(void *data, obs_hotkey_id id,
struct
vlc_source
*
c
=
data
;
if
(
pressed
&&
obs_source_
active
(
c
->
source
))
if
(
pressed
&&
obs_source_
showing
(
c
->
source
))
obs_source_media_next
(
c
->
source
);
}
...
...
@@ -831,7 +831,7 @@ static void vlcs_playlist_prev_hotkey(void *data, obs_hotkey_id id,
struct
vlc_source
*
c
=
data
;
if
(
pressed
&&
obs_source_
active
(
c
->
source
))
if
(
pressed
&&
obs_source_
showing
(
c
->
source
))
obs_source_media_previous
(
c
->
source
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录