3/3: a few fixes in dvb-apps.
PATCH 1/1 3/3: a few fixes in dvb-apps.
I've collected in this patch a few small fixes for dvb-apps
1) in libdvbapi a new enum to support DMX_OUT_TSDEMUX_TAP
2) in libdvbapi a change in a comment where it is stated that the dvr can be opened more that once in readonly. It can only be opened once.
3) tzap: removed the ioctl call to DMX_SET_BUFFER_SIZE on the dvr. This calls shrinks the size of the buffer, from about 2MB (#define DVR_BUFFER_SIZE (10*188*1024) in dmxdev.h) to 1MB. It only matters once the PATCH 2/3 enables DMX_SET_BUFFER_SIZE on the dvr.
I think the writer of the code wanted a bigger buffer, so it is pointless to reduce it.
Let me know if I should post 3 separate patches.
I plan to send an other patch to change gnutv to be more robust with slow writes and to support DMX_SET_BUFFER_SIZE.
Andrea
lib/libdvbapi/dvbdemux.c +8 -0
@@ -128,6 +128,10 @@ int dvbdemux_set_pes_filter(int fd, int filter.output =DMX_OUT_TS_TAP ;break ; +case DVBDEMUX_OUTPUT_TS_DEMUX : + filter.output =DMX_OUT_TSDEMUX_TAP ; +break ; +default :return -EINVAL ; }
@@ -201,6 +205,10 @@ int dvbdemux_set_pid_filter(int fd, int filter.output =DMX_OUT_TS_TAP ;break ; +case DVBDEMUX_OUTPUT_TS_DEMUX : + filter.output =DMX_OUT_TSDEMUX_TAP ; +break ; +default :return -EINVAL ; }
lib/libdvbapi/dvbdemux.h +4 -2
@@ -55,6 +55,7 @@ extern "C"#define DVBDEMUX_OUTPUT_DECODER 0#define DVBDEMUX_OUTPUT_DEMUX 1#define DVBDEMUX_OUTPUT_DVR 2 +#define DVBDEMUX_OUTPUT_TS_DEMUX 3/** * PES types.
@@ -65,6 +66,7 @@ extern "C"#define DVBDEMUX_PESTYPE_SUBTITLE 3#define DVBDEMUX_PESTYPE_PCR 4 +/** * Open a demux device. Can be called multiple times. These let you setup a * single filter per FD. It can can also be read() from if you use a section
@@ -78,8 +80,8 @@ extern int dvbdemux_open_demux(int adaptextern int dvbdemux_open_demux (int adapter,int demuxdevice,int nonblocking);/** -* Open a DVR device. May be opened for writing once, or multiple times in readonly -* mode. It is used to either write() transport stream data to be demuxed +* Open a DVR device. May be opened for writing or reading once. +* It is used to either write() transport stream data to be demuxed * (if input == DVBDEMUX_INPUT_DVR), or to read() a stream of demuxed data * (if output == DVBDEMUX_OUTPUT_DVR). *
util/szap/tzap.c +0 -5
@@ -676,11 +676,6 @@ int main(int argc, char **argv)PERROR ("failed opening '%s'" ,DVR_DEV );return -1 ; } -if (ioctl (dvr_fd,DMX_SET_BUFFER_SIZE ,1024 *1024 )<0 ) - { -PERROR ("DMX_SET_BUFFER_SIZE failed" ); -return -1 ; - }if (silent<2 )print_frontend_stats (frontend_fd, human_readable);
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
PATCH 1/1 a few fixes in dvb-apps.
Since the other patches about DMX_SET_BUFFER_SIZE have been accepted, I think this one is ready as well.
I attach again the diff file for review.
Point 1 and 2 are more cosmetic, 3 is a change in behavior.
Quoted 4 lines · Andrea
I've collected in this patch a few small fixes for dvb-apps
1) in libdvbapi a new enum to support
DMX_OUT_TSDEMUX_TAP
Quoted 8 lines
2) in libdvbapi a change in a comment where it is stated that the dvr can be opened more that once in readonly. It can only be opened once.
3) tzap: removed the ioctl call to
DMX_SET_BUFFER_SIZEon the dvr. This calls shrinks the size of the buffer, from about 2MB (#defineDVR_BUFFER_SIZE(10*188*1024) indmxdev.h) to 1MB. I think the writer of the code wanted a bigger buffer, so it is pointless to reduce it.Let me know if I should post 3 separate patches.
I plan to send an other patch to change gnutv to be more robust with slow writes and to support
DMX_SET_BUFFER_SIZE.
lib/libdvbapi/dvbdemux.c +8 -0
@@ -128,6 +128,10 @@ int dvbdemux_set_pes_filter(int fd, int filter.output =DMX_OUT_TS_TAP ;break ; +case DVBDEMUX_OUTPUT_TS_DEMUX : + filter.output =DMX_OUT_TSDEMUX_TAP ; +break ; +default :return -EINVAL ; }
@@ -201,6 +205,10 @@ int dvbdemux_set_pid_filter(int fd, int filter.output =DMX_OUT_TS_TAP ;break ; +case DVBDEMUX_OUTPUT_TS_DEMUX : + filter.output =DMX_OUT_TSDEMUX_TAP ; +break ; +default :return -EINVAL ; }
lib/libdvbapi/dvbdemux.h +4 -2
@@ -55,6 +55,7 @@ extern "C"#define DVBDEMUX_OUTPUT_DECODER 0#define DVBDEMUX_OUTPUT_DEMUX 1#define DVBDEMUX_OUTPUT_DVR 2 +#define DVBDEMUX_OUTPUT_TS_DEMUX 3/** * PES types.
@@ -65,6 +66,7 @@ extern "C"#define DVBDEMUX_PESTYPE_SUBTITLE 3#define DVBDEMUX_PESTYPE_PCR 4 +/** * Open a demux device. Can be called multiple times. These let you setup a * single filter per FD. It can can also be read() from if you use a section
@@ -78,8 +80,8 @@ extern int dvbdemux_open_demux(int adaptextern int dvbdemux_open_demux (int adapter,int demuxdevice,int nonblocking);/** -* Open a DVR device. May be opened for writing once, or multiple times in readonly -* mode. It is used to either write() transport stream data to be demuxed +* Open a DVR device. May be opened for writing or reading once. +* It is used to either write() transport stream data to be demuxed * (if input == DVBDEMUX_INPUT_DVR), or to read() a stream of demuxed data * (if output == DVBDEMUX_OUTPUT_DVR). *
util/szap/tzap.c +0 -5
@@ -676,11 +676,6 @@ int main(int argc, char **argv)PERROR ("failed opening '%s'" ,DVR_DEV );return -1 ; } -if (ioctl (dvr_fd,DMX_SET_BUFFER_SIZE ,1024 *1024 )<0 ) - { -PERROR ("DMX_SET_BUFFER_SIZE failed" ); -return -1 ; - }if (silent<2 )print_frontend_stats (frontend_fd, human_readable);
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb