mirror of
				https://github.com/flavioribeiro/donut.git
				synced 2025-10-31 18:42:44 +08:00 
			
		
		
		
	add option to run locally
This commit is contained in:
		
							
								
								
									
										6
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								Makefile
									
									
									
									
									
								
							| @@ -6,6 +6,12 @@ test: | ||||
| 	# docker compose stop test && docker compose down test && docker compose build test && docker compose run --rm test | ||||
| 	docker compose stop test && docker compose down test && docker compose run --rm test | ||||
|  | ||||
| run-srt: | ||||
| 	docker compose stop && docker compose down && docker compose build && docker compose up srt | ||||
|  | ||||
| mac-run-local: | ||||
| 	./scripts/mac_local_run.sh | ||||
|  | ||||
| mac-test-local: | ||||
| 	./scripts/mac_local_run_test.sh | ||||
|  | ||||
|   | ||||
| @@ -12,6 +12,10 @@ services: | ||||
|       - "8081:8081" | ||||
|       - "8081:8081/udp" | ||||
|       - "6060:6060" | ||||
|     depends_on: | ||||
|       - srt | ||||
|     links: | ||||
|       - srt | ||||
|  | ||||
|   test: | ||||
|     build: | ||||
| @@ -47,9 +51,9 @@ services: | ||||
|     ports: | ||||
|       - "40052:40052/udp" | ||||
|     depends_on: | ||||
|       - app | ||||
|       - origin | ||||
|     links: | ||||
|       - app | ||||
|       - origin | ||||
|  | ||||
|   origin: # simulating an mpeg-ts upd origin live transmission | ||||
|     image: jrottenberg/ffmpeg:4.4-alpine | ||||
| @@ -61,8 +65,4 @@ services: | ||||
|       - SRT_INPUT_HOST=srt | ||||
|       - SRT_INPUT_PORT=1234 | ||||
|       - PKT_SIZE=1316 | ||||
|     depends_on: | ||||
|       - srt | ||||
|     links: | ||||
|       - srt | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								scripts/mac_check_deps.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								scripts/mac_check_deps.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| #!/bin/bash | ||||
| if ! brew list srt &>/dev/null; then | ||||
|     echo "ERROR you must install srt" | ||||
|     echo "brew install srt" | ||||
|     exit 1 | ||||
| fi | ||||
|  | ||||
| if ! brew list ffmpeg &>/dev/null; then | ||||
|     echo "ERROR you must install ffmpeg" | ||||
|     echo "brew install ffmpeg" | ||||
|     exit 1 | ||||
| fi | ||||
							
								
								
									
										7
									
								
								scripts/mac_local_run.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								scripts/mac_local_run.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| #!/bin/bash | ||||
| source ./scripts/mac_check_deps.sh | ||||
|  | ||||
| export CGO_LDFLAGS="-L$(brew --prefix srt)/lib -lsrt"  | ||||
| export CGO_CFLAGS="-I$(brew --prefix srt)/include/" | ||||
|  | ||||
| go run main.go | ||||
| @@ -1,14 +1,5 @@ | ||||
| if ! brew list srt &>/dev/null; then | ||||
|     echo "ERROR you must install srt" | ||||
|     echo "brew install srt" | ||||
|     exit 1 | ||||
| fi | ||||
|  | ||||
| if ! brew list ffmpeg &>/dev/null; then | ||||
|     echo "ERROR you must install ffmpeg" | ||||
|     echo "brew install ffmpeg" | ||||
|     exit 1 | ||||
| fi | ||||
| #!/bin/bash | ||||
| source ./scripts/mac_check_deps.sh | ||||
|  | ||||
| export CGO_LDFLAGS="-L$(brew --prefix srt)/lib -lsrt"  | ||||
| export CGO_CFLAGS="-I$(brew --prefix srt)/include/" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Leandro Moreira
					Leandro Moreira