All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea <mariofutire@googlemail.com>
To: linux-dvb@linuxtv.org
Subject: [linux-dvb] [PATCH] preserve behavior of tzap (+ others)
Date: Sun, 27 Apr 2008 09:23:14 +0100	[thread overview]
Message-ID: <481437F2.6040006@googlemail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Hi,

After the recent implementation of DMX_SET_BUFFER_SIZE for the dvr, tzap has changed:
It used to resize the dvr's buffer to 1 MB, but the ioctl was ignored, so the buffer was always of 
the default size

#define DVR_BUFFER_SIZE (10*188*1024)

in dmxdev.h
I think the author of the code meant to *increase* the buffer (which, reading the documentation 
seems to be 8K: http://www.linuxtv.org/docs/dvbapi/DVB_Demux_Device.html).
The documentation does not apply to the dvr, but to the demux.

In thins patch:

1) 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.

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) in libdvbapi a new enum to support DMX_OUT_TSDEMUX_TAP

On top of that I would like to update the documentation of DMX_SET_BUFFER_SIZE, but I could not find 
the source.

Regards

Andrea


[-- Attachment #2: dvb-apps.diff --]
[-- Type: text/x-patch, Size: 2304 bytes --]

diff -r 3cde3460d120 lib/libdvbapi/dvbdemux.c
--- a/lib/libdvbapi/dvbdemux.c	Tue Mar 11 12:40:20 2008 +0100
+++ b/lib/libdvbapi/dvbdemux.c	Sat Mar 22 00:07:29 2008 +0000
@@ -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;
 	}
diff -r 3cde3460d120 lib/libdvbapi/dvbdemux.h
--- a/lib/libdvbapi/dvbdemux.h	Tue Mar 11 12:40:20 2008 +0100
+++ b/lib/libdvbapi/dvbdemux.h	Sat Mar 22 00:07:29 2008 +0000
@@ -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 adapt
 extern 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).
  *
diff -r 3cde3460d120 util/szap/tzap.c
--- a/util/szap/tzap.c	Tue Mar 11 12:40:20 2008 +0100
+++ b/util/szap/tzap.c	Sat Mar 22 00:07:29 2008 +0000
@@ -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);
 


[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

                 reply	other threads:[~2008-04-27  8:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=481437F2.6040006@googlemail.com \
    --to=mariofutire@googlemail.com \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.