Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Inserting a splitter (...) - PS stream from DVBStream
Markus Winkler wrote:
> >Currently, I am including a TS->PS converter in dvbstream, so this job
> >does not have to be
> >taken care of on the client side. I will post my results next week.
>
> Hey, really great, man !!!
Well, I wish it was. :)
* The changes I made:
------------------------------------------------------------
dvbstream.c (version 0.3)
In the main() method I excluded the while-loop reading from fd_dvr, and replaced
it with one method call:
ts_to_pes( fd_dvr, pids[0], pids[1], 1);
This method is present in the transform.c of the mpegtools package from LinuxTV.
In transform.c I had to make the ts_to_pes send RTP packages instead of writing
to stdout:
In ts_to_pes() I made this little change:
//init_ipack(&pa, IPACKS,write_out, ps);
//init_ipack(&pv, IPACKS,write_out, ps);
init_ipack(&pa, IPACKS,stream_out, ps);
init_ipack(&pv, IPACKS,stream_out, ps);
write_out was the name of the method that wrote the output to stdout. I added
this method:
void stream_out(uint8_t *buf, int count,void *p)
{
sendrtp2(socketOut, &sOut, &rtphdr, buf, count);
}
To make this changes work, I had to make socketOut, sOut, rtphdr global
variables of transform.h. Also, #include <transform.h> was included in
dvbstream.c and #include <rtp.h> was included in transform.c
Finally, I had to increase the buffer used by dumprtp. This buffer is allocated
in the method getrtp2 in rtp.c.
I made these changes to the method:
static char buf[2500];
(...)
lengthPacket=recv(fd,buf,2100,0);
------------------------------------------------------------
* Conclusion
This small change seemed to work rather well. However, when playing the stream
with MPlayer with this command
dumprtp | MPlayer -
The video tends to lag behind the audio, and eventually stop. Both video and
audio is of hi quality. I will give up this approach, and listen to Jens
Rosenboom's advice when it comes to streaming TS and not PS packets.
--
Håvard Rast Blok
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index