Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-examples gst-examples
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-examplesgst-examples
  • Issues
  • #10

Closed
Open
Created Aug 14, 2020 by ChaSeop Im@soupim

[webrtc/multiparty-sendrecv] Is remove_peer_from_pipeline work?

Hi.

I'm developing streaming service using webrtcbin. It has one video source and many connections of webrtc clients. So, I used 'tee' and 'webrtcbin' like as example of webrtc/multiparty-sendrecv.

I runned mp-webrtc-sendrecv like as below.

./mp-webrtc-sendrecv --room-id=1
0:00:00.000553500  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.14.5
0:00:00.000705500  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:587:init_pre: Using library installed in /usr/lib/x86_64-linux-gnu
0:00:00.000851500  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:607:init_pre: Linux IMCS-LGGRAM15 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64
0:00:00.004398300  9284 0x55d3d7c97c00 INFO                GST_INIT gstmessage.c:127:_priv_gst_message_initialize: init messages
0:00:00.006901800  9284 0x55d3d7c97c00 INFO                GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.007535800  9284 0x55d3d7c97c00 INFO      GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.007953200  9284 0x55d3d7c97c00 INFO      GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.007991900  9284 0x55d3d7c97c00 INFO      GST_PLUGIN_LOADING gstplugin.c:227:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.008121800  9284 0x55d3d7c97c00 INFO            GST_REGISTRY gstregistry.c:1727:ensure_current_registry: reading registry cache: /home/imcs/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.023447600  9284 0x55d3d7c97c00 INFO            GST_REGISTRY gstregistrybinary.c:621:priv_gst_registry_binary_read_cache: loaded /home/imcs/.cache/gstreamer-1.0/registry.x86_64.bin in 0.015106 seconds
0:00:00.023668100  9284 0x55d3d7c97c00 INFO            GST_REGISTRY gstregistry.c:1583:scan_and_update_registry: Validating plugins from registry cache: /home/imcs/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.037751600  9284 0x55d3d7c97c00 INFO            GST_REGISTRY gstregistry.c:1685:scan_and_update_registry: Registry cache has not changed
0:00:00.037844300  9284 0x55d3d7c97c00 INFO            GST_REGISTRY gstregistry.c:1762:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.037908200  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:807:init_post: GLib runtime version: 2.56.4
0:00:00.037960500  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:809:init_post: GLib headers version: 2.56.4
0:00:00.038007200  9284 0x55d3d7c97c00 INFO                GST_INIT gst.c:810:init_post: initialized GStreamer successfully
Our local id is imcs-4837
Connecting to server...
> GET  HTTP/1.1
> Soup-Debug-Timestamp: 1597389720
> Soup-Debug: SoupSession 1 (0x55d3d7d25100), SoupMessage 1 (0x55d3d849c8b0), SoupSocket 1 (0x55d3d7de2a80)
> Host: webrtc.nirbheek.in:8443
> Upgrade: websocket
> Connection: Upgrade
> Sec-WebSocket-Key: 6uSlf5tbVM7TxesCnYkRxg==
> Sec-WebSocket-Version: 13
> Accept-Encoding: gzip, deflate

< HTTP/1.1 101 Switching Protocols
< Soup-Debug-Timestamp: 1597389720
< Soup-Debug: SoupMessage 1 (0x55d3d849c8b0)
< Upgrade: websocket
< Connection: Upgrade
< Sec-WebSocket-Accept: AV7R84ehKBAhtgND/BQny/nTnGM=
< Date: Fri, 14 Aug 2020 07:22:03 GMT
< Server: Python/3.6 websockets/8.0.2

on_server_connected
Connected to signalling server
Registering id imcs-4837 with server
Registered with server
join_room_on_server
Joining room 1
do_join_room
Room joined
start_pipeline
./mp-webrtc-sendrecv --room-id=1
Our local id is imcs-1980
Connecting to server...
> GET  HTTP/1.1
> Soup-Debug-Timestamp: 1597389817
> Soup-Debug: SoupSession 1 (0x5648baeef100), SoupMessage 1 (0x5648bb3880b0), SoupSocket 1 (0x5648baecaa80)
> Host: webrtc.nirbheek.in:8443
> Upgrade: websocket
> Connection: Upgrade
> Sec-WebSocket-Key: XSZGrSOLmavvT4NMXHItyA==
> Sec-WebSocket-Version: 13
> Accept-Encoding: gzip, deflate

< HTTP/1.1 101 Switching Protocols
< Soup-Debug-Timestamp: 1597389817
< Soup-Debug: SoupMessage 1 (0x5648bb3880b0)
< Upgrade: websocket
< Connection: Upgrade
< Sec-WebSocket-Accept: JJgsHIgoRTQ7goNgoSPKeTyo1NY=
< Date: Fri, 14 Aug 2020 07:23:40 GMT
< Server: Python/3.6 websockets/8.0.2

on_server_connected
Connected to signalling server
Registering id imcs-1980 with server
Registered with server
join_room_on_server
Joining room 1
do_join_room
Room joined
start_pipeline
Starting pipeline, not transmitting yet
Found 1 peers already in room
Negotiating with peer imcs-4837
send_room_peer_sdp
Sending sdp offer to imcs-4837
  1. I closed one.

I saw remove_peer_from_pipeline was called. However, it still had sockets(2 LISTEN and 2 CLOSE_WAIT).

netstat -anp | grep mp-
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.222.168:46337   0.0.0.0:*               LISTEN      9321/./mp-webrtc-se
tcp        0      0 192.168.222.168:40421   0.0.0.0:*               LISTEN      9321/./mp-webrtc-se
tcp        1      0 192.168.222.168:40421   192.168.222.168:60727   CLOSE_WAIT  9321/./mp-webrtc-se
tcp        0      0 192.168.222.168:60024   176.58.110.251:8443     ESTABLISHED 9321/./mp-webrtc-se
tcp6       0      0 fe80::215:5dff:fe:41509 :::*                    LISTEN      9321/./mp-webrtc-se
tcp6       0      0 fe80::215:5dff:fe:47219 :::*                    LISTEN      9321/./mp-webrtc-se
tcp6       1      0 fe80::215:5dff:fe:41509 fe80::215:5dff:fe:54571 CLOSE_WAIT  9321/./mp-webrtc-se
udp        0      0 192.168.222.168:56725   0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 239.255.255.250:1900    0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 192.168.222.168:1900    0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 239.255.255.250:1900    0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 127.0.0.1:1900          0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 192.168.222.168:34849   0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 127.0.0.1:37734         0.0.0.0:*                           9321/./mp-webrtc-se
udp        0      0 192.168.222.168:38379   0.0.0.0:*                           9321/./mp-webrtc-se

I think this is problem because it doesn't need connections any more. and when I repeat to run and close, it will has more sockets.

Do you have any advice on how could I do that?

Edited Aug 14, 2020 by ChaSeop Im
Assignee
Assign to
Time tracking