Skip to content

Commit

Permalink
enhancement #36: tested with gRPC Bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienDanieau committed Jan 28, 2024
1 parent 4d0ec68 commit 4d0dd22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
7 changes: 3 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions src/gst_signalling/gst_abstract_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions src/gst_signalling/gst_signalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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__)

Expand Down

0 comments on commit 4d0dd22

Please sign in to comment.