mirror of
				https://github.com/kunkundi/crossdesk.git
				synced 2025-10-26 20:25:34 +08:00 
			
		
		
		
	Remove dependent for vcpkg::sdl2
This commit is contained in:
		| @@ -13,7 +13,6 @@ add_requires("sdl2", {system = false}) | ||||
| if is_os("windows") then | ||||
|     add_ldflags("/SUBSYSTEM:CONSOLE") | ||||
|     add_links("Shell32", "windowsapp", "dwmapi", "User32", "kernel32") | ||||
|     add_requires("vcpkg::sdl2 2.26.4") | ||||
|     add_requires("vcpkg::ffmpeg 5.1.2", {configs = {shared = false}}) | ||||
| elseif is_os("linux") then | ||||
|     add_requires("ffmpeg 5.1.2", {system = false}) | ||||
| @@ -21,7 +20,6 @@ elseif is_os("linux") then | ||||
|     add_syslinks("pthread", "dl") | ||||
| elseif is_os("macosx") then | ||||
|     add_requires("ffmpeg 5.1.2", {system = false}) | ||||
|     -- add_requires("vcpkg::sdl2 2.28.3", {system = false}) | ||||
| end | ||||
|  | ||||
| add_packages("spdlog") | ||||
| @@ -42,7 +40,7 @@ target("screen_capture") | ||||
|  | ||||
| target("remote_desk_server") | ||||
|     set_kind("binary") | ||||
|     add_packages("log", "vcpkg::ffmpeg", "vcpkg::sdl2") | ||||
|     add_packages("log", "vcpkg::ffmpeg", "sdl2") | ||||
|     add_deps("projectx", "screen_capture") | ||||
|     add_files("remote_desk_server/*.cpp") | ||||
|     add_includedirs("../../src/interface") | ||||
| @@ -59,7 +57,7 @@ target("remote_desk_client") | ||||
|     add_deps("projectx") | ||||
|     add_packages("log") | ||||
|     if is_os("windows") then | ||||
|         add_packages("vcpkg::sdl2") | ||||
|         add_packages("sdl2") | ||||
|     elseif is_os("macosx") or is_os("linux")then | ||||
|         add_packages("sdl2") | ||||
|         add_packages("ffmpeg") | ||||
|   | ||||
| @@ -22,7 +22,25 @@ int IceAgent::CreateIceAgent(juice_cb_state_changed_t on_state_changed, | ||||
|                              juice_cb_candidate_t on_candidate, | ||||
|                              juice_cb_gathering_done_t on_gathering_done, | ||||
|                              juice_cb_recv_t on_recv, void *user_ptr) { | ||||
|   // juice_set_log_level(JUICE_LOG_LEVEL_DEBUG); | ||||
|   juice_set_log_level(JUICE_LOG_LEVEL_DEBUG); | ||||
|  | ||||
|   juice_set_log_handler([](juice_log_level_t level, const char *message) { | ||||
|     if (JUICE_LOG_LEVEL_VERBOSE == level) { | ||||
|       LOG_INFO("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_DEBUG == level) { | ||||
|       LOG_INFO("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_INFO == level) { | ||||
|       LOG_INFO("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_WARN == level) { | ||||
|       LOG_WARN("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_ERROR == level) { | ||||
|       LOG_ERROR("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_FATAL == level) { | ||||
|       LOG_FATAL("{}", message); | ||||
|     } else if (JUICE_LOG_LEVEL_NONE == level) { | ||||
|       LOG_INFO("{}", message); | ||||
|     } | ||||
|   }); | ||||
|  | ||||
|   juice_config_t config; | ||||
|   memset(&config, 0, sizeof(config)); | ||||
| @@ -49,6 +67,9 @@ int IceAgent::CreateIceAgent(juice_cb_state_changed_t on_state_changed, | ||||
|   config.cb_recv = on_recv; | ||||
|   config.user_ptr = user_ptr; | ||||
|  | ||||
|   // config.local_port_range_begin = 40000; | ||||
|   // config.local_port_range_end = 50000; | ||||
|  | ||||
|   agent_ = juice_create(&config); | ||||
|  | ||||
|   return 0; | ||||
|   | ||||
| @@ -133,7 +133,7 @@ int IceTransmission::InitIceTransmission(std::string &stun_ip, int stun_port, | ||||
|         } | ||||
|       }, | ||||
|       [](juice_agent_t *agent, const char *sdp, void *user_ptr) { | ||||
|         // LOG_INFO("candadite: {}", sdp); | ||||
|         LOG_INFO("candadite: {}", sdp); | ||||
|         // trickle | ||||
|         // static_cast<IceTransmission | ||||
|         // *>(user_ptr)->SendOfferLocalCandidate(sdp); | ||||
|   | ||||
							
								
								
									
										1
									
								
								thirdparty/libjuice/src/agent.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								thirdparty/libjuice/src/agent.h
									
									
									
									
										vendored
									
									
								
							| @@ -24,6 +24,7 @@ | ||||
| // RFC 8445: Agents MUST NOT use an RTO value smaller than 500 ms. | ||||
| #define MIN_STUN_RETRANSMISSION_TIMEOUT 500 // msecs | ||||
| #define MAX_STUN_RETRANSMISSION_COUNT 5     // count (exponential backoff, will give ~30s) | ||||
| // #define MAX_STUN_RETRANSMISSION_COUNT 2     // count (exponential backoff, will give ~30s) | ||||
|  | ||||
| // RFC 8445: ICE agents SHOULD use a default Ta value, 50 ms, but MAY use | ||||
| // another value based on the characteristics of the associated data. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user