Skip to contentSkip to conversation

S2API for vdr-1.7.0(1.7.1) quick hack

PATCH In review Igor M. Liplianin 2 participants 2 messages Sep 28, 2008 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 S2API for vdr-1.7.0(1.7.1) quick hack

В сообщении от 24 September 2008 18:34:01 Niels Wagenaar написал(а):

Quoted 18 lines

Hello all (and especially Klaus):

It's official, the people from V4L have voted for the usage of the S2API proposal to be the future for new DVB API improvements (see the official announcement at the bottom) within the V4L tree. Currently S2API is in a real speed-train and new devices are added very rapidly. Only the devices currently in Multiproto and written by Manu Abraham are not yet ported. Also people are allready busy with patches for Kaffeine (allready done) and MythTV (not seen yet, but it's WIP according to a post on the linux-dvb mailinglist).

So, this should mean that VDR 1.7.x should focus on S2API because of the obvious reasons. Has anybody started on a patch of somekind to include S2API in VDR 1.7.0 or 1.7.1? Mainly I was thinking of doing it myself (I have a Hauppauge WinTV-NOVA-HD-S2 which is allready supported in S2API) in the hope to have it working in the next weekend. But if it's allready done or in progress, then I would like to use my time for something else ;)

Quoted 3 lines

Regards,

Niels Wagenaar

Hi Niels

S2API for vdr-1.7.0(1.7.1) quick hack
Patch is ugly and only supported DVB-S. But it is useful to begin. You may modify it like you wish.

Igor

channels.c +92 -90
diff -Naur 1/channels.c 2/channels.c
@@ -21,114 +21,116 @@
 // --- Channel Parameter Maps ------------------------------------------------
 
 const tChannelParameterMap InversionValues[] = {
-  {   0, DVBFE_INVERSION_OFF, trNOOP("off") },
-  {   1, DVBFE_INVERSION_ON,  trNOOP("on") },
-  { 999, DVBFE_INVERSION_AUTO },
+  {   0, INVERSION_OFF, trNOOP("off") },
+  {   1, INVERSION_ON,  trNOOP("on") },
+  { 999, INVERSION_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap BandwidthValues[] = {
-  {   5, DVBFE_BANDWIDTH_5_MHZ, "5 MHz" },
-  {   6, DVBFE_BANDWIDTH_6_MHZ, "6 MHz" },
-  {   7, DVBFE_BANDWIDTH_7_MHZ, "7 MHz" },
-  {   8, DVBFE_BANDWIDTH_8_MHZ, "8 MHz" },
-  { 999, DVBFE_BANDWIDTH_AUTO },
+//  {   5, BANDWIDTH_5_MHZ, "5 MHz" },
+  {   6, BANDWIDTH_6_MHZ, "6 MHz" },
+  {   7, BANDWIDTH_7_MHZ, "7 MHz" },
+  {   8, BANDWIDTH_8_MHZ, "8 MHz" },
+  { 999, BANDWIDTH_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap CoderateValues[] = {
-  {   0, DVBFE_FEC_NONE, trNOOP("none") },
-  {  12, DVBFE_FEC_1_2,  "1/2" },
-  {  13, DVBFE_FEC_1_3,  "1/3" },
-  {  14, DVBFE_FEC_1_4,  "1/4" },
-  {  23, DVBFE_FEC_2_3,  "2/3" },
-  {  25, DVBFE_FEC_2_5,  "2/5" },
-  {  34, DVBFE_FEC_3_4,  "3/4" },
-  {  35, DVBFE_FEC_3_5,  "3/5" },
-  {  45, DVBFE_FEC_4_5,  "4/5" },
-  {  56, DVBFE_FEC_5_6,  "5/6" },
-  {  67, DVBFE_FEC_6_7,  "6/7" },
-  {  78, DVBFE_FEC_7_8,  "7/8" },
-  {  89, DVBFE_FEC_8_9,  "8/9" },
-  { 910, DVBFE_FEC_9_10, "9/10" },
-  { 999, DVBFE_FEC_AUTO },
+  {   0, FEC_NONE, trNOOP("none") },
+  {  12, FEC_1_2,  "1/2" },
+//  {  13, FEC_1_3,  "1/3" },
+//  {  14, FEC_1_4,  "1/4" },
+  {  23, FEC_2_3,  "2/3" },
+//  {  25, FEC_2_5,  "2/5" },
+  {  34, FEC_3_4,  "3/4" },
+  {  35, FEC_3_5,  "3/5" },
+  {  45, FEC_4_5,  "4/5" },
+  {  56, FEC_5_6,  "5/6" },
+  {  67, FEC_6_7,  "6/7" },
+  {  78, FEC_7_8,  "7/8" },
+  {  89, FEC_8_9,  "8/9" },
+  { 910, FEC_9_10, "9/10" },
+  { 999, FEC_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap ModulationValues[] = {
-  {   0, DVBFE_MOD_NONE,    trNOOP("none") },
-  {   4, DVBFE_MOD_QAM4,    "QAM4" },
-  {  16, DVBFE_MOD_QAM16,   "QAM16" },
-  {  32, DVBFE_MOD_QAM32,   "QAM32" },
-  {  64, DVBFE_MOD_QAM64,   "QAM64" },
-  { 128, DVBFE_MOD_QAM128,  "QAM128" },
-  { 256, DVBFE_MOD_QAM256,  "QAM256" },
-  { 512, DVBFE_MOD_QAM512,  "QAM512" },
-  {1024, DVBFE_MOD_QAM1024, "QAM1024" },
-  {   1, DVBFE_MOD_BPSK,    "BPSK" },
-  {   2, DVBFE_MOD_QPSK,    "QPSK" },
-  {   3, DVBFE_MOD_OQPSK,   "OQPSK" },
-  {   5, DVBFE_MOD_8PSK,    "8PSK" },
-  {   6, DVBFE_MOD_16APSK,  "16APSK" },
-  {   7, DVBFE_MOD_32APSK,  "32APSK" },
-  {   8, DVBFE_MOD_OFDM,    "OFDM" },
-  {   9, DVBFE_MOD_COFDM,   "COFDM" },
-  {  10, DVBFE_MOD_VSB8,    "VSB8" },
-  {  11, DVBFE_MOD_VSB16,   "VSB16" },
-  { 998, DVBFE_MOD_QAMAUTO, "QAMAUTO" },
-  { 999, DVBFE_MOD_AUTO },
+//  {   0, MOD_NONE,    trNOOP("none") },
+//  {   4, MOD_QAM4,    "QAM4" },
+  {  16, QAM_16,   "QAM16" },
+  {  32, QAM_32,   "QAM32" },
+  {  64, QAM_64,   "QAM64" },
+  { 128, QAM_128,  "QAM128" },
+  { 256, QAM_256,  "QAM256" },
+//  { 512, MOD_QAM512,  "QAM512" },
+//  {1024, MOD_QAM1024, "QAM1024" },
+//  {   1, MOD_BPSK,    "BPSK" },
+  {   2, QPSK,    "QPSK" },
+//  {   3, MOD_OQPSK,   "OQPSK" },
+  {   5, _8PSK,    "8PSK" },
+  {   6, _16APSK,  "16APSK" },
+//  {   7, MOD_32APSK,  "32APSK" },
+//  {   8, DVBFE_MOD_OFDM,    "OFDM" },
+//  {   9, MOD_COFDM,   "COFDM" },
+  {  10, VSB_8,    "VSB8" },
+  {  11, VSB_16,   "VSB16" },
+  { 998, QAM_AUTO, "QAMAUTO" },
+//  { 999, MOD_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap SystemValues[] = {
-  {   0, DVBFE_DELSYS_DVBS,  "DVB-S" },
-  {   1, DVBFE_DELSYS_DVBS2, "DVB-S2" },
+  {   0, SYS_DVBS,  "DVB-S" },
+  {   1, SYS_DVBS2, "DVB-S2" },
   { -1 }
   };
 
 const tChannelParameterMap TransmissionValues[] = {
-  {   2, DVBFE_TRANSMISSION_MODE_2K, "2K" },
-  {   4, DVBFE_TRANSMISSION_MODE_4K, "4K" },
-  {   8, DVBFE_TRANSMISSION_MODE_8K, "8K" },
-  { 999, DVBFE_TRANSMISSION_MODE_AUTO },
+  {   2, TRANSMISSION_MODE_2K, "2K" },
+//  {   4, TRANSMISSION_MODE_4K, "4K" },
+  {   8, TRANSMISSION_MODE_8K, "8K" },
+  { 999, TRANSMISSION_MODE_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap GuardValues[] = {
-  {   4, DVBFE_GUARD_INTERVAL_1_4,  "1/4" },
-  {   8, DVBFE_GUARD_INTERVAL_1_8,  "1/8" },
-  {  16, DVBFE_GUARD_INTERVAL_1_16, "1/16" },
-  {  32, DVBFE_GUARD_INTERVAL_1_32, "1/32" },
-  { 999, DVBFE_GUARD_INTERVAL_AUTO },
+  {   4, GUARD_INTERVAL_1_4,  "1/4" },
+  {   8, GUARD_INTERVAL_1_8,  "1/8" },
+  {  16, GUARD_INTERVAL_1_16, "1/16" },
+  {  32, GUARD_INTERVAL_1_32, "1/32" },
+  { 999, GUARD_INTERVAL_AUTO },
   { -1 }
   };
 
 const tChannelParameterMap HierarchyValues[] = {
-  {   0, DVBFE_HIERARCHY_OFF, trNOOP("off") },
-  {   1, DVBFE_HIERARCHY_ON,  trNOOP("on") },
-  { 999, DVBFE_HIERARCHY_AUTO },
+  {   0, HIERARCHY_NONE, trNOOP("off") },
+  {   1, HIERARCHY_1,  trNOOP("1") },
+  {   2, HIERARCHY_2,  trNOOP("2") },
+  {   4, HIERARCHY_4,  trNOOP("4") },
+  { 999, HIERARCHY_AUTO },
   { -1 }
   };
 
-const tChannelParameterMap AlphaValues[] = {
-  {   0, 0 },
-  {   1, DVBFE_ALPHA_1 },
-  {   2, DVBFE_ALPHA_2 },
-  {   4, DVBFE_ALPHA_4 },
-  { -1 }
-  };
-
-const tChannelParameterMap PriorityValues[] = {
-  {   0, DVBFE_STREAM_PRIORITY_HP, trNOOP("high") },
-  {   1, DVBFE_STREAM_PRIORITY_LP, trNOOP("low") },
-  { -1 }
-  };
+// const tChannelParameterMap AlphaValues[] = {
+//   {   0, 0 },
+//   {   1, ALPHA_1 },
+//   {   2, ALPHA_2 },
+//   {   4, ALPHA_4 },
+//   { -1 }
+//   };
+// 
+// const tChannelParameterMap PriorityValues[] = {
+//   {   0, STREAM_PRIORITY_HP, trNOOP("high") },
+//   {   1, STREAM_PRIORITY_LP, trNOOP("low") },
+//   { -1 }
+//   };
 
 const tChannelParameterMap RollOffValues[] = {
-  {   0, DVBFE_ROLLOFF_UNKNOWN },
-  {  20, DVBFE_ROLLOFF_20, "0.20" },
-  {  25, DVBFE_ROLLOFF_25, "0.25" },
-  {  35, DVBFE_ROLLOFF_35, "0.35" },
+  {   0, ROLLOFF_AUTO },
+  {  20, ROLLOFF_20, "0.20" },
+  {  25, ROLLOFF_25, "0.25" },
+  {  35, ROLLOFF_35, "0.35" },
   { -1 }
   };
 
@@ -217,18 +219,18 @@
   provider = strdup("");
   portalName = strdup("");
   memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
-  inversion    = DVBFE_INVERSION_AUTO;
-  bandwidth    = DVBFE_BANDWIDTH_AUTO;
-  coderateH    = DVBFE_FEC_AUTO;
-  coderateL    = DVBFE_FEC_AUTO;
-  modulation   = DVBFE_MOD_AUTO;
-  system       = DVBFE_DELSYS_DVBS;
-  transmission = DVBFE_TRANSMISSION_MODE_AUTO;
-  guard        = DVBFE_GUARD_INTERVAL_AUTO;
-  hierarchy    = DVBFE_HIERARCHY_AUTO;
+  inversion    = INVERSION_AUTO;
+  bandwidth    = BANDWIDTH_AUTO;
+  coderateH    = FEC_AUTO;
+  coderateL    = FEC_AUTO;
+  modulation   = QPSK;
+  system       = SYS_DVBS;
+  transmission = TRANSMISSION_MODE_AUTO;
+  guard        = GUARD_INTERVAL_AUTO;
+  hierarchy    = HIERARCHY_AUTO;
   alpha        = 0;
-  priority     = DVBFE_STREAM_PRIORITY_HP;
-  rollOff      = DVBFE_ROLLOFF_UNKNOWN;
+  //priority     = STREAM_PRIORITY_HP;
+  rollOff      = ROLLOFF_AUTO;
   modification = CHANNELMOD_NONE;
   schedule     = NULL;
   linkChannels = NULL;
@@ -669,7 +671,7 @@
   char *q = buffer;
   *q = 0;
   ST(" S ")  q += sprintf(q, "%c", polarization);
-  ST("  T")  q += PrintParameter(q, 'A', MapToUser(alpha, AlphaValues));
+//  ST("  T")  q += PrintParameter(q, 'A', MapToUser(alpha, AlphaValues));
   ST("  T")  q += PrintParameter(q, 'B', MapToUser(bandwidth, BandwidthValues));
   ST("CST")  q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues));
   ST("  T")  q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues));
@@ -677,7 +679,7 @@
   ST("CST")  q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues));
   ST("CST")  q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues));
   ST(" S ")  q += PrintParameter(q, 'O', MapToUser(rollOff, RollOffValues));
-  ST("  T")  q += PrintParameter(q, 'P', MapToUser(priority, PriorityValues));
+//  ST("  T")  q += PrintParameter(q, 'P', MapToUser(priority, PriorityValues));
   ST(" S ")  q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
   ST("  T")  q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
   ST("  T")  q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
@@ -704,7 +706,7 @@
 {
   while (s && *s) {
         switch (toupper(*s)) {
-          case 'A': s = ParseParameter(s, alpha, AlphaValues); break;
+//          case 'A': s = ParseParameter(s, alpha, AlphaValues); break;
           case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
           case 'C': s = ParseParameter(s, coderateH, CoderateValues); break;
           case 'D': s = ParseParameter(s, coderateL, CoderateValues); break;
@@ -715,7 +717,7 @@
           case 'M': s = ParseParameter(s, modulation, ModulationValues); break;
           case 'Z':// for compatibility with the original DVB-S2 patch - may be removed in future versions
           case 'O': s = ParseParameter(s, rollOff, RollOffValues); break;
-          case 'P': s = ParseParameter(s, priority, PriorityValues); break;
+//          case 'P': s = ParseParameter(s, priority, PriorityValues); break;
           case 'R': polarization = *s++; break;
           case 'S': s = ParseParameter(s, system, SystemValues); break;
           case 'T': s = ParseParameter(s, transmission, TransmissionValues); break;
dvbdevice.c +73 -40

199 lines not on this page · raw message

dvbdevice.h +4 -4
diff -Naur 1/dvbdevice.h 2/dvbdevice.h
@@ -15,9 +15,9 @@
 #include "device.h"
 #include "dvbspu.h"
 
-#if DVB_API_VERSION != 3 || DVB_API_VERSION_MINOR != 3
-#error VDR requires Linux DVB driver API version 3.3!
-#endif
+//#if DVB_API_VERSION != 3 || DVB_API_VERSION_MINOR != 3
+//#error VDR requires Linux DVB driver API version 3.3!
+//#endif
 
 #define MAXDVBDEVICES  8
 
@@ -35,7 +35,7 @@
          ///< Must be called before accessing any DVB functions.
          ///< \return True if any devices are available.
 private:
-  dvbfe_delsys frontendType;
+  fe_delivery_system frontendType;
   int numProvidedSystems;
   int fd_osd, fd_audio, fd_video, fd_dvr, fd_stc, fd_ca;
 protected:
menu.c +2 -2
diff -Naur 1/menu.c 2/menu.c
@@ -252,8 +252,8 @@
   ST("  T")  Add(new cMenuEditMapItem( tr("Transmission"), &data.transmission, TransmissionValues));
   ST("  T")  Add(new cMenuEditMapItem( tr("Guard"),        &data.guard,        GuardValues));
   ST("  T")  Add(new cMenuEditMapItem( tr("Hierarchy"),    &data.hierarchy,    HierarchyValues));
-  ST("  T")  Add(new cMenuEditMapItem( tr("Alpha"),        &data.alpha,        AlphaValues));
-  ST("  T")  Add(new cMenuEditMapItem( tr("Priority"),     &data.priority,     PriorityValues));
+//  ST("  T")  Add(new cMenuEditMapItem( tr("Alpha"),        &data.alpha,        AlphaValues));
+//  ST("  T")  Add(new cMenuEditMapItem( tr("Priority"),     &data.priority,     PriorityValues));
   ST(" S ")  Add(new cMenuEditMapItem( tr("Rolloff"),      &data.rollOff,      RollOffValues));
 
   SetCurrent(Get(current));

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#2 lore raw
Quoted 7 lines

-----Oorspronkelijk bericht-----
Van: Igor M. Liplianin [mailto:[email protected]]
Verzonden: zondag 28 september 2008 12:49
Aan: [email protected]; Niels Wagenaar
CC: Gregoire Favre; [email protected]
Onderwerp: [vdr][PATCH] S2API for vdr-1.7.0(1.7.1) quick hack

Quoted 8 lines

-- SNIP --

Hi Niels

S2API for vdr-1.7.0(1.7.1) quick hack
Patch is ugly and only supported DVB-S. But it is useful to begin. You may modify it like you wish.

Igor, thanks for the hack/patch! Now I have something to compare and this will speed it up for me very much :)

I didn't had time to start with it yet (Family ;). It was my plan to start this evening. So if I have something new, I'll report this asap :)

Quoted 1 line

Igor

Regards,

Niels Wagenaar

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb