Changes of Revision 69

obs-studio.changes Changed
x
 
1
@@ -1,4 +1,21 @@
2
 -------------------------------------------------------------------
3
+Sun Sep 22 21:04:42 UTC 2019 - jimmy@boombatower.com
4
+
5
+- Update to version 24.0.1:
6
+  * obs-browser: Fix a deadlock
7
+  * libobs: Update version to 24.0.1
8
+  * libobs: Add API to get last OBS version of a source
9
+  * obs-browser: Signal whether audio active/inactive
10
+  * UI: Hide mixer sources if audio deactivated
11
+  * libobs: Add funcs to determine whether audio active
12
+  * obs-browser: Turn rerouting audio off by default
13
+  * UI: Check for null pointer
14
+  * UI: Fix crash closing mixer dock panels
15
+  * win-dshow: Do not allow H264 to have same priority as MJPEG
16
+  * win-dshow: Disable HW decode in DirectShow for now
17
+  * UI: Adjust locale name for zh-TW
18
+
19
+-------------------------------------------------------------------
20
 Thu Sep 19 02:55:09 UTC 2019 - jimmy@boombatower.com
21
 
22
 - Update to version 24.0.0:
23
obs-studio.spec Changed
8
 
1
@@ -1,5 +1,5 @@
2
 Name:           obs-studio
3
-Version:        24.0.0
4
+Version:        24.0.1
5
 Release:        0
6
 Summary:        A recording/broadcasting program
7
 Group:          Productivity/Multimedia/Video/Editors and Convertors
8
_service Changed
10
 
1
@@ -1,7 +1,7 @@
2
 <services>
3
   <service name="tar_scm" mode="disabled">
4
     <param name="versionformat">@PARENT_TAG@</param>
5
-    <param name="revision">refs/tags/24.0.0</param>
6
+    <param name="revision">refs/tags/24.0.1</param>
7
     <param name="url">git://github.com/jp9000/obs-studio.git</param>
8
     <param name="scm">git</param>
9
     <param name="changesgenerate">enable</param>
10
_servicedata Changed
9
 
1
@@ -1,6 +1,6 @@
2
 <servicedata>
3
   <service name="tar_scm">
4
     <param name="url">git://github.com/jp9000/obs-studio.git</param>
5
-    <param name="changesrevision">5d95cfc3614d6d720d204be1a14ca90486e64498</param>
6
+    <param name="changesrevision">94570478b7d1f8c097a0bf8d8dabfb5613e4ab92</param>
7
   </service>
8
 </servicedata>
9
obs-studio-24.0.0.tar.xz/UI/auth-mixer.cpp -> obs-studio-24.0.1.tar.xz/UI/auth-mixer.cpp Changed
10
 
1
@@ -204,7 +204,7 @@
2
    chat->setAllowedAreas(Qt::AllDockWidgetAreas);
3
 
4
    QCefWidget *browser = cef->create_widget(nullptr, url, panel_cookies);
5
-   chat->setWidget(browser);
6
+   chat->SetWidget(browser);
7
 
8
    main->addDockWidget(Qt::RightDockWidgetArea, chat.data());
9
    chatMenu.reset(main->AddDockWidget(chat.data()));
10
obs-studio-24.0.0.tar.xz/UI/data/locale.ini -> obs-studio-24.0.1.tar.xz/UI/data/locale.ini Changed
10
 
1
@@ -68,7 +68,7 @@
2
 Name=简体中文
3
 
4
 [zh-TW]
5
-Name=正體中文(臺灣)
6
+Name=繁體中文
7
 
8
 [bg-BG]
9
 Name=Български
10
obs-studio-24.0.0.tar.xz/UI/window-basic-main.cpp -> obs-studio-24.0.1.tar.xz/UI/window-basic-main.cpp Changed
48
 
1
@@ -1411,6 +1411,12 @@
2
    signalHandlers.emplace_back(obs_get_signal_handler(),
3
                    "source_deactivate",
4
                    OBSBasic::SourceDeactivated, this);
5
+   signalHandlers.emplace_back(obs_get_signal_handler(),
6
+                   "source_audio_activate",
7
+                   OBSBasic::SourceAudioActivated, this);
8
+   signalHandlers.emplace_back(obs_get_signal_handler(),
9
+                   "source_audio_deactivate",
10
+                   OBSBasic::SourceAudioDeactivated, this);
11
    signalHandlers.emplace_back(obs_get_signal_handler(), "source_rename",
12
                    OBSBasic::SourceRenamed, this);
13
 }
14
@@ -2961,6 +2967,8 @@
15
 {
16
    if (SourceMixerHidden(source))
17
        return;
18
+   if (!obs_source_audio_active(source))
19
+       return;
20
 
21
    bool vertical = config_get_bool(GetGlobalConfig(), "BasicWindow",
22
                    "VerticalVolControl");
23
@@ -3282,6 +3290,24 @@
24
                      Q_ARG(OBSSource, OBSSource(source)));
25
 }
26
 
27
+void OBSBasic::SourceAudioActivated(void *data, calldata_t *params)
28
+{
29
+   obs_source_t *source = (obs_source_t *)calldata_ptr(params, "source");
30
+
31
+   if (obs_source_active(source))
32
+       QMetaObject::invokeMethod(static_cast<OBSBasic *>(data),
33
+                     "ActivateAudioSource",
34
+                     Q_ARG(OBSSource, OBSSource(source)));
35
+}
36
+
37
+void OBSBasic::SourceAudioDeactivated(void *data, calldata_t *params)
38
+{
39
+   obs_source_t *source = (obs_source_t *)calldata_ptr(params, "source");
40
+   QMetaObject::invokeMethod(static_cast<OBSBasic *>(data),
41
+                 "DeactivateAudioSource",
42
+                 Q_ARG(OBSSource, OBSSource(source)));
43
+}
44
+
45
 void OBSBasic::SourceRenamed(void *data, calldata_t *params)
46
 {
47
    obs_source_t *source = (obs_source_t *)calldata_ptr(params, "source");
48
obs-studio-24.0.0.tar.xz/UI/window-basic-main.hpp -> obs-studio-24.0.1.tar.xz/UI/window-basic-main.hpp Changed
10
 
1
@@ -570,6 +570,8 @@
2
    static void SourceRemoved(void *data, calldata_t *params);
3
    static void SourceActivated(void *data, calldata_t *params);
4
    static void SourceDeactivated(void *data, calldata_t *params);
5
+   static void SourceAudioActivated(void *data, calldata_t *params);
6
+   static void SourceAudioDeactivated(void *data, calldata_t *params);
7
    static void SourceRenamed(void *data, calldata_t *params);
8
    static void RenderMain(void *data, uint32_t cx, uint32_t cy);
9
 
10
obs-studio-24.0.0.tar.xz/UI/window-dock-browser.cpp -> obs-studio-24.0.1.tar.xz/UI/window-dock-browser.cpp Changed
10
 
1
@@ -14,7 +14,7 @@
2
        panel_version = obs_browser_qcef_version();
3
    }
4
 
5
-   if (panel_version >= 2) {
6
+   if (panel_version >= 2 && !!cefWidget) {
7
        cefWidget->closeBrowser();
8
    }
9
 }
10
obs-studio-24.0.0.tar.xz/libobs/obs-config.h -> obs-studio-24.0.1.tar.xz/libobs/obs-config.h Changed
10
 
1
@@ -41,7 +41,7 @@
2
  *
3
  * Reset to zero each major or minor version
4
  */
5
-#define LIBOBS_API_PATCH_VER 0
6
+#define LIBOBS_API_PATCH_VER 1
7
 
8
 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \
9
    ((major << 24) | (minor << 16) | patch)
10
obs-studio-24.0.0.tar.xz/libobs/obs-internal.h -> obs-studio-24.0.1.tar.xz/libobs/obs-internal.h Changed
29
 
1
@@ -563,6 +563,7 @@
2
    /* general exposed flags that can be set for the source */
3
    uint32_t flags;
4
    uint32_t default_flags;
5
+   uint32_t last_obs_ver;
6
 
7
    /* indicates ownership of the info.id buffer */
8
    bool owns_info_id;
9
@@ -602,6 +603,7 @@
10
    bool audio_failed;
11
    bool audio_pending;
12
    bool pending_stop;
13
+   bool audio_active;
14
    bool user_muted;
15
    bool muted;
16
    struct obs_source *next_audio_source;
17
@@ -736,6 +738,11 @@
18
 void audio_monitor_reset(struct audio_monitor *monitor);
19
 extern void audio_monitor_destroy(struct audio_monitor *monitor);
20
 
21
+extern obs_source_t *obs_source_create_set_last_ver(const char *id,
22
+                           const char *name,
23
+                           obs_data_t *settings,
24
+                           obs_data_t *hotkey_data,
25
+                           uint32_t last_obs_ver);
26
 extern void obs_source_destroy(struct obs_source *source);
27
 
28
 enum view_type {
29
obs-studio-24.0.0.tar.xz/libobs/obs-source.c -> obs-studio-24.0.1.tar.xz/libobs/obs-source.c Changed
102
 
1
@@ -72,6 +72,8 @@
2
    "void update_flags(ptr source, int flags)",
3
    "void audio_sync(ptr source, int out int offset)",
4
    "void audio_mixers(ptr source, in out int mixers)",
5
+   "void audio_activate(ptr source)",
6
+   "void audio_deactivate(ptr source)",
7
    "void filter_add(ptr source, ptr filter)",
8
    "void filter_remove(ptr source, ptr filter)",
9
    "void reorder_filters(ptr source)",
10
@@ -152,6 +154,7 @@
11
    source->volume = 1.0f;
12
    source->sync_offset = 0;
13
    source->balance = 0.5f;
14
+   source->audio_active = true;
15
    pthread_mutex_init_value(&source->filter_mutex);
16
    pthread_mutex_init_value(&source->async_mutex);
17
    pthread_mutex_init_value(&source->audio_mutex);
18
@@ -304,11 +307,10 @@
19
        obs_source_hotkey_push_to_talk, source);
20
 }
21
 
22
-static obs_source_t *obs_source_create_internal(const char *id,
23
-                       const char *name,
24
-                       obs_data_t *settings,
25
-                       obs_data_t *hotkey_data,
26
-                       bool private)
27
+static obs_source_t *
28
+obs_source_create_internal(const char *id, const char *name,
29
+              obs_data_t *settings, obs_data_t *hotkey_data,
30
+              bool private, uint32_t last_obs_ver)
31
 {
32
    struct obs_source *source = bzalloc(sizeof(struct obs_source));
33
 
34
@@ -333,6 +335,7 @@
35
    source->mute_unmute_key = OBS_INVALID_HOTKEY_PAIR_ID;
36
    source->push_to_mute_key = OBS_INVALID_HOTKEY_ID;
37
    source->push_to_talk_key = OBS_INVALID_HOTKEY_ID;
38
+   source->last_obs_ver = last_obs_ver;
39
 
40
    if (!obs_source_init_context(source, settings, name, hotkey_data,
41
                     private))
42
@@ -385,13 +388,23 @@
43
                obs_data_t *settings, obs_data_t *hotkey_data)
44
 {
45
    return obs_source_create_internal(id, name, settings, hotkey_data,
46
-                     false);
47
+                     false, LIBOBS_API_VER);
48
 }
49
 
50
 obs_source_t *obs_source_create_private(const char *id, const char *name,
51
                    obs_data_t *settings)
52
 {
53
-   return obs_source_create_internal(id, name, settings, NULL, true);
54
+   return obs_source_create_internal(id, name, settings, NULL, true,
55
+                     LIBOBS_API_VER);
56
+}
57
+
58
+obs_source_t *obs_source_create_set_last_ver(const char *id, const char *name,
59
+                        obs_data_t *settings,
60
+                        obs_data_t *hotkey_data,
61
+                        uint32_t last_obs_ver)
62
+{
63
+   return obs_source_create_internal(id, name, settings, hotkey_data,
64
+                     false, last_obs_ver);
65
 }
66
 
67
 static char *get_new_filter_name(obs_source_t *dst, const char *name)
68
@@ -4669,3 +4682,33 @@
69
               ? source->balance
70
               : 0.5f;
71
 }
72
+
73
+void obs_source_set_audio_active(obs_source_t *source, bool active)
74
+{
75
+   if (!obs_source_valid(source, "obs_source_set_audio_active"))
76
+       return;
77
+
78
+   if (os_atomic_set_bool(&source->audio_active, active) == active)
79
+       return;
80
+
81
+   if (active)
82
+       obs_source_dosignal(source, "source_audio_activate",
83
+                   "audio_activate");
84
+   else
85
+       obs_source_dosignal(source, "source_audio_deactivate",
86
+                   "audio_deactivate");
87
+}
88
+
89
+bool obs_source_audio_active(const obs_source_t *source)
90
+{
91
+   return obs_source_valid(source, "obs_source_audio_active")
92
+              ? os_atomic_load_bool(&source->audio_active)
93
+              : false;
94
+}
95
+
96
+uint32_t obs_source_get_last_obs_version(const obs_source_t *source)
97
+{
98
+   return obs_source_valid(source, "obs_source_get_last_obs_version")
99
+              ? source->last_obs_ver
100
+              : 0;
101
+}
102
obs-studio-24.0.0.tar.xz/libobs/obs.c -> obs-studio-24.0.1.tar.xz/libobs/obs.c Changed
26
 
1
@@ -703,6 +703,8 @@
2
    "void source_deactivate(ptr source)",
3
    "void source_show(ptr source)",
4
    "void source_hide(ptr source)",
5
+   "void source_audio_activate(ptr source)",
6
+   "void source_audio_deactivate(ptr source)",
7
    "void source_rename(ptr source, string new_name, string prev_name)",
8
    "void source_volume(ptr source, in out float volume)",
9
    "void source_volume_level(ptr source, float level, float magnitude, "
10
@@ -1773,11 +1775,13 @@
11
    int di_mode;
12
    int monitoring_type;
13
 
14
-   source = obs_source_create(id, name, settings, hotkeys);
15
+   prev_ver = (uint32_t)obs_data_get_int(source_data, "prev_ver");
16
+
17
+   source = obs_source_create_set_last_ver(id, name, settings, hotkeys,
18
+                       prev_ver);
19
 
20
    obs_data_release(hotkeys);
21
 
22
-   prev_ver = (uint32_t)obs_data_get_int(source_data, "prev_ver");
23
    caps = obs_source_get_output_flags(source);
24
 
25
    obs_data_set_default_double(source_data, "volume", 1.0);
26
obs-studio-24.0.0.tar.xz/libobs/obs.h -> obs-studio-24.0.1.tar.xz/libobs/obs.h Changed
13
 
1
@@ -1312,6 +1312,11 @@
2
 EXPORT void obs_source_set_async_decoupled(obs_source_t *source, bool decouple);
3
 EXPORT bool obs_source_async_decoupled(const obs_source_t *source);
4
 
5
+EXPORT void obs_source_set_audio_active(obs_source_t *source, bool show);
6
+EXPORT bool obs_source_audio_active(const obs_source_t *source);
7
+
8
+EXPORT uint32_t obs_source_get_last_obs_version(const obs_source_t *source);
9
+
10
 /* ------------------------------------------------------------------------- */
11
 /* Transition-specific functions */
12
 enum obs_transition_target {
13
obs-studio-24.0.0.tar.xz/plugins/obs-browser/browser-version.h -> obs-studio-24.0.1.tar.xz/plugins/obs-browser/browser-version.h Changed
10
 
1
@@ -2,7 +2,7 @@
2
 
3
 #define OBS_BROWSER_VERSION_MAJOR 2
4
 #define OBS_BROWSER_VERSION_MINOR 7
5
-#define OBS_BROWSER_VERSION_PATCH 8
6
+#define OBS_BROWSER_VERSION_PATCH 11
7
 
8
 #ifndef MAKE_SEMANTIC_VERSION
9
 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \
10
obs-studio-24.0.0.tar.xz/plugins/obs-browser/data/locale/en-US.ini -> obs-studio-24.0.1.tar.xz/plugins/obs-browser/data/locale/en-US.ini Changed
7
 
1
@@ -10,4 +10,4 @@
2
 RestartCEF="Restart CEF"
3
 BrowserSource="Browser"
4
 CustomFrameRate="Use custom frame rate"
5
-RerouteAudio="Reroute audio to OBS"
6
+RerouteAudio="Control audio via OBS"
7
obs-studio-24.0.0.tar.xz/plugins/obs-browser/obs-browser-plugin.cpp -> obs-studio-24.0.1.tar.xz/plugins/obs-browser/obs-browser-plugin.cpp Changed
30
 
1
@@ -123,7 +123,7 @@
2
    obs_data_set_default_bool(settings, "shutdown", false);
3
    obs_data_set_default_bool(settings, "restart_when_active", false);
4
    obs_data_set_default_string(settings, "css", default_css);
5
-   obs_data_set_default_bool(settings, "reroute_audio", true);
6
+   obs_data_set_default_bool(settings, "reroute_audio", false);
7
 }
8
 
9
 static bool is_local_file_modified(obs_properties_t *props, obs_property_t *,
10
@@ -188,6 +188,9 @@
11
    obs_property_set_enabled(fps_set, false);
12
 #endif
13
 
14
+   obs_properties_add_bool(props, "reroute_audio",
15
+               obs_module_text("RerouteAudio"));
16
+
17
    obs_properties_add_int(props, "fps", obs_module_text("FPS"), 1, 60, 1);
18
    obs_properties_add_text(props, "css", obs_module_text("CSS"),
19
                OBS_TEXT_MULTILINE);
20
@@ -202,9 +205,6 @@
21
            static_cast<BrowserSource *>(data)->Refresh();
22
            return false;
23
        });
24
-
25
-   obs_properties_add_bool(props, "reroute_audio",
26
-               obs_module_text("RerouteAudio"));
27
    return props;
28
 }
29
 
30
obs-studio-24.0.0.tar.xz/plugins/obs-browser/obs-browser-source.cpp -> obs-studio-24.0.1.tar.xz/plugins/obs-browser/obs-browser-source.cpp Changed
10
 
1
@@ -449,6 +449,8 @@
2
        restart = n_restart;
3
        css = n_css;
4
        url = n_url;
5
+
6
+       obs_source_set_audio_active(source, reroute_audio);
7
    }
8
 
9
    DestroyBrowser(true);
10
obs-studio-24.0.0.tar.xz/plugins/obs-browser/panel/browser-panel.cpp -> obs-studio-24.0.1.tar.xz/plugins/obs-browser/panel/browser-panel.cpp Changed
22
 
1
@@ -209,20 +209,7 @@
2
        }
3
 #endif
4
 
5
-#ifdef USE_QT_LOOP
6
        destroyBrowser(browser);
7
-#else
8
-       os_event_t *finishedEvent;
9
-       os_event_init(&finishedEvent, OS_EVENT_TYPE_AUTO);
10
-       bool success = QueueCEFTask([=]() {
11
-           destroyBrowser(browser);
12
-           os_event_signal(finishedEvent);
13
-       });
14
-       if (success) {
15
-           os_event_wait(finishedEvent);
16
-       }
17
-       os_event_destroy(finishedEvent);
18
-#endif
19
        cefBrowser = nullptr;
20
    }
21
 }
22
obs-studio-24.0.0.tar.xz/plugins/win-dshow/ffmpeg-decode.c -> obs-studio-24.0.1.tar.xz/plugins/win-dshow/ffmpeg-decode.c Changed
11
 
1
@@ -25,8 +25,7 @@
2
 
3
 #ifdef USE_NEW_HARDWARE_CODEC_METHOD
4
 enum AVHWDeviceType hw_priority[] = {
5
-   AV_HWDEVICE_TYPE_D3D11VA, AV_HWDEVICE_TYPE_DXVA2, AV_HWDEVICE_TYPE_QSV,
6
-   AV_HWDEVICE_TYPE_CUDA,    AV_HWDEVICE_TYPE_NONE,
7
+   AV_HWDEVICE_TYPE_NONE,
8
 };
9
 
10
 static bool has_hw_type(AVCodec *c, enum AVHWDeviceType type)
11
obs-studio-24.0.0.tar.xz/plugins/win-dshow/libdshowcapture/dshowcapture.hpp -> obs-studio-24.0.1.tar.xz/plugins/win-dshow/libdshowcapture/dshowcapture.hpp Changed
10
 
1
@@ -31,7 +31,7 @@
2
 
3
 #define DSHOWCAPTURE_VERSION_MAJOR 0
4
 #define DSHOWCAPTURE_VERSION_MINOR 6
5
-#define DSHOWCAPTURE_VERSION_PATCH 1
6
+#define DSHOWCAPTURE_VERSION_PATCH 2
7
 
8
 #define MAKE_DSHOWCAPTURE_VERSION(major, minor, patch) \
9
    ((major << 24) | (minor << 16) | (patch))
10
obs-studio-24.0.0.tar.xz/plugins/win-dshow/libdshowcapture/source/dshow-enum.cpp -> obs-studio-24.0.1.tar.xz/plugins/win-dshow/libdshowcapture/source/dshow-enum.cpp Changed
10
 
1
@@ -182,7 +182,7 @@
2
        return 0;
3
    else if (format >= VideoFormat::YVYU && format < VideoFormat::MJPEG)
4
        return 5;
5
-   else if (format >= VideoFormat::MJPEG)
6
+   else if (format == VideoFormat::MJPEG)
7
        return 10;
8
 
9
    return 15;
10