From 553372bf2ac61205fe25ff47cdc14cc98b660596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=9Aled=C5=BA?= Date: Mon, 15 Jul 2024 12:24:19 +0200 Subject: [PATCH] Send only the first frame in send_from_file example --- examples/send_from_file/lib/send_from_file/peer_handler.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/send_from_file/lib/send_from_file/peer_handler.ex b/examples/send_from_file/lib/send_from_file/peer_handler.ex index eeb37c2..bf8ddeb 100644 --- a/examples/send_from_file/lib/send_from_file/peer_handler.ex +++ b/examples/send_from_file/lib/send_from_file/peer_handler.ex @@ -108,7 +108,7 @@ defmodule SendFromFile.PeerHandler do @impl true def handle_info(:send_video, state) do # 30 =~ 1000 millisecond / 30 FPS - Process.send_after(self(), :send_video, 30) + # Process.send_after(self(), :send_video, 30) case IVF.Reader.next_frame(state.video_reader) do {:ok, frame} -> @@ -184,7 +184,7 @@ defmodule SendFromFile.PeerHandler do {:ok, state} :eof -> - send(self(), :send_audio) + # send(self(), :send_audio) Logger.info("Audio file finished. Looping...") {:ok, reader} = Ogg.Reader.open(@audio_file) {:ok, %{state | audio_reader: reader}}