golanggohlsrtmpwebrtcmedia-serverobs-studiortcprtmp-proxyrtmp-serverrtprtsprtsp-proxyrtsp-relayrtsp-serversrtstreamingwebrtc-proxy
		
		
		
		
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							571 B
						
					
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							571 B
						
					
					
				#include <stdlib.h> | 
						|
#include <string.h> | 
						|
 | 
						|
#include "window.h" | 
						|
 | 
						|
bool window_load(const char *encoded, window_t *window) { | 
						|
    float vals[4]; | 
						|
    int i = 0; | 
						|
    char *token = strtok((char *)encoded, ","); | 
						|
    while (token != NULL) { | 
						|
        vals[i] = atof(token); | 
						|
        if (vals[i] < 0 || vals[i] > 1) { | 
						|
            return false; | 
						|
        } | 
						|
 | 
						|
        i++; | 
						|
        token = strtok(NULL, ","); | 
						|
    } | 
						|
 | 
						|
    if (i != 4) { | 
						|
        return false; | 
						|
    } | 
						|
 | 
						|
    window->x = vals[0]; | 
						|
    window->y = vals[1]; | 
						|
    window->width = vals[2]; | 
						|
    window->height = vals[3]; | 
						|
 | 
						|
    return true; | 
						|
}
 | 
						|
 |