I'm trying to build a custom filter that will push Transport Stream segments to GPAC. My filter will connect to an `m2tsdmx` for demuxing the data and continuing the processing.

My filter creates a PID with the same properties as the [TS muxer](https://github.com/gpac/gpac/blob/master/src/filters/mux_ts.c#L1144) and the filter capabilities are set similarly: 

```c
CAP_UINT(GF_CAPS_OUTPUT_STATIC,  GF_PROP_PID_STREAM_TYPE, GF_STREAM_FILE),
CAP_STRING(GF_CAPS_OUTPUT_STATIC, GF_PROP_PID_FILE_EXT, M2TS_FILE_EXTS),
CAP_STRING(GF_CAPS_OUTPUT_STATIC, GF_PROP_PID_MIME, M2TS_MIMES),
```

## The problem

After building an instance of my filter (`tssource`) and one of `m2tsdmx` and connecting them together using `gf_filter_set_source` (which return OK error code), the filters still are not connected.

### Questions

* Is there a way to diagnose why the `gf_filter_set_source` failed at creating the links between two filters? Currently, `gf_filter_set_source` returns OK, so I'm not sure where else to look for information.
* What should be the Filter caps, and PID properties needed to be able to feed an instance of `m2tsdmx`?

Debug information:

```
Session debug info (UTC 1696887822289)


Filter stats - 0 filters
Session stats - threads 1
        Thread 1: run_time 0 us active_time 0 us nb_tasks 0

Total: run_time 0 us active_time 0 us nb_tasks 0
Main thread tasks:
Filters status:

[ts_source] initialize
[ts_source] creating output pid
IS SOURCE: false
IS SINK: false
Session debug info (UTC 1696887822289)

Filters connected:
tssource (idx=1)
Filters not connected:
m2tsdmx (idx=2)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 1 output pids 0 tasks 0 us process time

                * output PID ts_source: 0 packets sent
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 0 us nb_tasks 0

Total: run_time 1696887822289707 us active_time 0 us nb_tasks 0
Main thread tasks:
T1 "pid_init" filter "tssource" (tssource) output PID ts_source force_main
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing tasks:
 T1 "pid_init" notified filter "tssource" (tssource) output PID ts_source force_main
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

[ts_source] finalize
Session debug info (UTC 1696887822290)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 1 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1170 us nb_tasks 1

Total: run_time 1696887822289707 us active_time 1170 us nb_tasks 1
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

Session debug info (UTC 1696887822291)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 2 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1172 us nb_tasks 2

Total: run_time 1696887822289707 us active_time 1172 us nb_tasks 2
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

Session debug info (UTC 1696887822291)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 2 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1172 us nb_tasks 2

Total: run_time 1696887822289707 us active_time 1172 us nb_tasks 2
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks
```
Detect PID connection erros using C-API
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Detect PID connection erros using C-API
Issue date:

--- start body ---
I'm trying to build a custom filter that will push Transport Stream segments to GPAC. My filter will connect to an `m2tsdmx` for demuxing the data and continuing the processing.

My filter creates a PID with the same properties as the [TS muxer](https://github.com/gpac/gpac/blob/master/src/filters/mux_ts.c#L1144) and the filter capabilities are set similarly: 

```c
CAP_UINT(GF_CAPS_OUTPUT_STATIC,  GF_PROP_PID_STREAM_TYPE, GF_STREAM_FILE),
CAP_STRING(GF_CAPS_OUTPUT_STATIC, GF_PROP_PID_FILE_EXT, M2TS_FILE_EXTS),
CAP_STRING(GF_CAPS_OUTPUT_STATIC, GF_PROP_PID_MIME, M2TS_MIMES),
```

## The problem

After building an instance of my filter (`tssource`) and one of `m2tsdmx` and connecting them together using `gf_filter_set_source` (which return OK error code), the filters still are not connected.

### Questions

* Is there a way to diagnose why the `gf_filter_set_source` failed at creating the links between two filters? Currently, `gf_filter_set_source` returns OK, so I'm not sure where else to look for information.
* What should be the Filter caps, and PID properties needed to be able to feed an instance of `m2tsdmx`?

Debug information:

```
Session debug info (UTC 1696887822289)


Filter stats - 0 filters
Session stats - threads 1
        Thread 1: run_time 0 us active_time 0 us nb_tasks 0

Total: run_time 0 us active_time 0 us nb_tasks 0
Main thread tasks:
Filters status:

[ts_source] initialize
[ts_source] creating output pid
IS SOURCE: false
IS SINK: false
Session debug info (UTC 1696887822289)

Filters connected:
tssource (idx=1)
Filters not connected:
m2tsdmx (idx=2)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 1 output pids 0 tasks 0 us process time

                * output PID ts_source: 0 packets sent
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 0 us nb_tasks 0

Total: run_time 1696887822289707 us active_time 0 us nb_tasks 0
Main thread tasks:
T1 "pid_init" filter "tssource" (tssource) output PID ts_source force_main
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing tasks:
 T1 "pid_init" notified filter "tssource" (tssource) output PID ts_source force_main
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

[ts_source] finalize
Session debug info (UTC 1696887822290)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 1 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1170 us nb_tasks 1

Total: run_time 1696887822289707 us active_time 1170 us nb_tasks 1
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

Session debug info (UTC 1696887822291)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 2 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1172 us nb_tasks 2

Total: run_time 1696887822289707 us active_time 1172 us nb_tasks 2
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks

Session debug info (UTC 1696887822291)

Filters not connected:
m2tsdmx (idx=2)
Filters in unknown connection state:
tssource (idx=1)

Filter stats - 2 filters
        Filter tssource ID _0x5580bc598660_ : 0 input pids 0 output pids 2 tasks 1170 us process time
        Filter m2tsdmx : 0 input pids 0 output pids 0 tasks 0 us process time
Session stats - threads 1
        Thread 1: run_time 1696887822289707 us active_time 1172 us nb_tasks 2

Total: run_time 1696887822289707 us active_time 1172 us nb_tasks 2
Main thread tasks:
Filters status:
F1 "tssource" (tssource) ID _0x5580bc598660_ - 0 PIDs playing - finalized
F2 "m2tsdmx" (m2tsdmx) - 0 PIDs playing no tasks
```
--- end body ---
