Thanks Georgi.<br>I will tested and I'll contact TBS.<br><br>Thierry<br><br><div class="gmail_quote">2013/1/17 Georgi Chorbadzhiyski <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dvblast | branch: master | Georgi Chorbadzhiyski <<a href="mailto:gf@unixsol.org">gf@unixsol.org</a>> | Fri Nov 11 21:55:40 2011 +0200| [347f184da2355d8a6fcddc2eccf306e5f95aee12] | committer: Georgi Chorbadzhiyski<br>
<br>
Add support for DVB-T/S2 and ISDB multistream.<br>
<br>
Generic multistream support was added in Linux 3.6 in commit 287cefd096b.<br>
<br>
<a href="http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=287cefd096b" target="_blank">http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=287cefd096b</a><br>
<br>
The way it is added it is backwards compatible with older kernels.<br>
<br>
This patch implements mis support in DVBlast. Unfortunately I don't<br>
have mis compatible hardware and a way to test it, so I'm posting<br>
this patch as RFC and RFT.<br>
<br>
If your frontend reports FE_CAN_MULTISTREAM (you have to use Linux 3.6<br>
and higher) it'll be invaluable to test if multistream support is<br>
working.<br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=347f184da2355d8a6fcddc2eccf306e5f95aee12" target="_blank">http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=347f184da2355d8a6fcddc2eccf306e5f95aee12</a><br>
---<br>
<br>
NEWS | 1 +<br>
config.h | 6 ++++++<br>
dvb.c | 11 +++++++----<br>
dvblast.c | 11 +++++++++--<br>
dvblast.h | 1 +<br>
dvblastctl.c | 3 +--<br>
6 files changed, 25 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/NEWS b/NEWS<br>
index b67922b..d513e13 100644<br>
--- a/NEWS<br>
+++ b/NEWS<br>
@@ -7,6 +7,7 @@ Changes between 2.2 and 2.3:<br>
* Added CA device addressing.<br>
* Added support for remapping ES pids to fixed values.<br>
* Added support for multi-delivery system frontends.<br>
+ * Added support for multistream that appeared in Linux 3.6<br>
<br>
Changes between 2.1 and 2.2:<br>
----------------------------<br>
diff --git a/config.h b/config.h<br>
index 8a009af..e09c09c 100644<br>
--- a/config.h<br>
+++ b/config.h<br>
@@ -25,9 +25,15 @@<br>
#define _DVBLAST_CONFIG_H_<br>
<br>
#if defined(__linux__)<br>
+#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))<br>
#define HAVE_DVB_SUPPORT<br>
#define HAVE_ASI_SUPPORT<br>
#define HAVE_CLOCK_NANOSLEEP<br>
+#define HAVE_DVB_MULTISTREAM<br>
+#if DVBAPI_VERSION < 508<br>
+ #define DTV_STREAM_ID 42<br>
+ #define FE_CAN_MULTISTREAM 0x4000000<br>
+#endif<br>
#endif<br>
<br>
#define HAVE_ICONV<br>
diff --git a/dvb.c b/dvb.c<br>
index d257c80..14d5f66 100644<br>
--- a/dvb.c<br>
+++ b/dvb.c<br>
@@ -580,8 +580,6 @@ static int FrontendDoDiseqc(void)<br>
return bis_frequency;<br>
}<br>
<br>
-#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))<br>
-<br>
#if DVB_API_VERSION >= 5<br>
<br>
#if DVBAPI_VERSION < 505<br>
@@ -777,6 +775,7 @@ static void FrontendInfo( struct dvb_frontend_info info, uint32_t version,<br>
#if DVBAPI_VERSION >= 501<br>
FRONTEND_INFO( info.caps, FE_CAN_2G_MODULATION, "2G_MODULATION" )<br>
#endif<br>
+ FRONTEND_INFO( info.caps, FE_CAN_MULTISTREAM, "MULTISTREAM" )<br>
FRONTEND_INFO( info.caps, FE_NEEDS_BENDING, "NEEDS_BENDING" )<br>
FRONTEND_INFO( info.caps, FE_CAN_RECOVER, "FE_CAN_RECOVER" )<br>
FRONTEND_INFO( info.caps, FE_CAN_MUTE_TS, "FE_CAN_MUTE_TS" )<br>
@@ -862,6 +861,7 @@ static struct dtv_property dvbs2_cmdargs[] = {<br>
{ .cmd = DTV_INNER_FEC, .u.data = FEC_AUTO },<br>
{ .cmd = DTV_PILOT, .u.data = PILOT_AUTO },<br>
{ .cmd = DTV_ROLLOFF, .u.data = ROLLOFF_AUTO },<br>
+ { .cmd = DTV_STREAM_ID, .u.data = 0 },<br>
{ .cmd = DTV_TUNE },<br>
};<br>
static struct dtv_properties dvbs2_cmdseq = {<br>
@@ -928,6 +928,7 @@ static struct dtv_properties atsc_cmdseq = {<br>
#define PILOT 7<br>
#define TRANSMISSION 8<br>
#define ROLLOFF 8<br>
+#define MIS 9<br>
#define HIERARCHY 9<br>
<br>
struct dtv_property pclear[] = {<br>
@@ -1132,6 +1133,7 @@ static void FrontendSet( bool b_init )<br>
p->props[MODULATION].u.data = GetModulation();<br>
p->props[PILOT].u.data = GetPilot();<br>
p->props[ROLLOFF].u.data = GetRollOff();<br>
+ p->props[MIS].u.data = i_mis;<br>
}<br>
else<br>
p = &dvbs_cmdseq;<br>
@@ -1141,9 +1143,10 @@ static void FrontendSet( bool b_init )<br>
p->props[FEC_INNER].u.data = GetFECInner(info.caps);<br>
p->props[FREQUENCY].u.data = FrontendDoDiseqc();<br>
<br>
- msg_Dbg( NULL, "tuning DVB-S frontend to f=%d srate=%d inversion=%d fec=%d rolloff=%d modulation=%s pilot=%d",<br>
+ msg_Dbg( NULL, "tuning DVB-S frontend to f=%d srate=%d inversion=%d fec=%d rolloff=%d modulation=%s pilot=%d mis=%d",<br>
i_frequency, i_srate, i_inversion, i_fec, i_rolloff,<br>
- psz_modulation == NULL ? "legacy" : psz_modulation, i_pilot );<br>
+ psz_modulation == NULL ? "legacy" : psz_modulation, i_pilot,<br>
+ i_mis );<br>
break;<br>
<br>
case SYS_ATSC:<br>
diff --git a/dvblast.c b/dvblast.c<br>
index 721782c..3c2bee4 100644<br>
--- a/dvblast.c<br>
+++ b/dvblast.c<br>
@@ -75,6 +75,7 @@ int b_tone = 0;<br>
int i_bandwidth = 8;<br>
char *psz_modulation = NULL;<br>
int i_pilot = -1;<br>
+int i_mis = 0;<br>
int i_fec_lp = 999;<br>
int i_guard = -1;<br>
int i_transmission = -1;<br>
@@ -486,6 +487,7 @@ void usage()<br>
msg_Raw( NULL, " -P --pilot DVB-S2 Pilot (-1 auto, 0 off, 1 on)" );<br>
msg_Raw( NULL, " -R --rolloff DVB-S2 Rolloff value" );<br>
msg_Raw( NULL, " DVB-S2 35=0.35|25=0.25|20=0.20|0=AUTO (default: 35)" );<br>
+ msg_Raw( NULL, " -1 --multistream-id Set stream ID (0-255, default: 0)" );<br>
msg_Raw( NULL, " -K --fec-lp DVB-T low priority FEC (default auto)" );<br>
msg_Raw( NULL, " -G --guard DVB-T guard interval" );<br>
msg_Raw( NULL, " DVB-T 32 (1/32)|16 (1/16)|8 (1/8)|4 (1/4)|-1 (auto, default)" );<br>
@@ -555,7 +557,7 @@ int main( int i_argc, char **pp_argv )<br>
usage();<br>
<br>
/*<br>
- * The only short options left are: 12346789<br>
+ * The only short options left are: 2346789<br>
* Use them wisely.<br>
*/<br>
static const struct option long_options[] =<br>
@@ -580,6 +582,7 @@ int main( int i_argc, char **pp_argv )<br>
{ "inversion", required_argument, NULL, 'I' },<br>
{ "modulation", required_argument, NULL, 'm' },<br>
{ "pilot", required_argument, NULL, 'P' },<br>
+ { "mutistream-id", required_argument, NULL, '1' },<br>
{ "fec-lp", required_argument, NULL, 'K' },<br>
{ "guard", required_argument, NULL, 'G' },<br>
{ "hierarchy", required_argument, NULL, 'H' },<br>
@@ -617,7 +620,7 @@ int main( int i_argc, char **pp_argv )<br>
{ 0, 0, 0, 0 }<br>
};<br>
<br>
- while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:5:f:F:R:s:S:k:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:B:x:Q:hVZ:y:0:", long_options, NULL)) != -1 )<br>
+ while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:5:f:F:R:s:S:k:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:B:x:Q:hVZ:y:0:1:", long_options, NULL)) != -1 )<br>
{<br>
switch ( c )<br>
{<br>
@@ -745,6 +748,10 @@ int main( int i_argc, char **pp_argv )<br>
i_pilot = strtol( optarg, NULL, 0 );<br>
break;<br>
<br>
+ case '1':<br>
+ i_mis = strtol( optarg, NULL, 0 );<br>
+ break;<br>
+<br>
case 'K':<br>
i_fec_lp = strtol( optarg, NULL, 0 );<br>
break;<br>
diff --git a/dvblast.h b/dvblast.h<br>
index 5df0d49..7026ab8 100644<br>
--- a/dvblast.h<br>
+++ b/dvblast.h<br>
@@ -166,6 +166,7 @@ extern int i_bandwidth;<br>
extern int i_inversion;<br>
extern char *psz_modulation;<br>
extern int i_pilot;<br>
+extern int i_mis;<br>
extern int i_fec_lp;<br>
extern int i_guard;<br>
extern int i_transmission;<br>
diff --git a/dvblastctl.c b/dvblastctl.c<br>
index 1cb3cc2..0ffb1b9 100644<br>
--- a/dvblastctl.c<br>
+++ b/dvblastctl.c<br>
@@ -626,8 +626,6 @@ int main( int i_argc, char **ppsz_argv )<br>
PRINT_CAPS( CAN_HIERARCHY_AUTO );<br>
PRINT_CAPS( CAN_MUTE_TS );<br>
<br>
-#define DVBAPI_VERSION ((DVB_API_VERSION)*100+(DVB_API_VERSION_MINOR))<br>
-<br>
#if DVBAPI_VERSION >= 301<br>
PRINT_CAPS( CAN_8VSB );<br>
PRINT_CAPS( CAN_16VSB );<br>
@@ -640,6 +638,7 @@ int main( int i_argc, char **ppsz_argv )<br>
#if DVBAPI_VERSION >= 501<br>
PRINT_CAPS( CAN_2G_MODULATION );<br>
#endif<br>
+ PRINT_CAPS( CAN_MULTISTREAM );<br>
#undef PRINT_CAPS<br>
<br>
if ( i_print_type == PRINT_TEXT )<br>
<br>
_______________________________________________<br>
dvblast-devel mailing list<br>
<a href="mailto:dvblast-devel@videolan.org">dvblast-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/dvblast-devel" target="_blank">http://mailman.videolan.org/listinfo/dvblast-devel</a><br>
</blockquote></div><br>