Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-rtsp-server gst-rtsp-server
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 92
    • Issues 92
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • 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-rtsp-servergst-rtsp-server
  • Issues
  • #105

Closed
Open
Created May 01, 2020 by LL@braingate

Is there any good way to only allow single client for a media factory?

Use the test-record.c as example. Say I have a launch line "decodebin name=depay0 ! xvimagesink". If I have multiple clients push to the same mount path, it is fine. The pipeline will start 2 player windows.

However, if I have "rtph264depay name=depay0 ! h264parse ! mpegtsmux ! filesink location=/tmp/output.ts" which writes the output.ts file. If I have 2nd client push to the same mount path, then I end up a broken ts file. Because 2 pipeline writes to the same file.

One might suggest to dynamically change file path using media-configure signal. However, this is not what I want. I only want exactly single file per mount path. So I preferred if there is active session using that media factory, the new client need to get message about this mount path is not available.

In a very clumsy way, I can keep a dictionary about how many clients available for each mount path. Then I use client-connected signal to connect an options-request signal, where I can look for mount path from GstRTSPContext, then look for the dictionary to see if it is available. Then I send a message to client with gst_rtsp_client_send_message().

Is there more straightforward way put a restriction about how many clients can use certain mount path?

Assignee
Assign to
Time tracking