|
|
|
@ -8,7 +8,6 @@ from aiortc import RTCDataChannel |
|
|
|
|
from aiortc.mediastreams import VIDEO_CLOCK_RATE, VIDEO_TIME_BASE |
|
|
|
|
import capnp |
|
|
|
|
import pyaudio |
|
|
|
|
import pytest |
|
|
|
|
from cereal import messaging, log |
|
|
|
|
|
|
|
|
|
from openpilot.system.webrtc.webrtcd import CerealOutgoingMessageProxy, CerealIncomingMessageProxy |
|
|
|
@ -68,13 +67,11 @@ class TestStreamSession: |
|
|
|
|
|
|
|
|
|
mocked_pubmaster.reset_mock() |
|
|
|
|
|
|
|
|
|
# FIXME, hangs for some reason |
|
|
|
|
@pytest.mark.skip("Hangs forever") |
|
|
|
|
def test_livestream_track(self, mocker): |
|
|
|
|
fake_msg = messaging.new_message("livestreamDriverEncodeData") |
|
|
|
|
|
|
|
|
|
config = {"receive.return_value": fake_msg.to_bytes()} |
|
|
|
|
mocker.patch("cereal.messaging.SubSocket", spec=True, **config) |
|
|
|
|
mocker.patch("msgq.SubSocket", spec=True, **config) |
|
|
|
|
track = LiveStreamVideoStreamTrack("driver") |
|
|
|
|
|
|
|
|
|
assert track.id.startswith("driver") |
|
|
|
|