mirror of
https://github.com/facefusion/facefusion.git
synced 2026-11-12 05:19:57 +01:00
rename things in stream manager
This commit is contained in:
1 parent
e661adb520
commit
d4c70be766
2 files changed
+3
-3
No files matched your search
@@ -3,7 +3,7 @@ from starlette.responses import Response
|
||||
from starlette.status import HTTP_200_OK, HTTP_201_CREATED, HTTP_404_NOT_FOUND, HTTP_409_CONFLICT
|
||||
from starlette.websockets import WebSocket, WebSocketState
|
||||
|
||||
from facefusion import process_manager, rtc_manager
|
||||
from facefusion import rtc_manager
|
||||
from facefusion.apis import websocket_manager
|
||||
from facefusion.apis.stream_manager import destroy_stream, negotiate_video, process_image
|
||||
from facefusion.apis.websocket_helper import get_sec_websocket_protocol
|
||||
@@ -32,7 +32,6 @@ async def post_stream(request : Request) -> Response:
|
||||
}
|
||||
if not rtc_manager.has_peer():
|
||||
sdp_offer = await request.body()
|
||||
process_manager.start()
|
||||
sdp_answer = negotiate_video(sdp_offer.decode())
|
||||
|
||||
if sdp_answer:
|
||||
|
||||
@@ -123,6 +123,7 @@ def process_video(rtc_peer : RtcPeer) -> None:
|
||||
audio_queue : Queue[Tuple[Time, AudioFrame]] = Queue(maxsize = execution_thread_count * 10)
|
||||
video_executor = thread_helper.create_executor(execution_thread_count)
|
||||
|
||||
process_manager.start()
|
||||
video_receiver_thread = threading.Thread(
|
||||
target = copy_context().run,
|
||||
args = (receive_video_frames, rtc_peer.get('video'), video_queue, video_executor),
|
||||
@@ -156,8 +157,8 @@ def process_video(rtc_peer : RtcPeer) -> None:
|
||||
video_encoder_thread.join()
|
||||
video_executor.shutdown(wait = True)
|
||||
|
||||
process_manager.end()
|
||||
rtc_manager.delete_peer()
|
||||
process_manager.end()
|
||||
|
||||
|
||||
def destroy_stream() -> bool:
|
||||
|
||||
Reference in new issue
Block a user