After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709414 - dvbsrc: Uses deprecated field frontend type and add DVB S2/T2 support
dvbsrc: Uses deprecated field frontend type and add DVB S2/T2 support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 720350 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-10-04 08:12 UTC by Stefan Ringel
Modified: 2014-05-26 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change to DTV_ENUM_DELSYS (14.28 KB, patch)
2013-10-08 19:22 UTC, Stefan Ringel
needs-work Details | Review
add DVB-T2, DVB-S2 (11.42 KB, patch)
2013-10-08 19:23 UTC, Stefan Ringel
needs-work Details | Review
Change to DTV_ENUM_DELSYS ver 2 (16.05 KB, patch)
2013-10-09 12:32 UTC, Stefan Ringel
reviewed Details | Review
add DVB-T2, DVB-S2 ver 2 (11.33 KB, patch)
2013-10-09 12:32 UTC, Stefan Ringel
reviewed Details | Review
Change to DTV_ENUM_DELSYS v3 (16.06 KB, patch)
2013-10-10 16:31 UTC, Stefan Ringel
committed Details | Review
add DVB-T2, DVB-S2 v3 (11.40 KB, patch)
2013-10-10 16:32 UTC, Stefan Ringel
committed Details | Review
dvbsrc test ouput, lock on dvbs-2 signal (1.16 KB, text/plain)
2013-12-19 12:27 UTC, Gabriel Strimtu
  Details
dvbbasebin test output, lock on dvb-s(2) signal (1.18 KB, text/plain)
2013-12-19 12:31 UTC, Gabriel Strimtu
  Details
parsechannels: add delsys property (1.69 KB, patch)
2014-03-11 14:26 UTC, Stefan Ringel
needs-work Details | Review
parsechannels: add delsys property (1.88 KB, patch)
2014-04-11 13:15 UTC, Stefan Ringel
committed Details | Review

Description Stefan Ringel 2013-10-04 08:12:37 UTC
1. in method gst_dvbsrc_open_frontend you use deprecated field dvb_frontend_info.type . It is not dvbv5 like. 
in frontend doc, section frontend type:
"The usage of this field is deprecated, as it doesn't report all supported standards, and will provide an incomplete information for frontends that support multiple delivery systems. Please use DTV_ENUM_DELSYS instead."

2. please add a property delsys.
3. please add a method for information of all dvb resources.
Comment 1 Stefan Ringel 2013-10-08 19:22:45 UTC
Created attachment 256755 [details] [review]
Change to DTV_ENUM_DELSYS
Comment 2 Stefan Ringel 2013-10-08 19:23:13 UTC
Created attachment 256756 [details] [review]
add DVB-T2, DVB-S2
Comment 3 Edward Hervey 2013-10-08 19:42:52 UTC
Review of attachment 256755 [details] [review]:

::: sys/dvb/gstdvbsrc.c
@@ +115,3 @@
 #define DEFAULT_DVB_BUFFER_SIZE (10*188*1024)   /* Default is the same as the kernel default */
 #define DEFAULT_BUFFER_SIZE 8192        /* not a property */
+#define DEFAULT_DELSYS 0

Use the actual enum value (SYS_UNDEFINED ?)

@@ +866,3 @@
   adapter_name = g_strdup (fe_info.name);
 
+  adapter_structure = gst_structure_new ("dvb-adapter",

hmmm... Any way we could make this a "tiny bit" more readable ? :)

Do we really need to have FALSE for the delsys that are not spuported ?

Iterating over the known ones and just adding the values (gst_structure_set...) would make the resulting structure shorter and the code a bit more readable.
Comment 4 Stefan Ringel 2013-10-08 19:58:23 UTC
## Do we really need to have FALSE for the delsys that are not spuported ?

## Iterating over the known ones and just adding the values (gst_structure_set...)
## would make the resulting structure shorter and the code a bit more readable.

Yes. Each apps which use this plugin must know the supported delvery systems. Okay, I can rewrite this structure (a bit more readable).
Comment 5 Stefan Ringel 2013-10-09 10:29:24 UTC
Edward is that better for each delsys?

if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_A))
    gst_structure_set (adapter_structure, "dvb-c-a",
      G_TYPE_STRING, "DVB-C ANNEX A", NULL);
Comment 6 Edward Hervey 2013-10-09 11:11:16 UTC
I was going to say we could use a list ... but then I remembered that lists in structures aren't supported by most bindings :(

That solution will have to do
Comment 7 Stefan Ringel 2013-10-09 12:32:21 UTC
Created attachment 256796 [details] [review]
Change to DTV_ENUM_DELSYS ver 2
Comment 8 Stefan Ringel 2013-10-09 12:32:54 UTC
Created attachment 256797 [details] [review]
add DVB-T2, DVB-S2 ver 2
Comment 9 Sebastian Dröge (slomo) 2013-10-09 16:17:52 UTC
Review of attachment 256796 [details] [review]:

Looks good to me, needs to be tested by someone with DVB (Edward? :) )

::: sys/dvb/gstdvbsrc.c
@@ +875,3 @@
+      G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_GUARD_INTERVAL_AUTO,
+      "auto-hierarchy", G_TYPE_BOOLEAN, fe_info.caps % FE_CAN_HIERARCHY_AUTO,
+      "auto-fec", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);

You now set these auto-* fields always. Previously they were only set depending on the delsys. Does this make sense?
Comment 10 Sebastian Dröge (slomo) 2013-10-09 16:21:09 UTC
Review of attachment 256797 [details] [review]:

Looks generally good to me

::: sys/dvb/gstdvbsrc.c
@@ +555,3 @@
+      g_param_spec_int ("stream-id", "stream-id",
+          "Stream ID (DVB-T2 and DVB-S2 max 255, ISDB max 65535)",
+          -1, 65535, DEFAULT_STREAM_ID, G_PARAM_READWRITE));

What's -1? Add that to the description :)
Comment 11 Stefan Ringel 2013-10-09 18:36:20 UTC
(In reply to comment #9)
> Review of attachment 256796 [details] [review]:
> 
> Looks good to me, needs to be tested by someone with DVB (Edward? :) )
> 
> ::: sys/dvb/gstdvbsrc.c
> @@ +875,3 @@
> +      G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_GUARD_INTERVAL_AUTO,
> +      "auto-hierarchy", G_TYPE_BOOLEAN, fe_info.caps % FE_CAN_HIERARCHY_AUTO,
> +      "auto-fec", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);
> 
> You now set these auto-* fields always. Previously they were only set depending
> on the delsys. Does this make sense?

I don't know it for all delsys. Can I add the same fields?
Comment 12 Stefan Ringel 2013-10-09 19:03:46 UTC
(In reply to comment #10)
> Review of attachment 256797 [details] [review]:
> 
> Looks generally good to me
> 
> ::: sys/dvb/gstdvbsrc.c
> @@ +555,3 @@
> +      g_param_spec_int ("stream-id", "stream-id",
> +          "Stream ID (DVB-T2 and DVB-S2 max 255, ISDB max 65535)",
> +          -1, 65535, DEFAULT_STREAM_ID, G_PARAM_READWRITE));
> 
> What's -1? Add that to the description :)

-1 = disabled and is default.
Comment 13 Sebastian Dröge (slomo) 2013-10-10 11:26:01 UTC
(In reply to comment #11)
> (In reply to comment #9)
> > Review of attachment 256796 [details] [review] [details]:
> > 
> > Looks good to me, needs to be tested by someone with DVB (Edward? :) )
> > 
> > ::: sys/dvb/gstdvbsrc.c
> > @@ +875,3 @@
> > +      G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_GUARD_INTERVAL_AUTO,
> > +      "auto-hierarchy", G_TYPE_BOOLEAN, fe_info.caps % FE_CAN_HIERARCHY_AUTO,
> > +      "auto-fec", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);
> > 
> > You now set these auto-* fields always. Previously they were only set depending
> > on the delsys. Does this make sense?
> 
> I don't know it for all delsys. Can I add the same fields?

Thinking about it, it should be fine as is.

(In reply to comment #12)
> (In reply to comment #10)
> > Review of attachment 256797 [details] [review] [details]:
> > 
> > Looks generally good to me
> > 
> > ::: sys/dvb/gstdvbsrc.c
> > @@ +555,3 @@
> > +      g_param_spec_int ("stream-id", "stream-id",
> > +          "Stream ID (DVB-T2 and DVB-S2 max 255, ISDB max 65535)",
> > +          -1, 65535, DEFAULT_STREAM_ID, G_PARAM_READWRITE));
> > 
> > What's -1? Add that to the description :)
> 
> -1 = disabled and is default.

ok, just add that then :)
Comment 14 Stefan Ringel 2013-10-10 16:31:44 UTC
Created attachment 256926 [details] [review]
Change to DTV_ENUM_DELSYS v3
Comment 15 Stefan Ringel 2013-10-10 16:32:22 UTC
Created attachment 256927 [details] [review]
add DVB-T2, DVB-S2 v3
Comment 16 Sebastian Dröge (slomo) 2013-12-14 10:09:15 UTC
*** Bug 720350 has been marked as a duplicate of this bug. ***
Comment 17 Gabriel Strimtu 2013-12-19 12:27:23 UTC
Created attachment 264540 [details]
dvbsrc test ouput, lock on dvbs-2 signal

Tested features:
 - delsys
 - rolloff
 - 8PSK modulation  

Untested features:
 - stream_id
 - pilot
Comment 18 Gabriel Strimtu 2013-12-19 12:31:04 UTC
Created attachment 264541 [details]
dvbbasebin test output, lock on dvb-s(2) signal

Tested features:
 - delsys
 - rolloff
 - 8PSK modulation  

Untested features:
 - stream_id
 - pilot
Comment 19 Sebastian Dröge (slomo) 2014-01-03 10:27:51 UTC
commit cd11a38bf0780da9b20aac5e46f980f47c57786d
Author: Stefan Ringel <linuxtv@stefanringel.de>
Date:   Thu Oct 10 18:25:46 2013 +0200

    dvbsrc: Add dvb-s2, dvb-t2 support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709414

commit e34df02115574084c13cc88caa47198bcc0856fc
Author: Stefan Ringel <linuxtv@stefanringel.de>
Date:   Thu Oct 10 18:23:20 2013 +0200

    dvbsrc: Change from deprecated frontend type field to DTV_ENUM_DELSYS
    
    -add delsys property
    -add delivery system capability to the gstreamer adapter structure
    -ready for add new delivery systems
    
    Application must ask the adapter structure to know which delivery systems are avaible.
    The property delsys must be set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709414
Comment 20 Nicolas Dufresne (ndufresne) 2014-01-09 14:35:19 UTC
Nice, but this won't build on kernel 3.4, do we really want to drop support for older kernel ?
Comment 21 Sebastian Dröge (slomo) 2014-01-09 15:21:24 UTC
Probably not, 3.4 is not that old yet unfortunately. Who wants to provide a patch that works with 3.4 and older too?
Comment 22 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-09 15:23:49 UTC
I have Linux square 3.8.0-35-generic and it does not build. Can we use #ifdefs ?
Comment 23 Sebastian Dröge (slomo) 2014-01-09 15:24:50 UTC
Ok, there's bug #721869 for that created just now.
Comment 24 Edward Hervey 2014-03-11 08:24:00 UTC
Those commits broke dvbbasebin (you now need to set delsys) and therefore the dvb:// usage
Comment 25 Edward Hervey 2014-03-11 08:25:19 UTC
AFAICS, the fastest way forward to fix this would be to have parsechannels.[ch] also set the delsys property accordingly.
Comment 26 Stefan Ringel 2014-03-11 14:26:55 UTC
Created attachment 271523 [details] [review]
parsechannels: add delsys property
Comment 27 Edward Hervey 2014-04-11 08:20:31 UTC
Stefan, can you provide a version of the last patch but which uses the actual SYS_ defines ?
Comment 28 Stefan Ringel 2014-04-11 12:59:28 UTC
(In reply to comment #27)
> Stefan, can you provide a version of the last patch but which uses the actual
> SYS_ defines ?

o.k.

Another point, the channel file looks too old for current and future delivery systems. Should we rework the channel file implemetation now?
Comment 29 Stefan Ringel 2014-04-11 13:15:10 UTC
Created attachment 274094 [details] [review]
parsechannels: add delsys property
Comment 30 Edward Hervey 2014-04-11 13:16:02 UTC
Meh, we should even completely go away from a file-based system and switch to a
daemon-based system (ask via dbus for settings, update them ,...).

Let's just avoid regressions for now. I'm glad to discuss better ways somewhere
else :)
Comment 31 Stefan Ringel 2014-04-11 15:03:54 UTC
(In reply to comment #30)
> Meh, we should even completely go away from a file-based system and switch to a
> daemon-based system (ask via dbus for settings, update them ,...).
> 
> Let's just avoid regressions for now. I'm glad to discuss better ways somewhere
> else :)

Good idea.
Comment 32 Stefan Ringel 2014-04-11 15:06:08 UTC
in which ones we stored channel data, if a computer goes off?
Comment 33 Edward Hervey 2014-05-26 11:33:11 UTC
commit f3489442468f0c1be747a0b26cde24aa4a39d4aa
Author: Stefan Ringel <linuxtv@stefanringel.de>
Date:   Fri Apr 11 15:14:17 2014 +0200

    dvb: parsechannels: add delsys property
    
    Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709414