PipeTransport Clarification

Why we need to consume the producer on localPipeTransport? Can’t we do pipeTransport.produce() without it?

Also shouldn’t be we doing localPipeTransport.produce() instead of remotePipeTransport.produce()? Like for example incase of routers on different machines we will have only one pipe transport on one machine and for that we will be doing localPipeTransport.produce().

Can someone clarify on this? thanks.

1 Like

When you connect a WebRTC device to a mediasoup router, you create a WebRtcTransport in mediasoup and call webRtcTransport.consume() so it sends audio to your WebRTC device, right? So this is the same.

Ok so it means the local pipe transport first consumes the producer and then remote pipe transport takes that consumer and produce it on it’s end. Here we have 2 different pipe transports. Why are 2 transports needed? Why not 2 routers connect to each other on one transport?

To pipe producer from router 1 to router 2 we are consuming on local pipe transport and producing on remote pipe transport so piping takes cpu consumption of 1 consumer + 1 producer is this right?

For routers on different machines router 1 will bear the cpu consumption of 1 consumer while router 2 will bear the cpu consumption of 1 producer, is this right?

This doesn’t make any sense. You create a PipeTransport 1 in router 1 and PipeTranpsort 2 in router 2 and connect them, so you create a single network transport.

Again: when you use nediasoup-client you create a Transport in mediasoup-client and a WebRtcTransport in mediasouo server, right? And it doesn’t mean that there are 2 transports. Please don’t mix a transport representation (that MUST exist in both endpoints) and a network transport (that connects both endpoints).

1 Like

I see, thanks, all clear now.

Can you please guide about this one?

Yes, it’s as you said and it cannot be any other way.

Thanks brother