roc-streaming / roc-droid

Roc for Android!
https://roc-streaming.org
Mozilla Public License 2.0
92 stars 23 forks source link

LDPC FEC is not supported? #82

Open misuzu opened 7 months ago

misuzu commented 7 months ago

I have the following pipewire config which works with another pipewire instance, but doesn't work with roc-droid (I only hear awful noises):

{
  "context.modules": [
    {
      "args": {
        "fec.code": "ldpc",
        "remote.ip": "192.168.0.110",
        "sink.name": "ROC sink droid",
        "sink.props": {
          "node.description": "ROC sink droid",
          "node.name": "roc-sink-droid"
        }
      },
      "name": "libpipewire-module-roc-sink"
    }
  ]
}

When I remove "fec.code": "ldpc", line, it starts to work.

gavv commented 5 months ago

AFAIK currently roc-droid hard-codes reed-solomon (RS8M). LDPC can be enabled via roc-java, but roc-droid doesn't provide UI for that.

Reed-solomon is a good default since it fits better for most use cases, however having a UI option would be nice I think.

ortex commented 5 months ago

here https://github.com/roc-streaming/roc-droid/blob/main/app/src/main/java/org/rocstreaming/rocdroid/SenderReceiverService.kt#L243-L252 protocol is hardcoded

for LDPC need to use other protocols https://javadoc.io/doc/org.roc-streaming.roctoolkit/roc-android/latest/index.html

LDPC-Staircase FEC encoding (RFC 6816). Good for large block sizes (above 1024 packets). Compatible with RTP_LDPC_SOURCE and LDPC_REPAIR protocols for source and repair endpoints.