[dvblast-devel] dvb-s2 multistream
Georgi Chorbadzhiyski
gf at unixsol.org
Fri Nov 11 20:59:39 CET 2011
On 11/11/11 7:58 PM, Вячеслав Адаманов wrote:
> Are there any plans support multistream transponders?!
Well aren't you a very impatient guy :) The patch for mis support
is only two weeks old and have not found it's way into Linux yet
(I'm looking at 3.2-rc1-git from today). I'm talking about the
patch(es) at: http://www.tbsdtv.com/forum/viewtopic.php?f=26&t=1874
Any way, attached is a test patch for dvblast that implements
multisteam support. It is only compile tested.
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
-------------- next part --------------
From 39d2a66a9cc800d843e91c04aba8fb7e19b9d5d4 Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf at unixsol.org>
Date: Fri, 11 Nov 2011 21:55:40 +0200
Subject: [PATCH] Add test support for DVB-S2 multistream.
---
dvb.c | 12 ++++++++++--
dvblast.c | 13 ++++++++++---
dvblast.h | 11 +++++++++++
3 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/dvb.c b/dvb.c
index 557b7d3..f603030 100644
--- a/dvb.c
+++ b/dvb.c
@@ -781,6 +781,9 @@ static struct dtv_property dvbs2_cmdargs[] = {
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBS2 },
{ .cmd = DTV_PILOT, .u.data = PILOT_AUTO },
{ .cmd = DTV_ROLLOFF, .u.data = ROLLOFF_AUTO },
+#if DVBS2_MIS_IS_SUPPORTED
+ { .cmd = DTV_DVBS2_MIS_ID, .u.data = 0 },
+#endif
{ .cmd = DTV_TUNE },
};
static struct dtv_properties dvbs2_cmdseq = {
@@ -842,6 +845,7 @@ static struct dtv_properties atsc_cmdseq = {
#define PILOT 6
#define TRANSMISSION 7
#define ROLLOFF 7
+#define MIS 8
#define HIERARCHY 8
struct dtv_property pclear[] = {
@@ -916,6 +920,9 @@ static void FrontendSet( bool b_init )
p->props[MODULATION].u.data = GetModulation();
p->props[PILOT].u.data = GetPilot();
p->props[ROLLOFF].u.data = GetRollOff();
+#if DVBS2_MIS_IS_SUPPORTED
+ p->props[MIS].u.data = i_mis;
+#endif
}
else
p = &dvbs_cmdseq;
@@ -925,9 +932,10 @@ static void FrontendSet( bool b_init )
p->props[FEC_INNER].u.data = GetFECInner(info.caps);
p->props[FREQUENCY].u.data = FrontendDoDiseqc();
- msg_Dbg( NULL, "tuning QPSK frontend to f=%d srate=%d inversion=%d fec=%d rolloff=%d modulation=%s pilot=%d",
+ msg_Dbg( NULL, "tuning QPSK frontend to f=%d srate=%d inversion=%d fec=%d rolloff=%d modulation=%s pilot=%d mis=%d",
i_frequency, i_srate, i_inversion, i_fec, i_rolloff,
- psz_modulation == NULL ? "legacy" : psz_modulation, i_pilot );
+ psz_modulation == NULL ? "legacy" : psz_modulation, i_pilot,
+ i_mis );
break;
case FE_ATSC:
diff --git a/dvblast.c b/dvblast.c
index 93a2dea..2e38135 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -73,6 +73,7 @@ int b_tone = 0;
int i_bandwidth = 8;
char *psz_modulation = NULL;
int i_pilot = -1;
+int i_mis = 0;
int i_fec_lp = 999;
int i_guard = -1;
int i_transmission = -1;
@@ -452,7 +453,7 @@ void usage()
"[-i <RT priority>] [-a <adapter>] [-n <frontend number>] [-S <diseqc>] "
"[-f <frequency>|-D [<src host>[:<src port>]@]<src mcast>[:<port>][/<opts>]*|-A <ASI adapter>] "
"[-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-I <inversion>] "
- "[-F <fec inner>] [-m <modulation] [-R <rolloff>] [-P <pilot>] [-K <fec lp>] "
+ "[-F <fec inner>] [-m <modulation] [-R <rolloff>] [-P <pilot>] [-K <fec lp>] [-k <dvbs2_mutistream_id>] "
"[-G <guard interval>] [-H <hierarchy>] [-X <transmission>] [-O <lock timeout>] "
"[-u] [-w] [-U] [-L <latency>] [-E <retention>] [-d <dest IP>[<:port>][/<opts>]*] "
"[-z] [-C [-e] [-M <network name] [-N <network ID>]] [-T] [-j <system charset>] "
@@ -477,6 +478,7 @@ void usage()
msg_Raw( NULL, " -P --pilot DVB-S2 Pilot (-1 auto, 0 off, 1 on)" );
msg_Raw( NULL, " -R --rolloff DVB-S2 Rolloff value" );
msg_Raw( NULL, " DVB-S2 35=0.35|25=0.25|20=0.20|0=AUTO (default: 35)" );
+ msg_Raw( NULL, " -k --multistream-id DVB-S2 multistream id (0-255, default: 0) /Only with DVB API >= 5.5?/" );
msg_Raw( NULL, " -K --fec-lp DVB-T low priority FEC (default auto)" );
msg_Raw( NULL, " -G --guard DVB-T guard interval" );
msg_Raw( NULL, " DVB-T 32 (1/32)|16 (1/16)|8 (1/8)|4 (1/4)|-1 (auto, default)" );
@@ -542,7 +544,7 @@ int main( int i_argc, char **pp_argv )
usage();
/*
- * The only short options left are: ky0123456789
+ * The only short options left are: y0123456789
* Use them wisely.
*/
static const struct option long_options[] =
@@ -565,6 +567,7 @@ int main( int i_argc, char **pp_argv )
{ "inversion", required_argument, NULL, 'I' },
{ "modulation", required_argument, NULL, 'm' },
{ "pilot", required_argument, NULL, 'P' },
+ { "mutistream-id", required_argument, NULL, 'k' },
{ "fec-lp", required_argument, NULL, 'K' },
{ "guard", required_argument, NULL, 'G' },
{ "hierarchy", required_argument, NULL, 'H' },
@@ -600,7 +603,7 @@ int main( int i_argc, char **pp_argv )
{ 0, 0, 0, 0 }
};
- while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:B:x:Q:hVZ:", long_options, NULL)) != -1 )
+ while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:k:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:B:x:Q:hVZ:", long_options, NULL)) != -1 )
{
switch ( c )
{
@@ -711,6 +714,10 @@ int main( int i_argc, char **pp_argv )
i_pilot = strtol( optarg, NULL, 0 );
break;
+ case 'k':
+ i_mis = strtol( optarg, NULL, 0 );
+ break;
+
case 'K':
i_fec_lp = strtol( optarg, NULL, 0 );
break;
diff --git a/dvblast.h b/dvblast.h
index 40ce4c4..19b64ca 100644
--- a/dvblast.h
+++ b/dvblast.h
@@ -24,6 +24,16 @@
#include <netdb.h>
#include <sys/socket.h>
+#if DVBAPI_VERSION >= 505
+ #define DVBS2_MIS_IS_SUPPORTED 1
+#endif
+
+/* Debug code to test mutistream with older DVB headers */
+#if 1 && DVBAPI_VERSION < 505
+ #define DVBS2_MIS_IS_SUPPORTED 1
+ #define DTV_DVBS2_MIS_ID 44
+#endif
+
#define HAVE_CLOCK_NANOSLEEP
#define HAVE_ICONV
@@ -167,6 +177,7 @@ extern int i_bandwidth;
extern int i_inversion;
extern char *psz_modulation;
extern int i_pilot;
+extern int i_mis;
extern int i_fec_lp;
extern int i_guard;
extern int i_transmission;
--
1.7.5.1
More information about the dvblast-devel
mailing list