Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] converting a TS while reading from /dev/ost/dvr0



Andreas Oberritter writes:
 > Hi,
 > 
 > I just tried the following using a function of mpegtools/transform.c
 > from today's cvs:
 > 
 > ---
 > dvr_fd = open("/dev/ost/dvr0", O_RDONLY);
 > ts_to_pes(dvr_fd, audio_pid, video_pid, 1);
 > ---
 > 
 > The result is a short piece of an MPEG PS. It stops after few seconds.
 > If I call ts_to_pes multiple times, i.e. in a while(1) loop, the result
 > is a broken MPEG PS. It seems like frames are missing then.
 > 
 > What do i need to change inside ts_to_pes to get a correct stream? I
 > wonder why ts_to_pes returns after a few seconds instead of continuing
 > transformation.
 > 

Because the input is unbuffered and doesn't use select to see if data
is available. As soon as one read fails it bails.
Use record_mpeg from dvb_formats.c in the tuxzap package. See rtuxzap
on how to set dvr_info_t structs. If you want it to run in a thread,
use c_dvr_thread_record.

Marcus


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index