Browse Source

obs-ffmpeg: Enable macOS hardware decoding for media source

Reverts  c7395b05ece4b9e204aa90984c8e29bd3eb739d9
Eric Lindvall 5 years ago
parent
commit
3c76fc4ddb

+ 2 - 1
deps/media-playback/media-playback/decode.c

@@ -25,7 +25,8 @@
 enum AVHWDeviceType hw_priority[] = {
 	AV_HWDEVICE_TYPE_D3D11VA, AV_HWDEVICE_TYPE_DXVA2,
 	AV_HWDEVICE_TYPE_VAAPI,   AV_HWDEVICE_TYPE_VDPAU,
-	AV_HWDEVICE_TYPE_QSV,     AV_HWDEVICE_TYPE_NONE,
+	AV_HWDEVICE_TYPE_QSV,     AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
+	AV_HWDEVICE_TYPE_NONE,
 };
 
 static bool has_hw_type(AVCodec *c, enum AVHWDeviceType type,

+ 0 - 4
plugins/obs-ffmpeg/obs-ffmpeg-source.c

@@ -186,10 +186,8 @@ static obs_properties_t *ffmpeg_source_getproperties(void *data)
 		obs_module_text("ReconnectDelayTime"), 1, 60, 1);
 	obs_property_int_set_suffix(prop, " S");
 
-#ifndef __APPLE__
 	obs_properties_add_bool(props, "hw_decode",
 				obs_module_text("HardwareDecode"));
-#endif
 
 	obs_properties_add_bool(props, "clear_on_media_end",
 				obs_module_text("ClearOnMediaEnd"));
@@ -420,9 +418,7 @@ static void ffmpeg_source_update(void *data, obs_data_t *settings)
 
 	s->input = input ? bstrdup(input) : NULL;
 	s->input_format = input_format ? bstrdup(input_format) : NULL;
-#ifndef __APPLE__
 	s->is_hw_decoding = obs_data_get_bool(settings, "hw_decode");
-#endif
 	s->is_clear_on_media_end =
 		obs_data_get_bool(settings, "clear_on_media_end");
 	s->restart_on_activate =

+ 0 - 2
plugins/obs-transitions/transition-stinger.c

@@ -550,10 +550,8 @@ static obs_properties_t *stinger_properties(void *data)
 	obs_property_t *p = obs_properties_add_list(
 		ppts, "tp_type", obs_module_text("TransitionPointType"),
 		OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
-#ifndef __APPLE__
 	obs_properties_add_bool(ppts, "hw_decode",
 				obs_module_text("HardwareDecode"));
-#endif
 	obs_property_list_add_int(p, obs_module_text("TransitionPointTypeTime"),
 				  TIMING_TIME);
 	obs_property_list_add_int(