Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public API #12

Closed
gavv opened this issue Dec 15, 2015 · 11 comments
Closed

Public API #12

gavv opened this issue Dec 15, 2015 · 11 comments
Labels
moved Transitioned to another issue or pull request

Comments

@gavv
Copy link
Member

gavv commented Dec 15, 2015

roc-streaming/roc-pulse#23 is a good start for gathering requirements for public API.

@gavv gavv added the c api Task affects public C API label Dec 15, 2015
@gavv gavv added this to the 0.1 milestone Dec 26, 2015
@gavv gavv changed the title Implement public API Implement and document public API Dec 26, 2015
@gavv gavv added the documentation Documentation label Dec 26, 2015
@gavv
Copy link
Member Author

gavv commented Dec 4, 2016

What we need so far in the API:

  • set log level and handler
  • create sender and receiver
  • create RTSP server that allows user to handle new sessions manually
  • send and listen SDP/SAP announcements
  • sender should be able to connect to both RTP address and RTSP url
  • simple blocking I/O for receiver
  • optional zero-copy I/O for them
  • optional idle mode handling
  • probably, optional non-blocking I/O
  • probably, ability to share single network loop for multiple objects
  • probably, ability to embed roc event loop into the user application
  • options to configure sender and receiver parameters, like payload type, FEC scheme, etc.

@baranovmv
Copy link
Member

baranovmv commented Dec 4, 2016

We should implement idle mode not later than (simultaneously with) SDP/SAP announcement publishing, otherwise roc sinks would send 2 Mb/s traffic to each discovered sink inputs. Just like pulseaudio does so far.

@gavv
Copy link
Member Author

gavv commented Dec 5, 2016

Issue for the idle mode: roc-streaming/roc-pulse#22

@gavv
Copy link
Member Author

gavv commented Dec 5, 2016

Technically, our public API will provide the following:

  • public headers: roc/sender.h, roc/receiver.h, roc/log.h
  • dynamic library: libroc.so

libroc will dynamically link all system libraries and statically link all roc modules (like libroc_core.a) and builtin third-party libraries (like libuv.a) enabled with --with-3rdparty option. It should be enough to link just with libroc.so for the user.

We also need to export library version in headers and in soname, and use properly naming when installing library (see #35).

@gavv
Copy link
Member Author

gavv commented Dec 11, 2016

We should implement idle mode not later than (simultaneously with) SDP/SAP announcement publishing, otherwise roc sinks would send 2 Mb/s traffic to each discovered sink inputs. Just like pulseaudio does so far.

This traffic should be prevented by module-suspend-on-idle. Tunnel sinks and sources should support this as well. Not sure why this didn't work, maybe the module was not loaded or timeout was too high. Need to recheck.

We still need to add suspend/resume support for both roc sink and sink input.

@gavv gavv modified the milestones: 0.2, 0.1 Mar 27, 2017
@gavv gavv mentioned this issue Mar 27, 2017
14 tasks
@gavv gavv mentioned this issue Jul 28, 2017
23 tasks
@gavv gavv changed the title Implement and document public API Extend public API Apr 23, 2019
@gavv gavv removed this from the 0.2 milestone May 30, 2019
@gavv gavv unassigned baranovmv and gavv May 30, 2019
@gavv gavv changed the title Extend public API Thoughts on public API Jun 1, 2019
@gavv
Copy link
Member Author

gavv commented Jun 1, 2019

set log level and handler
create sender and receiver

Done.

create RTSP server that allows user to handle new sessions manually
send and listen SDP/SAP announcements
sender should be able to connect to both RTP address and RTSP url

Will be addressed in separate issues.

simple blocking I/O for receiver
optional zero-copy I/O for them

Done.

optional idle mode handling

Will be addressed in a separate issue.

probably, optional non-blocking I/O

Postponed.

probably, ability to share single network loop for multiple objects

Done.

probably, ability to embed roc event loop into the user application

Postponed.

options to configure sender and receiver parameters, like payload type, FEC scheme, etc.

Done.

@gavv
Copy link
Member Author

gavv commented Jun 1, 2019

Most things were done in #80. IDLE handling will be addressed in roc-streaming/roc-pulse#20 and roc-streaming/roc-pulse#22. Session negotiation and control will be addressed in #34 and #204. Service discovery will be addressed later.

@gavv gavv closed this as completed Jun 1, 2019
@gavv gavv removed the documentation Documentation label Jun 1, 2019
@gavv gavv added the discussion Thoughts, discussions label Jun 1, 2019
@gavv gavv removed the c api Task affects public C API label Jun 28, 2020
@gavv gavv changed the title Thoughts on public API Public API Dec 14, 2020
@gavv gavv added moved Transitioned to another issue or pull request and removed discussion Thoughts, discussions labels Dec 14, 2020
@selurvedu
Copy link

Service discovery will be addressed later.

Hi @gavv, is this tracked anywhere? I found this issue to be the only one tham mentions service discovery.

@gavv
Copy link
Member Author

gavv commented Jun 20, 2024

@selurvedu Hi! What exactly are you looking for, support in C API? Or in pulseaudio/pipewire modules?

@gavv gavv added this to Roc Toolkit Jul 6, 2024
@gavv gavv moved this to Done in Roc Toolkit Jul 6, 2024
@selurvedu
Copy link

@gavv I'm looking for possible ways to implement something similar to:

https://docs.pipewire.org/page_module_raop_discover.html
https://docs.pipewire.org/page_module_zeroconf_discover.html
https://github.com/PipeWire/pipewire/blob/1.2/src/modules/module-snapcast-discover.c#L40 (no rendered docs page yet; available since PipeWire 1.2.0)

@gavv
Copy link
Member Author

gavv commented Dec 19, 2024

@selurvedu I see. We don't have this. It's actually on roadmap (see Discovery API). I was thinking about providing roc_publisher / roc_explorer API to abstract SAP/SDP and probably mDNS, but AFAIK it's not on anyone's to-do list for now.

You may find useful this tiny implementation of SAP listener: https://github.com/gavv/MiniSAPListener

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moved Transitioned to another issue or pull request
Projects
Status: Done
Development

No branches or pull requests

3 participants