From 4d0dd22f526c40b0cd81cde3d8c0bd4269303297 Mon Sep 17 00:00:00 2001 From: Fabien Danieau Date: Sun, 28 Jan 2024 14:53:10 +0100 Subject: [PATCH] enhancement #36: tested with gRPC Bridge --- setup.cfg | 7 +++---- .../producer.py | 2 -- src/gst_signalling/gst_abstract_role.py | 6 +++--- src/gst_signalling/gst_signalling.py | 6 +++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/setup.cfg b/setup.cfg index f8d3da6..56fb12b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,10 +16,9 @@ include_package_data = True package_dir= =src install_requires = - aiortc - numpy - pyee - websockets + numpy==1.25.1 + pyee==11.0.1 + websockets==11.0.3 PyGObject==3.42.2 [options.packages.find] diff --git a/src/example/datachannel-single-producer-multiple-consumer/producer.py b/src/example/datachannel-single-producer-multiple-consumer/producer.py index 463c375..45c7aca 100644 --- a/src/example/datachannel-single-producer-multiple-consumer/producer.py +++ b/src/example/datachannel-single-producer-multiple-consumer/producer.py @@ -29,8 +29,6 @@ def main(args: argparse.Namespace) -> None: @producer.on("new_session") # type: ignore[misc] def on_new_session(session: GstSession) -> None: - print("heeere") - def on_open(channel: Gst.Element) -> None: asyncio.run_coroutine_threadsafe(send_pings(channel), loop) diff --git a/src/gst_signalling/gst_abstract_role.py b/src/gst_signalling/gst_abstract_role.py index ee68614..b9c5820 100644 --- a/src/gst_signalling/gst_abstract_role.py +++ b/src/gst_signalling/gst_abstract_role.py @@ -3,7 +3,7 @@ from typing import Any, Dict, NamedTuple, Optional import gi -import pyee +from pyee.asyncio import AsyncIOEventEmitter from .gst_signalling import GstSignalling @@ -21,13 +21,13 @@ ) -class GstSignallingAbstractRole(pyee.AsyncIOEventEmitter): +class GstSignallingAbstractRole(AsyncIOEventEmitter): def __init__( self, host: str, port: int, ) -> None: - pyee.AsyncIOEventEmitter.__init__(self) # type: ignore[no-untyped-call] + super().__init__() self.logger = logging.getLogger(__name__) diff --git a/src/gst_signalling/gst_signalling.py b/src/gst_signalling/gst_signalling.py index fcb05b6..d459021 100644 --- a/src/gst_signalling/gst_signalling.py +++ b/src/gst_signalling/gst_signalling.py @@ -3,11 +3,11 @@ import logging from typing import Any, Dict, List, Optional -import pyee +from pyee.asyncio import AsyncIOEventEmitter from websockets.legacy.client import WebSocketClientProtocol, connect -class GstSignalling(pyee.AsyncIOEventEmitter): +class GstSignalling(AsyncIOEventEmitter): """Signalling peer for the GStreamer WebRTC implementation. This class is used to communicate with a GStreamer WebRTC signalling server. @@ -48,7 +48,7 @@ def __init__(self, host: str, port: int) -> None: Args: host (str): Hostname of the signalling server. port (int): Port of the signalling server.""" - pyee.AsyncIOEventEmitter.__init__(self) # type: ignore[no-untyped-call] + AsyncIOEventEmitter.__init__(self) self.logger = logging.getLogger(__name__)