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 725230 - Port to GStreamer 1.0
Port to GStreamer 1.0
Status: RESOLVED FIXED
Product: dvb-daemon
Classification: Other
Component: general
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: dvb-daemon-maint
dvb-daemon-maint
: 728975 729618 (view as bug list)
Depends on: 723910 730916 730983
Blocks: 673903
 
 
Reported: 2014-02-26 15:51 UTC by Bastien Nocera
Modified: 2014-07-22 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
change to Gstreamer-mpegts library version >= 1.3.0.1 (Git) (76.97 KB, patch)
2014-03-06 07:35 UTC, Stefan Ringel
needs-work Details | Review
change device managment to handle multiple delivery systems (72.79 KB, patch)
2014-03-06 07:36 UTC, Stefan Ringel
needs-work Details | Review
correction api chank (2.03 KB, patch)
2014-03-06 14:28 UTC, Stefan Ringel
none Details | Review
change to Gstreamer-mpegts library version >= 1.3.0.1 (Git) (73.62 KB, patch)
2014-03-17 12:52 UTC, Stefan Ringel
none Details | Review
change device managment to handle multiple delivery systems (94.09 KB, patch)
2014-03-17 12:52 UTC, Stefan Ringel
needs-work Details | Review
Bugfix pad linking (4.12 KB, patch)
2014-03-23 16:20 UTC, Stefan Ringel
none Details | Review
change to rtsp-server => 1.3.0.1 (7.93 KB, patch)
2014-03-23 16:20 UTC, Stefan Ringel
none Details | Review
correction vapi (1.07 KB, patch)
2014-03-23 16:28 UTC, Stefan Ringel
none Details | Review
correction vapi (1.06 KB, patch)
2014-03-24 09:04 UTC, Stefan Ringel
none Details | Review
change to rtsp-server => 1.3.0.1 (8.21 KB, patch)
2014-03-24 09:05 UTC, Stefan Ringel
needs-work Details | Review
change to dvb-v5 files (134.04 KB, patch)
2014-03-26 15:30 UTC, Stefan Ringel
needs-work Details | Review
add missed files and bugfix arraylist cleanup (8.16 KB, patch)
2014-03-27 12:40 UTC, Stefan Ringel
needs-work Details | Review
correction vapi (27.36 KB, patch)
2014-04-12 18:58 UTC, Stefan Ringel
none Details | Review
change to gstreamer 1.3.0.1 (273.17 KB, patch)
2014-04-12 18:59 UTC, Stefan Ringel
needs-work Details | Review
change to gstreamer 1.3.1 (271.18 KB, patch)
2014-05-09 19:02 UTC, Stefan Ringel
needs-work Details | Review
change to gstreamer 1.3.1 (270.98 KB, patch)
2014-05-11 09:15 UTC, Stefan Ringel
none Details | Review
change to gstreamer 1.3.1 (270.98 KB, patch)
2014-05-11 09:17 UTC, Stefan Ringel
committed Details | Review
correction vapi (27.36 KB, patch)
2014-05-11 09:18 UTC, Stefan Ringel
none Details | Review
update mpegts vapi to git master (270.99 KB, patch)
2014-06-24 17:25 UTC, Stefan Ringel
none Details | Review
update mpegts vapi to git master (38.95 KB, patch)
2014-06-24 17:26 UTC, Stefan Ringel
none Details | Review
update mpegts vapi to git master (44.51 KB, patch)
2014-06-27 08:13 UTC, Stefan Ringel
none Details | Review
update mpegts vapi to git master and rtsp-server vapi (49.89 KB, patch)
2014-06-30 11:35 UTC, Stefan Ringel
committed Details | Review

Description Bastien Nocera 2014-02-26 15:51:56 UTC
This would be a pre-requisite to re-integrating gnome-dvb-daemon into Totem. Otherwise we'd end up requiring 2 multimedia stacks with different bugs and features.
Comment 1 Stefan Ringel 2014-03-06 07:35:23 UTC
Created attachment 271069 [details] [review]
change to Gstreamer-mpegts library version >= 1.3.0.1 (Git)
Comment 2 Stefan Ringel 2014-03-06 07:36:17 UTC
Created attachment 271070 [details] [review]
change device managment to handle multiple delivery systems
Comment 3 Stefan Ringel 2014-03-06 07:52:12 UTC
TODO:

- change channel list to DVBv5 format
- change init scan table file to DVBv5 format
- add more delivary systems (dvb-s2, dvb-s variant turbo, dvb-t2, atsc-t, atsc-c (clear-qam), dvb-c (6 MHz, Asia), ?? dvb-h ??)
- extended EPG -> components, contents, atsc, etc.
- totem ?
- bugfixs
Comment 4 Bastien Nocera 2014-03-06 13:22:10 UTC
Is that on top of https://git.gnome.org/browse/gnome-dvb-daemon/log/?h=gst-1.0 ?

I'd be happy writing the Totem/Grilo side of the integration if I can get it working (in particular, the stock gst-0.10 gnome-dvb-daemon failed to scan any channel).
Comment 5 Stefan Ringel 2014-03-06 13:49:34 UTC
(In reply to comment #4)
> Is that on top of https://git.gnome.org/browse/gnome-dvb-daemon/log/?h=gst-1.0
> ?
yes.
Comment 6 Stefan Ringel 2014-03-06 14:28:12 UTC
Created attachment 271109 [details] [review]
correction api chank
Comment 7 Sebastian Pölsterl 2014-03-09 12:22:24 UTC
Review of attachment 271069 [details] [review]:

Thanks a lot for your work. Looks good, just needs some minor changes (see inline comments).

::: Makefile.am
@@ +105,3 @@
 	$(GUDEV_LIBS) \
 	libdvbdaemon-utils.a \
+	-lgstmpegts-1.0

Use PKG_CHECK_MODULES in configure.ac instead of hard-coding the library name.

::: src/EPGScanner.vala
@@ +366,1 @@
+        private static void decode_component (ComponentDescriptor comp, Event event_class)

decode_component should be moved to GStreamer's mpegts library.
Comment 8 Sebastian Pölsterl 2014-03-09 13:07:04 UTC
Review of attachment 271070 [details] [review]:

Is it correct that with your updates the Device class can have multiple parents (DeviceGroup class). Does a DeviceGroup correspond still correspond to a single delivery systems in the sense that all devices in one group share the same list of channels?

::: client/gnomedvb/DVBModel.py
@@ +72,3 @@
+                            dev_t = copy.copy(dev)
+                            dev_t.name = info["name"]
+                            dev_t.type = 1

Avoid magic numbers of delivery system type.

::: client/gnomedvb/Device.py
@@ +31,2 @@
     def __hash__(self):
+        return PRIME * PRIME * self.type + PRIME * self.adapter + self.frontend

Use hash(self.type, self.adapter, self.frontend) instead.

@@ +34,1 @@
     def __eq__(self, other):

Implement __ne__ as well.

::: client/gnomedvb/ui/wizard/__init__.py
@@ +1,3 @@
 from gnomedvb import _
 
 DVB_TYPE_TO_DESC = {

Please avoid magic numbers and define constants for delivery system types.

::: client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py
@@ +159,3 @@
             return
 
+        if info["type"] == 1:

Avoid magic numbers of delivery system type.

::: src/ChannelFactory.vala
@@ +90,3 @@
          * @epgscanner: #EPGScanner to forward EIT to
          */
+        public PlayerThread (Device device, EPGScanner? epgscanner, DeviceGroup group) {

Update API doc for newly added argument.

::: src/Device.vala
@@ +82,2 @@
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_DVBT)

Use a switch statement. It would also be possible to use bit masks and use a bit-wise and instead. This applies for the other uses of DvbSrcDelsys as well.

@@ +108,2 @@
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_DVBC_ANNEX_A)

Use a switch statement

@@ +128,2 @@
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_DVBS)

Use a switch statement

@@ +150,3 @@
+
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_DVBT)

Use a switch statement

@@ +178,3 @@
+
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_DVBC_ANNEX_B)

Use a switch statement

@@ +194,3 @@
+
+            foreach (DvbSrcDelsys delsys in this.delsys) {
+                if (delsys == DvbSrcDelsys.SYS_ISDBT)

Use a switch statement

::: src/DeviceGroup.vala
@@ +76,3 @@
          * @with_epg_scanner: Whether to provide an EPG scanner
          */
+        public DeviceGroup (uint id, File channels_conf, File recordings_dir, AdapterType type,

Update API doc to include newly added argument.

::: src/Main.vala
@@ +102,3 @@
     private static bool check_requirements () {
         bool val;
+        val = check_feature_version ("dvbsrc", 1, 3, 0);

Please update minimum required versions in configure.ac as well.

::: src/Manager.vala
@@ +55,3 @@
         private static const string[] UDEV_SUBSYSTEMS = {"dvb", null};
 
+        public KeyFile keyfile;

It seems that this attribute is never used.

@@ +143,3 @@
                     ScannerData data = new ScannerData ();
+                    /* change to universal Scanner */
+                    data.scanner = new TerrestrialScanner (device);

Why do you only select a TerrestrialScanner here, whereas other types should be accounted for as well?

@@ +219,3 @@
 
+            /* search device */
+            Device device = this.get_device (adapter, frontend);

What happens in the case of error where there is no device with given adapter and frontend? device should be marked as nullable.

@@ +348,1 @@
+            Device dev = this.get_device (adapter, frontend);

dev should be marked as nullable.

::: src/database/sqlite/SqliteConfigTimersStore.vala
@@ +45,3 @@
         adapter INTEGER,
         frontend INTEGER,
+        PRIMARY KEY(group_id, adapter, frontend))""";

Upgrade the version number and implement the upgrade method to add the additional keys to database of version 1.
Comment 9 Stefan Ringel 2014-03-09 17:15:40 UTC
(In reply to comment #8)
> Review of attachment 271070 [details] [review]:
> 
> Is it correct that with your updates the Device class can have multiple parents
> (DeviceGroup class). Does a DeviceGroup correspond still correspond to a single
> delivery systems in the sense that all devices in one group share the same list
> of channels?
> 
yes and no. A Device can member in more then 1 groups if it has different AdapterType. AdapterType is now terrestrial, cable, satellite.

examples:

1. Device can dvb-s and dvb-s2 -> one group from type satellite.

2. Device can dvb-c and dvb-t -> two groups one from type terrestrial and one from type cable.

3. Device can only dvb-t -> only one group from type terrestrial
Comment 10 Stefan Ringel 2014-03-09 17:20:11 UTC
(In reply to comment #8)
> Review of attachment 271070 [details] [review]:
> ::: client/gnomedvb/DVBModel.py
> @@ +72,3 @@
> +                            dev_t = copy.copy(dev)
> +                            dev_t.name = info["name"]
> +                            dev_t.type = 1
> 
> Avoid magic numbers of delivery system type.

I will add constant value here like AdapterType enum. But I don't know how.
Comment 11 Stefan Ringel 2014-03-09 17:27:37 UTC
(In reply to comment #8)
> Review of attachment 271070 [details] [review]:
> Use a switch statement. It would also be possible to use bit masks and use a
> bit-wise and instead. This applies for the other uses of DvbSrcDelsys as well.

switch I must see, but bit masks don't work for enumerations. Delsys property is the same like DVBv5-API use and goes bypass to the frontend.
Comment 12 Stefan Ringel 2014-03-09 17:36:08 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > Review of attachment 271070 [details] [review] [details]:
> > Use a switch statement. It would also be possible to use bit masks and use a
> > bit-wise and instead. This applies for the other uses of DvbSrcDelsys as well.
> 
> switch I must see, but bit masks don't work for enumerations. Delsys property
> is the same like DVBv5-API use and goes bypass to the frontend.

a switch I think, don't work. the medthod must look each registred delivery system, which the device can (we have not a single delivery system). please look into method setAdapterTypeAndName.
Comment 13 Stefan Ringel 2014-03-17 12:52:31 UTC
Created attachment 272143 [details] [review]
change to Gstreamer-mpegts library version >= 1.3.0.1 (Git)
Comment 14 Stefan Ringel 2014-03-17 12:52:59 UTC
Created attachment 272144 [details] [review]
change device managment to handle multiple delivery systems
Comment 15 Stefan Ringel 2014-03-23 16:20:08 UTC
Created attachment 272697 [details] [review]
Bugfix pad linking
Comment 16 Stefan Ringel 2014-03-23 16:20:38 UTC
Created attachment 272698 [details] [review]
change to rtsp-server => 1.3.0.1
Comment 17 Stefan Ringel 2014-03-23 16:28:04 UTC
Created attachment 272700 [details] [review]
correction vapi
Comment 18 Sebastian Pölsterl 2014-03-23 20:28:34 UTC
Review of attachment 272144 [details] [review]:

Thanks a lot for updating the patches. I added some comments. However, I'm unable to compile it and get the following error message:

src/io/ChannelListReader.vala:59.22-59.38: error: The name `DVB_T' does not exist in the context of `DVB.AdapterType'
                case AdapterType.DVB_T:
                     ^^^^^^^^^^^^^^^^^
src/io/ChannelListReader.vala:59.22-59.38: error: Expression must be constant
                case AdapterType.DVB_T:
                     ^^^^^^^^^^^^^^^^^
src/Terrestrial/TerrestrialChannel.vala:54.35-54.45: error: The name `Delsys' does not exist in the context of `DVB.TerrestrialChannel'
            source.set ("delsys", this.Delsys);
                                  ^^^^^^^^^^^
src/io/ChannelListReader.vala:63.22-63.38: error: The name `DVB_S' does not exist in the context of `DVB.AdapterType'
                case AdapterType.DVB_S:
                     ^^^^^^^^^^^^^^^^^
src/io/ChannelListReader.vala:63.22-63.38: error: Expression must be constant
                case AdapterType.DVB_S:
                     ^^^^^^^^^^^^^^^^^
src/io/ChannelListReader.vala:67.22-67.38: error: The name `DVB_C' does not exist in the context of `DVB.AdapterType'
                case AdapterType.DVB_C:
                     ^^^^^^^^^^^^^^^^^
src/io/ChannelListReader.vala:67.22-67.38: error: Expression must be constant
                case AdapterType.DVB_C:
                     ^^^^^^^^^^^^^^^^^
src/Scanner.vala:604.29-604.47: error: The name `ServiceType' does not exist in the context of `DVB.Channel?'
                            channel.ServiceType = type;
                            ^^^^^^^^^^^^^^^^^^^

::: client/gnomedvb/DBusWrapper.py
@@ +47,2 @@
 def _default_error_handler_func(*args):
+    print("Error: " + str(args)) #, file=sys.stderr)

An error message should be printed on stderr not stdout

::: src/Device.vala
@@ +92,3 @@
+                }
+            }
+            return ret;

Just return false here

@@ +108,3 @@
+                }
+            }
+            return ret;

Just return false here

@@ +125,3 @@
+                }
+            }
+            return ret;

Just return false here

@@ +145,3 @@
+                }
+            }
+            return ret;

Just return false here

@@ +161,3 @@
+                }
+            }
+            return ret;

Just return false here

@@ +177,3 @@
+                }
+            }
+            return ret;

Just return false here

::: src/Manager.vala
@@ +40,3 @@
+        }
+
+        public GLib.List<Device> devs {

Use a libgee container

@@ +52,3 @@
+
+        // Collection of devices
+        private GLib.List<Device> devices;

Use a libgee container

@@ +147,3 @@
                     ScannerData data = new ScannerData ();
+                    /* change to universal Scanner */
+                    data.scanner = new TerrestrialScanner (device);

Is this still a todo? Otherwise, TerrestrialScanner is a very bad name for an universal scanner.

@@ +674,3 @@
+                            group = this.create_device_group_by_id (group_id);
+
+                        if (group != null)

Just use an else statement
Comment 19 Stefan Ringel 2014-03-24 09:04:42 UTC
Created attachment 272746 [details] [review]
correction vapi
Comment 20 Stefan Ringel 2014-03-24 09:05:20 UTC
Created attachment 272747 [details] [review]
change to rtsp-server => 1.3.0.1
Comment 21 Stefan Ringel 2014-03-26 15:30:00 UTC
Created attachment 273003 [details] [review]
change to dvb-v5 files
Comment 22 Stefan Ringel 2014-03-27 12:40:31 UTC
Created attachment 273081 [details] [review]
add missed files and bugfix arraylist cleanup
Comment 23 Sebastian Pölsterl 2014-04-05 20:33:29 UTC
Review of attachment 272747 [details] [review]:

::: src/rtsp/MediaFactory.vala
@@ +33,3 @@
         construct {
             this.set_shared (true);
+            log.debug ("MediaFactory()");

Since you are creating one MediaFactory for each channel, this debug information is not useful. Please remove it.

@@ +38,3 @@
+        private void on_media_unprepared () {
+            ChannelFactory channels_factory = this.group.channel_factory;
+            channels_factory.stop_channel (this.channel, this.payloader);

Free (set to null) this.group, this.payloader and this.player.

::: src/rygel/Services2.vala
@@ +200,3 @@
             foreach (Channel channel in this.device_group.Channels) {
                 this.create_service (channel);
+                Gst.RTSPMountPoints points = DVB.RTSPServer.server.get_mount_points ();

Why is creation of the gst-rtsp-server mounts happening inside the rygel module? Rygel is just used to export the channel information in a standard way (via DBus). Since it is possible to disable exporting this DBus interfaces, this would also completely disable streaming. This should be to independent parts, if anything, the Rygel interface depends on the rtsp mount points, not the other way around.

@@ +208,3 @@
+        public void delete_item_service (uint group_id) {
+            foreach (ChannelMediaItem2 item in this.items) {
+                Gst.RTSPMountPoints points = DVB.RTSPServer.server.get_mount_points ();

See my comment above.
Comment 24 Sebastian Pölsterl 2014-04-05 21:15:28 UTC
Review of attachment 273003 [details] [review]:

Tried scanning with an DVB-T device using gnome-dvb-setup in export mode (brute force scan). It works fine, channels show up duplicated in the UI, though. The channel file contains no duplicates.

::: client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py
@@ +34,1 @@
                  "/usr/share/dvb-apps",

I suppose, the old initial tuning data of dvb-apps is not supported anymore? If that is the case, checking the other directories is obsolete.

::: src/Cable/CableChannel.vala
@@ -44,3 @@
-        }
-
-        public override string to_string () {

Continue to provide to_string

::: src/Cable/DvbCScanningParam.vala
@@ +87,3 @@
+            DvbCScanningParam cparam = (DvbCScanningParam)param;
+
+            if (cparam.Frequency != this.Frequency)

Collapse into one if statement

::: src/Channel.vala
@@ -118,3 @@
          */
         public abstract void setup_dvb_source (Gst.Element source);
-        public abstract string to_string ();

Please continue to provide a method to pretty-print channels.

::: src/Satellite/DvbSScanningParam.vala
@@ +101,3 @@
+            DvbSScanningParam sparam = (DvbSScanningParam)param;
+
+            if (sparam.Frequency != this.Frequency)

Collapse into one if statement

::: src/Satellite/SatelliteChannel.vala
@@ -47,3 @@
         }
 
-        public override string to_string () {

Continue to provide to_string

::: src/Scanner.vala
@@ +314,1 @@
                 // Force that gst_structure_free is called

This comment is obviously wrong now.

@@ +655,3 @@
+                            log.debug ("Frequency: %u", freq);
+
+                            DvbTScanningParam dvbtp = new DvbTScanningParam ();

I would move this part to the DvbTScanningParam class as a new constructors, for instance DvbTScanningParam.new_from_descriptor. Same applies for cable and satellite.

@@ -813,3 @@
                         } else {
-                            log.debug ("Channel 0x%x is not valid: %s", sid,
-                                channel.to_string ());

Re-add once to_string has been implemented again.

::: src/Terrestrial/DvbTScanningParam.vala
@@ +119,3 @@
+            DvbTScanningParam tparam = (DvbTScanningParam)param;
+
+            if (tparam.Frequency != this.Frequency)

Collapse into one if statement

::: src/Terrestrial/TerrestrialChannel.vala
@@ -55,3 @@
         }
 
-        public override string to_string () {

Continue to provide to_string

::: src/io/ChannelListReader.vala
@@ +82,1 @@
+                    if (c != null && c.is_valid ())

The first condition was already checked on line 66 above.

@@ +98,1 @@
+            if (this.Type != AdapterType.TERRESTRIAL) return c;

Just return null without defining c first.

@@ +116,1 @@
+            if (this.Type != AdapterType.SATELLITE) return c;

Just return null without defining c first.

@@ +133,1 @@
+            if (this.Type != AdapterType.CABLE) return c;

Just return null without defining c first.

::: src/io/ScanningListReader.vala
@@ +38,3 @@
+            try {
+                this.file.load_from_file (keyfile, KeyFileFlags.NONE);
+                this.read_data ();

Don't do processing and IO in the constructor, but let caller call read_data. This also has the advantage that KeyFile can be used locally only and there is no need to create an attribute holding it, since all we are interested in is the list of ScanningParam

@@ +123,3 @@
+        }
+
+        public unowned List<ScanningParam> getScanningParams () {

Use properties for this.
Comment 25 Sebastian Pölsterl 2014-04-05 21:20:36 UTC
Review of attachment 273081 [details] [review]:

I'm not sure what the best way to providing initial tuning data or channel files is. My feeling is that it should be separate from the daemon. Also, since this and previous patch fix problems from other other patches, please provide a set of patches where these changes are merged and mark the older patches as obsolete.
Comment 26 Stefan Ringel 2014-04-12 18:58:04 UTC
Created attachment 274181 [details] [review]
correction vapi
Comment 27 Stefan Ringel 2014-04-12 18:59:00 UTC
Created attachment 274182 [details] [review]
change to gstreamer 1.3.0.1
Comment 28 Sebastian Pölsterl 2014-05-03 15:58:24 UTC
Review of attachment 274182 [details] [review]:

Looks very good, just some minor modifications are required.

::: client/gnomedvb/DVBModel.py
@@ +56,3 @@
         for info in gnomedvb.get_dvb_devices():
             dev = Device (0, "Unknown", info["adapter"], info["frontend"],
+                0)

What does the last "0" refer to here? Please use an expressive variable here instead of a magic number.

::: client/gnomedvb/ui/wizard/__init__.py
@@ +6,1 @@
 DVB_TYPE_TO_DESC = {

This is duplicate and already available from client/gnomedvb/ui/preferences/__init__.py

::: client/gnomedvb/ui/wizard/pages/AdaptersPage.py
@@ +186,3 @@
+                            dev_t.name = info["name"]
+                            dev_t.type = GROUP_TERRESTRIAL
+                            print dev_t.type

Remove print

@@ +197,3 @@
+                            dev_s.name = info["name"]
+                            dev_s.type = GROUP_SATELLITE
+                            print dev_s.type

Remove print

@@ +208,3 @@
+                            dev_c.name = info["name"]
+                            dev_c.type = GROUP_CABLE
+                            print dev_c.type

Remove print

::: src/Manager.vala
@@ +693,3 @@
                 if (action == "add") {
+                    /* Add dvb_device to List */
+                    Device dvb_device = new Device(adapter, frontend);

This is duplicate code that already is available in first_add_device

::: src/MpegTsEnums.vala
@@ +356,3 @@
+                case DvbSrcDelsys.SYS_DVBC_ANNEX_C:
+                case DvbSrcDelsys.SYS_ISDBC:
+                    if (type == AdapterType.CABLE)

Replace with a single return statement

@@ +366,3 @@
+                case DvbSrcDelsys.SYS_ATSCMH:
+                case DvbSrcDelsys.SYS_DVBT2:
+                    if (type == AdapterType.TERRESTRIAL)

Replace with a single return statement

@@ +375,3 @@
+                case DvbSrcDelsys.SYS_TURBO:
+                case DvbSrcDelsys.SYS_ISDBS:
+                    if (type == AdapterType.SATELLITE)

Replace with a single return statement

::: src/Scanner.vala
@@ +70,3 @@
          * All the frequencies that have been scanned already
          */
+        private Gee.ArrayList<Parameter> scanned_scanning_params;

You should rather use a set here, since random access isn't required. That also means you have to provide a hash and equal function for Parameter

::: src/database/sqlite/SqliteConfigTimersStore.vala
@@ +331,3 @@
+        }
+
+        public bool last_device (uint group_id) throws SqlError {

Rename to is_last_device

@@ +343,3 @@
+            if (this.select_devices_statement.step() != Sqlite.ROW) {
+                if (this.select_devices_statement.data_count () == 0)
+                    val = true;

Add break statement since return value wouldn't change after set once.
Comment 29 Stefan Ringel 2014-05-09 19:02:34 UTC
Created attachment 276260 [details] [review]
change to gstreamer 1.3.1
Comment 30 Sebastian Pölsterl 2014-05-10 19:20:40 UTC
Review of attachment 276260 [details] [review]:

Almost perfect, just a couple of small changes are required.

::: src/Manager.vala
@@ +512,3 @@
+                foreach (Device d in this.devices) {
+                    if (d.Adapter == adapter && d.Frontend == frontend)
+                        ret = d;

I suppose there can only be one Device for one combination of adapter and frontend? If that is the case, you should add a break statement in the if-clause.

@@ +616,3 @@
+        }
+
+        private Device new_device (GUdev.Device device, string dev_file,

This should be moved to the Device class as an alternative constructor. Without the this.devices.add part, of course.

::: src/Scanner.vala
@@ +334,3 @@
+            foreach (Parameter s in this.scanned_scanning_params) {
+                if (s.equal(param))
+                    eq = true;

Add a break statement here.

@@ +671,3 @@
+                                    foreach (Channel channel in this.channels) {
+                                        if (channel.Param.Frequency == tdesc.frequency)
+                                            channel.Param = dvbtp;

Add a break statement here.
Comment 31 Stefan Ringel 2014-05-11 09:15:43 UTC
Created attachment 276319 [details] [review]
change to gstreamer 1.3.1
Comment 32 Stefan Ringel 2014-05-11 09:17:02 UTC
Created attachment 276320 [details] [review]
change to gstreamer 1.3.1
Comment 33 Stefan Ringel 2014-05-11 09:18:02 UTC
Created attachment 276321 [details] [review]
correction vapi
Comment 34 Sebastian Pölsterl 2014-05-11 10:26:25 UTC
Review of attachment 276320 [details] [review]:

Looks fine, can be committed once the vala changes have been accepted.
Comment 35 Sebastian Pölsterl 2014-05-11 12:58:45 UTC
*** Bug 728975 has been marked as a duplicate of this bug. ***
Comment 36 Sebastian Pölsterl 2014-05-11 12:59:19 UTC
*** Bug 729618 has been marked as a duplicate of this bug. ***
Comment 37 steven vanden branden 2014-05-13 18:13:35 UTC
hello i am trying to test this on Archlinux, against what project does the vapi patch needs to be run?
because i patched the master vala branch but the autogen does not seem to find the vapi file.
i already installed gstreamer 1.3.1 and the bad,base plugins libs.

ps where should i ask this question in the future, i suspect this is not the place for it, 
my apologies
Comment 38 Stefan Ringel 2014-05-13 19:06:11 UTC
(In reply to comment #37)
> hello i am trying to test this on Archlinux, against what project does the vapi
> patch needs to be run?
> because i patched the master vala branch but the autogen does not seem to find
> the vapi file.
> i already installed gstreamer 1.3.1 and the bad,base plugins libs.
> 
> ps where should i ask this question in the future, i suspect this is not the
> place for it, 
> my apologies

in vala vapi/Makefile.am I'm forgotten to add something. So that it cannot install this file. 
ps: I have manually install it for myself.
Comment 39 steven vanden branden 2014-05-13 19:11:01 UTC
well i added it to the makefile but propably not correct,
whats the location/map where this vapi file should reside? then i can install it manually to test also, btw does this get included in vala in the future and where do i find the merge/pull request for it?
Comment 40 Stefan Ringel 2014-05-13 19:22:03 UTC
(In reply to comment #39)
> well i added it to the makefile but propably not correct,
> whats the location/map where this vapi file should reside? then i can install
> it manually to test also, btw does this get included in vala in the future and
> where do i find the merge/pull request for it?

for manually install: copy it as root into the vala vapi directory (i.e. /usr/share/vala-0.24/vapi).
ps: Look to https://bugzilla.gnome.org/show_bug.cgi?id=723910
Comment 41 Sebastian Pölsterl 2014-05-13 19:23:45 UTC
(In reply to comment #39)
> btw does this get included in vala in the future and
> where do i find the merge/pull request for it?

We are currently working on getting the patches upstream to vala and gstreamer,
respectively.
Comment 42 Evan Nemerson 2014-05-28 20:42:44 UTC
I just updated the gstreamer bindings in vala to current gstreamer git.
Comment 43 Stefan Ringel 2014-05-28 20:51:04 UTC
(In reply to comment #42)
> I just updated the gstreamer bindings in vala to current gstreamer git.

and the gstreamer-mpegts?
Comment 44 Evan Nemerson 2014-05-28 21:29:20 UTC
I don't think we want to carry bindings for individual gstreamer plugins in Vala, just gstreamer and gst-plugins-base.  There are already an absurd number of gstreamer libraries.
Comment 45 Stefan Ringel 2014-05-29 04:50:45 UTC
(In reply to comment #44)
> I don't think we want to carry bindings for individual gstreamer plugins in
> Vala, just gstreamer and gst-plugins-base.  There are already an absurd number
> of gstreamer libraries.

gstreamer-mpegts is not a plugin! What is with gstreamer-rtsp-server? Has you updated it (look to attachment #276321 [details]).
Comment 46 Evan Nemerson 2014-05-29 05:07:01 UTC
(In reply to comment #45)
> (In reply to comment #44)
> > I don't think we want to carry bindings for individual gstreamer plugins in
> > Vala, just gstreamer and gst-plugins-base.  There are already an absurd number
> > of gstreamer libraries.
> 
> gstreamer-mpegts is not a plugin!

The pkg-config file is in gst-plugins-bad...

> What is with gstreamer-rtsp-server? Has you
> updated it (look to attachment #276321 [details]).

If it needs to be updated please file a bug against Vala.  You'll have to do that whenever you need an update since I don't think anyone makes a habit of building stuff not in the default jhbuild moduleset.
Comment 47 Stefan Ringel 2014-05-29 05:09:57 UTC
(In reply to comment #46)
> (In reply to comment #45)
> > (In reply to comment #44)
> > > I don't think we want to carry bindings for individual gstreamer plugins in
> > > Vala, just gstreamer and gst-plugins-base.  There are already an absurd number
> > > of gstreamer libraries.
> > 
> > gstreamer-mpegts is not a plugin!
> 
> The pkg-config file is in gst-plugins-bad...
> 
> > What is with gstreamer-rtsp-server? Has you
> > updated it (look to attachment #276321 [details] [details]).
> 
> If it needs to be updated please file a bug against Vala.  You'll have to do
> that whenever you need an update since I don't think anyone makes a habit of
> building stuff not in the default jhbuild moduleset.

Why you don't use the the patch from bug https://bugzilla.gnome.org/show_bug.cgi?id=723910
Comment 48 Stefan Ringel 2014-05-29 05:21:34 UTC
(In reply to comment #46)

> > gstreamer-mpegts is not a plugin!
> 
> The pkg-config file is in gst-plugins-bad...

what is wrong to update it as vala bindings, it is required for this project.
Comment 49 Evan Nemerson 2014-05-29 05:35:39 UTC
(In reply to comment #47)
> Why you don't use the the patch from bug
> https://bugzilla.gnome.org/show_bug.cgi?id=723910

Answered in that bug.
Comment 50 steven vanden branden 2014-05-31 19:46:58 UTC
so to list it up:
latest gstreamer from git
vala-git with patch for gstreamer
gst-rtsp-server-1.0-git

- deleted the cast for the gstreamer binding

does the latest rtsp-server needs some patch or the vapi for the gstreamer-rtsp server?
 because i get this error:

src/rtsp/MediaFactory.vala:46.9-46.51: error: overriding method `DVB.MediaFactory.create_element' is incompatible with base method `Gst.RTSPMediaFactory.create_element': incompatible return type.
        public override Gst.Element? create_element (Gst.RTSP.Url url) {
Comment 51 Stefan Ringel 2014-05-31 20:00:31 UTC
(In reply to comment #50)

> src/rtsp/MediaFactory.vala:46.9-46.51: error: overriding method
> `DVB.MediaFactory.create_element' is incompatible with base method
> `Gst.RTSPMediaFactory.create_element': incompatible return type.
>         public override Gst.Element? create_element (Gst.RTSP.Url url) {

delete the ?-mark.
Comment 52 steven vanden branden 2014-06-01 09:29:13 UTC
i figured that but the question is , does the patch have to change or does the vapi is at fault?
otherwise i will update the patch to correct these issues and also this one:

src/rtsp/Server.vala:87.36-87.43: error: Argument 1: Cannot convert from `string' to `Gst.RTSP.Url'
            if (session.get_media (this.url, out matched) != null) {
Comment 53 steven vanden branden 2014-06-01 09:31:47 UTC
this is not working because the functions return null if there is an error, i will look into fixing the vapi instead?

src/rtsp/MediaFactory.vala:80.17-80.28: warning: `null' incompatible with return type `Gst.Element`
                return null;
Comment 54 Stefan Ringel 2014-06-01 10:04:25 UTC
(In reply to comment #50)
> so to list it up:
> latest gstreamer from git
> vala-git with patch for gstreamer
> gst-rtsp-server-1.0-git
> 
> - deleted the cast for the gstreamer binding
> 
> does the latest rtsp-server needs some patch or the vapi for the gstreamer-rtsp
> server?
>  because i get this error:
> 
> src/rtsp/MediaFactory.vala:46.9-46.51: error: overriding method
> `DVB.MediaFactory.create_element' is incompatible with base method
> `Gst.RTSPMediaFactory.create_element': incompatible return type.
>         public override Gst.Element? create_element (Gst.RTSP.Url url) {

(In reply to comment #53)
> this is not working because the functions return null if there is an error, i
> will look into fixing the vapi instead?
> 
> src/rtsp/MediaFactory.vala:80.17-80.28: warning: `null' incompatible with
> return type `Gst.Element`
>                 return null;

I think gstreamer-rtsp-server hasn't *.vapi updated completly look into #276321.
Comment 55 steven vanden branden 2014-06-01 12:16:49 UTC
i managed to fix all these , it is indeed the vapi, also the RTSP.url is needed instead of a string, now when i run it cannot find the gnomedvb module. so my question is is this already python3 based , or still python2? and isnt it an option te rewrite the python interface part in vala?
Comment 56 steven vanden branden 2014-06-01 12:50:29 UTC
sorry, its an install problem of the package i made to install it, so it works
Comment 57 steven vanden branden 2014-06-02 15:58:36 UTC
im trying to get it to run this is the output of the deamon notice the Adding Device (null) part:

default      DEBUG      Main.vala:99: Has dvbsrc >= 1.3.1: true
default      DEBUG      Main.vala:99: Has dvbbasebin >= 1.3.1: true
default      DEBUG      Main.vala:99: Has tsparse >= 1.3.1: true
default      DEBUG      Main.vala:99: Has rtpmp2tpay >= 1.3.1: true
default      DEBUG      Device.vala:73: Adding Device: (null)
default      DEBUG      Device.vala:87: UID: TBS-Tech_DVBS2BOX:STV090x Multistandard
default      INFO       Utils.vala:240: Creating D-Bus service org.gnome.DVB
default      INFO       Server.vala:52: Starting RTSP server
default      WARNING    Settings.vala:97: Key file does not have group 'streaming'
default      INFO       Utils.vala:240: Creating D-Bus service org.gnome.UPnP.MediaServer2.DVBDaemon
default      INFO       Main.vala:130: Restoring 0 device groups
default      INFO       Main.vala:64: Creating new RecordingsStore D-Bus service
default      DEBUG      Manager.vala:196: 0
(gnome-dvb-daemon:1235): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed
Segmentatiefout (geheugendump gemaakt)

and starting the deamon gives this error:

Traceback (most recent call last):
  • File "/usr/lib/python3.4/site-packages/gi/overrides/Gio.py", line 143 in __async_result_handler
    result_callback(obj, self._unpack_result(ret), real_user_data)
  • File "/usr/lib/python3.4/site-packages/gnomedvb/DVBModel.py", line 43 in groups_handler
    result_handler([DeviceGroup(path) for path in paths])
  • File "/usr/lib/python3.4/site-packages/gnomedvb/ui/wizard/pages/AdaptersPage.py", line 175 in registered_handler
    self.__model.get_all_devices(result_handler=devices_handler)
  • File "/usr/lib/python3.4/site-packages/gnomedvb/DVBModel.py", line 61 in get_all_devices
    result_handler(devs)
  • File "/usr/lib/python3.4/site-packages/gnomedvb/ui/wizard/pages/AdaptersPage.py", line 182 in devices_handler
    dev.frontend)
  • File "/usr/lib/python3.4/site-packages/gnomedvb/DBusWrapper.py", line 54 in get_adapter_info
    info_t, success = manager.get_adapter_info(adapter, frontend)
  • File "/usr/lib/python3.4/site-packages/gnomedvb/DBusWrapper.py", line 145 in get_adapter_info
    return self.manager.GetAdapterInfo('(uu)', adapter, frontend, **kwargs)
  • File "/usr/lib/python3.4/site-packages/gi/overrides/Gio.py", line 171 in __call__
    None)
gi._glib.GError: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

any clues on how to debug further? i am tempted to open another bug for this but it is based on the patch in this bug so
Comment 58 Stefan Ringel 2014-06-05 13:12:18 UTC
(In reply to comment #57)
> im trying to get it to run this is the output of the deamon notice the Adding
> Device (null) part:
> 
> default      DEBUG      Main.vala:99: Has dvbsrc >= 1.3.1: true
> default      DEBUG      Main.vala:99: Has dvbbasebin >= 1.3.1: true
> default      DEBUG      Main.vala:99: Has tsparse >= 1.3.1: true
> default      DEBUG      Main.vala:99: Has rtpmp2tpay >= 1.3.1: true
> default      DEBUG      Device.vala:73: Adding Device: (null)

no device name ?

can you test that:

           GUdev.Device parent = device.get_parent ();
            string name = this.Name;

-            string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
+           var string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
            tmp += ": " + name;
            this.Name = tmp;
            log.debug("Adding Device: %s", tmp);
            this.DevFile = dev_file;

or a different variable name for "tmp" i.e. tmp_name
Comment 59 steven vanden branden 2014-06-05 18:41:59 UTC
> no device name ?
> 
> can you test that:

hello,

wel no i cannot anymore because my hdd crashed , so i restarted the process on another pc,

i suspect i compiled the deamon with python2 instead of 3 , so i am trying to compile with python 3 now:

but i got this error:

checking for /usr/bin/python extension module directory... ${exec_prefix}/lib/python3.4/site-packages
checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
SyntaxError: invalid syntax
  • File "<string>", line 1
    import sys; print sys.exec_prefix

any clue about this it seems to search for a file "<string>" but i dont know python so no clue whats the error here
Comment 60 steven vanden branden 2014-06-05 19:13:03 UTC
ps i tested it in python2 by setting temp to TEST, got this so the follewing returns null:

default      DEBUG      Device.vala:74: Adding Device: TEST: STV090x Multistandard
default      DEBUG      Device.vala:88: UID: TBS-Tech_DVBS2BOX:STV090x Multistandard

string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
	    tmp="TEST";
            tmp += ": " + name;
            this.Name = tmp;
            log.debug("Adding Device: %s", tmp);
            this.DevFile = dev_file;
Comment 61 Sebastian Pölsterl 2014-06-06 09:07:59 UTC
(In reply to comment #59)
> checking for /usr/bin/python extension module directory...
> ${exec_prefix}/lib/python3.4/site-packages
> checking for headers required to compile python extensions...   File
> "<string>", line 1
>     import sys; print sys.prefix
> SyntaxError: invalid syntax
> 

The print is a function in python3 and not a statement anymore as in python2. From your traceback it is not clear which application printed the error. Are you trying to start gnome-dvb-control, gnome-dvb-setup or totem?
Comment 62 steven vanden branden 2014-06-06 10:00:28 UTC
(In reply to comment #61)
no im not trying to run anything , im trying to compiled the patched dvb-daemon gst1.0 branch:

i got this when running PYTHON=/usr/bin/python ./autogen --prefix=/usr

Running ./configure --enable-maintainer-mode --prefix=/usr ...
...
checking GStreamer 1.0 inspection tool... yes
checking GStreamer 1.0 tsparse plugin... yes
checking GStreamer 1.0 dvbbasebin plugin... yes
checking GStreamer 1.0 dvbsrc plugin... yes
checking GStreamer 1.0 rtpmp2tpay plugin... yes
checking whether /usr/bin/python version is >= 2.5... yes
checking for /usr/bin/python version... 3.4
checking for /usr/bin/python platform... linux
checking for /usr/bin/python script directory... ${prefix}/lib/python3.4/site-packages
checking for /usr/bin/python extension module directory... ${exec_prefix}/lib/python3.4/site-packages
checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
                        ^
SyntaxError: invalid syntax
  • File "<string>", line 1
    import sys; print sys.exec_prefix
SyntaxError: invalid syntax
not found
configure: error: could not find Python headers
Comment 63 steven vanden branden 2014-06-12 18:12:47 UTC
the change to gstreamer 1.3.1 has an typo:

on line 3890 it should be symbol
+            source.set ("sombol-rate", this.SymbolRate);

furthermore i would like the propose a patch for the null return value error i get from this around line 1255:

+string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
+            tmp += ": " + name;
+            this.Name = tmp;
+            log.debug("Adding Device: %s", tmp);
+            this.DevFile = dev_file;

i would like to make it like this

+string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
+           if(tmp==null){
+                  tmp="Unknown"
+                   log.debug("property ID_MODEL_FROM_DATABASE returns null, setting to Unknown");
+             }
+            tmp += ": " + name;
+            this.Name = tmp;
+            log.debug("Adding Device: %s", tmp);
+            this.DevFile = dev_file;
Comment 64 steven vanden branden 2014-06-12 18:13:47 UTC
tmp="Unknown";

typo corretion
Comment 65 Stefan Ringel 2014-06-12 18:22:03 UTC
(In reply to comment #63)
> the change to gstreamer 1.3.1 has an typo:
> 
> on line 3890 it should be symbol
> +            source.set ("sombol-rate", this.SymbolRate);
> 

yes, "symbol-rate".
Comment 66 Stefan Ringel 2014-06-24 17:25:12 UTC
Created attachment 279133 [details] [review]
update mpegts vapi to git master
Comment 67 Stefan Ringel 2014-06-24 17:26:49 UTC
Created attachment 279134 [details] [review]
update mpegts vapi to git master
Comment 68 Stefan Ringel 2014-06-27 08:13:44 UTC
Created attachment 279362 [details] [review]
update mpegts vapi to git master
Comment 69 Stefan Ringel 2014-06-30 11:35:06 UTC
Created attachment 279593 [details] [review]
update mpegts vapi to git master and rtsp-server vapi
Comment 70 steven vanden branden 2014-07-01 21:34:50 UTC
got this when compiling:

  CC       src/rtsp/gnome_dvb_daemon-MediaFactory.o
src/rtsp/MediaFactory.c: In functie ‘dvb_media_factory_class_init’:
src/rtsp/MediaFactory.c:486:45: fout: invalid type argument of ‘->’ (have ‘int’)
  GST_RTSP_SERVER_MEDIA_FACTORY_CLASS (klass)->create_element = dvb_media_factory_real_create_element;
                                             ^
src/rtsp/MediaFactory.c:487:45: fout: invalid type argument of ‘->’ (have ‘int’)
  GST_RTSP_SERVER_MEDIA_FACTORY_CLASS (klass)->create_pipeline = dvb_media_factory_real_create_pipeline;

can this be that i have a gstreamer-mpegts-1.0.vapi somewhere that is not correct?
Comment 71 steven vanden branden 2014-07-01 22:09:27 UTC
> can this be that i have a gstreamer-mpegts-1.0.vapi somewhere that is not
> correct?
have checked , file does not exist anyware else
Comment 72 steven vanden branden 2014-07-01 22:18:52 UTC
is the rtsp server vapi based on the git version or the 1.3.90 version?
Comment 73 steven vanden branden 2014-07-01 22:39:15 UTC
makes no difference, i dont have a clue anymore
Comment 74 Stefan Ringel 2014-07-02 06:15:29 UTC
the final verion is designed with Gstreamer 1.4 Release and vala 0.26 in the minimum.

(In reply to comment #72)
> is the rtsp server vapi based on the git version or the 1.3.90 version?

no the vapi is generated from the git master (1.3.90).

(In reply to comment #71)
> > can this be that i have a gstreamer-mpegts-1.0.vapi somewhere that is not
> > correct?
> have checked , file does not exist anyware else

vala has today add the lastest patch to git master.
Comment 75 Stefan Ringel 2014-07-02 06:56:52 UTC
(In reply to comment #72)
> is the rtsp server vapi based on the git version or the 1.3.90 version?

git master, because this patch is added after release 1.3.90 
http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/commit/?id=41d1ef7ed3df2471bea4894b6106020a74084f19
Comment 76 steven vanden branden 2014-07-02 09:44:33 UTC
congrats! the deamon is running fine, the only part is the python interface that will not work here, is it compiled against python3 or python2 and are there any special (like git versions) packages needed for the deamon to work, when running gnome-dvb-setup under python2.7 this is the error i get at the device selection screen:

Traceback (most recent call last):
  • File "/usr/lib/python2.7/site-packages/gi/overrides/Gio.py", line 143 in __async_result_handler
    result_callback(obj, self._unpack_result(ret), real_user_data)
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/DVBModel.py", line 43 in groups_handler
    result_handler([DeviceGroup(path) for path in paths])
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/ui/wizard/pages/AdaptersPage.py", line 175 in registered_handler
    self.__model.get_all_devices(result_handler=devices_handler)
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/DVBModel.py", line 61 in get_all_devices
    result_handler(devs)
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/ui/wizard/pages/AdaptersPage.py", line 182 in devices_handler
    dev.frontend)
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/DBusWrapper.py", line 54 in get_adapter_info
    info_t, success = manager.get_adapter_info(adapter, frontend)
  • File "/home/steven/linux/dvb/gnome-dvb-daemon-git/src/gnome-dvb-daemon/client/gnomedvb/DBusWrapper.py", line 145 in get_adapter_info
    return self.manager.GetAdapterInfo('(uu)', adapter, frontend, **kwargs)
  • File "/usr/lib/python2.7/site-packages/gi/overrides/Gio.py", line 171 in __call__
    None)
gi._glib.GError: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

Comment 77 steven vanden branden 2014-07-02 10:05:42 UTC
the deamon still fails here because the proposed patches do not include a proposed fix for my driver that does not provide the ID_MODEL_FROM_DATABASE and the delivery system, so the deamon is ok, but maybe we should print an error like this for the name?

string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
           if(tmp==null){
                  tmp="Unknown";
                   log.debug("property ID_MODEL_FROM_DATABASE not provided by driver,
setting to Unknown");
            }
            tmp += ": " + name;
            this.Name = tmp;
            log.debug("Adding Device: %s", tmp);
            this.DevFile = dev_file;

this way even if the driver provides no name for the model we do not get an segmentation fault like this:

(gnome-dvb-daemon:32466): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed
Segmentatiefout
Comment 78 steven vanden branden 2014-07-02 10:15:14 UTC
furthermore the python setup script cannot find the dvb-apps, so i cannot tune for channels , and i cannot find an example file for dvb-S2 channels in the new format either
Comment 79 Stefan Ringel 2014-07-02 10:45:13 UTC
(In reply to comment #78)
> furthermore the python setup script cannot find the dvb-apps, so i cannot tune
> for channels , and i cannot find an example file for dvb-S2 channels in the new
> format either

dvb-apps is not needed anymore, channels stores in new file format (dvb-v5).

example:

[CHANNEL1]
FREQUENCY = 10498
SYMBOL_RATE = 22000
DELIVARY_SYSTEM = DVB-S2

etc.

dvb-s2, and dvb-t2 don't support but it's easy to add them. Override the parameter class like DvbSParameter class, and add a few stuff in ChannelListWriter, ChannelListReader and ScanningListReader.
Comment 80 Stefan Ringel 2014-07-02 10:54:43 UTC
(In reply to comment #79)

> 
> example:
> 
> [CHANNEL1]
> FREQUENCY = 10498
> SYMBOL_RATE = 22000
> DELIVARY_SYSTEM = DVB-S2
> 
> etc.
> 

Upps a little bad.

[CHANNEL1]
FREQEUNCY = 10498000
SYMBOL_RATE = 22000000
DELIVARY_SYSTEM = DVBS2
POLARISATION = VERTICAL
INNER_FEC = 5/6
ORBITAL_POSITION = 19.2
ROLL_OFF = 35
PILOT = AUTO
STREAM_ID = -1
SAT_NUMBER = -1
Comment 81 Stefan Ringel 2014-07-02 10:59:47 UTC
(In reply to comment #77)
> the deamon still fails here because the proposed patches do not include a
> proposed fix for my driver that does not provide the ID_MODEL_FROM_DATABASE and
> the delivery system, so the deamon is ok, but maybe we should print an error
> like this for the name?
> 

Can you look into udev-browse? Has it ID_MODEL_FROM_DATABASE for your dvb adapter?
Comment 82 steven vanden branden 2014-07-02 11:32:07 UTC
 Can you look into udev-browse? Has it ID_MODEL_FROM_DATABASE for your dvb
 adapter?

no it does not , that why i get the error, i have compiled the driver myself and am trying to find out where to add it to the driver so the workaround is not needed, but i have no clue where to start the search.

also the deamon spits out this, meaning the driver does not put out the delivery systems either.

 (gnome-dvb-daemon:11632): WARNING **: Device.vala:339: Cannot enumerate delivery systems from frontend device "/dev/dvb/adapter0/frontend0". gstdvbsrc.c(1152): gst_dvbsrc_open_frontend (): /GstPipeline:type_name/GstDvbSrc:test_dvbsrc:
system error: Invalid argument
Comment 83 Stefan Ringel 2014-07-02 11:38:12 UTC
(In reply to comment #82)
>  Can you look into udev-browse? Has it ID_MODEL_FROM_DATABASE for your dvb
>  adapter?
> 
> no it does not , that why i get the error, i have compiled the driver myself
> and am trying to find out where to add it to the driver so the workaround is
> not needed, but i have no clue where to start the search.
> 
> also the deamon spits out this, meaning the driver does not put out the
> delivery systems either.
> 
>  (gnome-dvb-daemon:11632): WARNING **: Device.vala:339: Cannot enumerate
> delivery systems from frontend device "/dev/dvb/adapter0/frontend0".
> gstdvbsrc.c(1152): gst_dvbsrc_open_frontend ():
> /GstPipeline:type_name/GstDvbSrc:test_dvbsrc:
> system error: Invalid argument

That coming from dvbsrc. Your driver is that based on dvbv3 or dvbv5?
Comment 84 steven vanden branden 2014-07-02 11:43:02 UTC
the info from dvb-fe-tool  status this so i guess its bases on dvb api 5.3

INFO     Device STV090x Multistandard (/dev/dvb/adapter0/frontend0)
capabilities:
INFO          CAN_2G_MODULATION
INFO          CAN_FEC_AUTO
INFO          CAN_INVERSION_AUTO
INFO          CAN_QPSK
INFO     DVB API Version 5.3, Current v5 delivery system: DVBS
INFO     Supported delivery systems: 
INFO         [DVBS]
INFO          DVBS2
INFO     Warning: new delivery systems like ISDB-T, ISDB-S, DMB-TH, DSS,
ATSC-MH will be miss-detected by a DVBv5.4 or earlier API call
Comment 85 Stefan Ringel 2014-07-02 11:54:43 UTC
(In reply to comment #82)
>  Can you look into udev-browse? Has it ID_MODEL_FROM_DATABASE for your dvb
>  adapter?
> 
> no it does not , that why i get the error, i have compiled the driver myself
> and am trying to find out where to add it to the driver so the workaround is
> not needed, but i have no clue where to start the search.
> 
> also the deamon spits out this, meaning the driver does not put out the
> delivery systems either.
> 
>  (gnome-dvb-daemon:11632): WARNING **: Device.vala:339: Cannot enumerate
> delivery systems from frontend device "/dev/dvb/adapter0/frontend0".
> gstdvbsrc.c(1152): gst_dvbsrc_open_frontend ():
> /GstPipeline:type_name/GstDvbSrc:test_dvbsrc:
> system error: Invalid argument

restart pc, etc?
Comment 86 steven vanden branden 2014-07-02 12:12:55 UTC
ok my bad that fixed it , but i get errors on the proposed channel import, i am going to try a DVB-S CHANNEL first to see if that works, ps the channel examples gives some errors with the deamon so i geuss that are just typo's
ill report back when i know more.
Comment 87 Stefan Ringel 2014-07-02 12:22:45 UTC
in device.vala, setAdapterTypeAndName:

add after line:
dvbsrc.set ("frontend", frontend);

the line

dvbsrc.set ("timeout", 10000000);

or 

dvbsrc.set ("tuning-timeout", 50000000);
Comment 88 steven vanden branden 2014-07-02 12:29:15 UTC
DvbSparameter has another typo:

   112         source.set ("symbol-rate", this.SymbolRate);

was sombol rate instead of symbol-rate.
Comment 89 Stefan Ringel 2014-07-02 12:32:27 UTC
(In reply to comment #88)
> DvbSparameter has another typo:
> 
>    112         source.set ("symbol-rate", this.SymbolRate);
> 
> was sombol rate instead of symbol-rate.

ups, right, overseen.
Comment 90 steven vanden branden 2014-07-02 12:44:55 UTC
(In reply to comment #87)
> in device.vala, setAdapterTypeAndName:
> 
> add after line:
> dvbsrc.set ("frontend", frontend);
> 
> the line
> 
> dvbsrc.set ("timeout", 10000000);
> 
> or 
> 
> dvbsrc.set ("tuning-timeout", 50000000);

not needed antmore afther reboot since it does not error out anymore,
Comment 91 steven vanden branden 2014-07-02 13:12:56 UTC
free to air channel like this works!

[CHANNEL2]
FREQUENCY = 12515250
SYMBOL_RATE = 22000
DELIVERY_SYSTEM = DVBS
POLARIZATION = HORIZONTAL
INNER_FEC = 5/6
ORBITAL_POSITION = 19.2
ROLL_OFF = 35
PILOT = AUTO
SAT_NUMBER = -1
SERVICE_ID=4016
SERVICE_NAME=bvn
TRANSPORT_STREAM_ID=1105
SCRAMBLED=false
SERVICE_TYPE=14
VIDEO_PID=525
AUDIO_PID=122

encrypted channel does not yet work? it makes  file but i cannot play it.

the SERVICE_TYPE paramater , where do i find the definition for it? does it affect the output file?

furthermore i suggest to include the patch of comment 77 and the typo correction and reupload the patch so it can get reviewed ? i dont know how to do this myself.
Comment 92 steven vanden branden 2014-07-02 13:23:02 UTC
furthermore it seems that the python interface does not want to record any program ( it says make sure there are no conflicts or it is not in the past). but manual setting a recording works fine.
Comment 93 Stefan Ringel 2014-07-02 13:27:55 UTC
(In reply to comment #91)
> free to air channel like this works!
> 
> [CHANNEL2]
> FREQUENCY = 12515250
> SYMBOL_RATE = 22000
> DELIVERY_SYSTEM = DVBS
> POLARIZATION = HORIZONTAL
> INNER_FEC = 5/6
> ORBITAL_POSITION = 19.2
> ROLL_OFF = 35
> PILOT = AUTO
> SAT_NUMBER = -1
> SERVICE_ID=4016
> SERVICE_NAME=bvn
> TRANSPORT_STREAM_ID=1105
> SCRAMBLED=false
> SERVICE_TYPE=14
> VIDEO_PID=525
> AUDIO_PID=122
> 
> encrypted channel does not yet work? it makes  file but i cannot play it.
> 
> the SERVICE_TYPE paramater , where do i find the definition for it? does it
> affect the output file?
> 
> furthermore i suggest to include the patch of comment 77 and the typo
> correction and reupload the patch so it can get reviewed ? i dont know how to
> do this myself.

SERVICE_TYPE is raw value from service descriptor and it's enum GstMpegtsDVBServiceType (see mpegts library).
Comment 94 Stefan Ringel 2014-07-02 13:30:18 UTC
(In reply to comment #92)
> furthermore it seems that the python interface does not want to record any
> program ( it says make sure there are no conflicts or it is not in the past).
> but manual setting a recording works fine.

I forgotten to queueing edge PMT-PID. or we set up with pid 8192?
Comment 95 steven vanden branden 2014-07-02 13:41:11 UTC
i have found a few that could be the correct ones: can anyone explain the diferrences?

GST_DVB_SERVICE_DIGITAL_TELEVISION
GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION
GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION
GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION
GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION

and then this once seems to have to do with the CI slot?

GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE
Comment 96 Stefan Ringel 2014-07-02 13:42:32 UTC
(In reply to comment #91)
> free to air channel like this works!
> 
> [CHANNEL2]
> FREQUENCY = 12515250
> SYMBOL_RATE = 22000
> DELIVERY_SYSTEM = DVBS
> POLARIZATION = HORIZONTAL
> INNER_FEC = 5/6
> ORBITAL_POSITION = 19.2
> ROLL_OFF = 35
> PILOT = AUTO
> SAT_NUMBER = -1
> SERVICE_ID=4016
> SERVICE_NAME=bvn
> TRANSPORT_STREAM_ID=1105
> SCRAMBLED=false
> SERVICE_TYPE=14
> VIDEO_PID=525
> AUDIO_PID=122
> 
> encrypted channel does not yet work? it makes  file but i cannot play it.
> 
dvbbasebin can only ci, and not ci-plus.
Comment 97 Stefan Ringel 2014-07-02 13:46:18 UTC
(In reply to comment #95)
> i have found a few that could be the correct ones: can anyone explain the
> diferrences?
> 
> GST_DVB_SERVICE_DIGITAL_TELEVISION
sd tv with mpeg2 video codec

> GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION
hd tv with mpeg2 video codec

> GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION
sd tv with avc video codec

> GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION
hd tv with avc video codec

> GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION
hd 3d tv with avc/mvc video codec

> 
> and then this once seems to have to do with the CI slot?
> 
> GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE

update-service ci slot
Comment 98 Stefan Ringel 2014-07-02 13:53:14 UTC
(In reply to comment #91)
> free to air channel like this works!
> 
> [CHANNEL2]
> FREQUENCY = 12515250
> SYMBOL_RATE = 22000
> DELIVERY_SYSTEM = DVBS
> POLARIZATION = HORIZONTAL
> INNER_FEC = 5/6
> ORBITAL_POSITION = 19.2
> ROLL_OFF = 35
only for dvb-s2

> PILOT = AUTO
only for dvb-s2

> SAT_NUMBER = -1
> SERVICE_ID=4016
> SERVICE_NAME=bvn
> TRANSPORT_STREAM_ID=1105
> SCRAMBLED=false
> SERVICE_TYPE=14
> VIDEO_PID=525
> AUDIO_PID=122
> 


STREAM_ID = -1 
only for dvb-s2
Comment 99 steven vanden branden 2014-07-02 14:05:50 UTC
> dvbbasebin can only ci, and not ci-plus.

kaffeine can play and record them fine, mythtv also?

and i checked the tv vlaanderen module and its a ci slot and card so shouldnt it work then? can i test gstreamer directly via command line to see if gstreamer can do it?
Comment 100 Stefan Ringel 2014-07-02 14:25:08 UTC
(In reply to comment #99)
> > dvbbasebin can only ci, and not ci-plus.
> 
> kaffeine can play and record them fine, mythtv also?
> 
> and i checked the tv vlaanderen module and its a ci slot and card so shouldnt
> it work then? can i test gstreamer directly via command line to see if
> gstreamer can do it?

gst-launch-1.0 dvbbasebin .... program-number=1234 ! tsparse ! fakesink 
 or  filesink 

1234 =^ the program number, which you use
.... =^ the dvbsrc property
Comment 101 steven vanden branden 2014-07-02 17:19:48 UTC
for the encryped channels i filed a bug at gstreamer because it will probably be a problem specific to my tuner.

see link for bug: https://bugzilla.gnome.org/show_bug.cgi?id=732643
Comment 102 steven vanden branden 2014-07-02 17:23:30 UTC
btw is it correct that this is 1 recording that should start?

default      DEBUG      Recorder.vala:778: Checking timers
default      DEBUG      Recorder.vala:804: Checking timer: channel: 4011, start: 2014-07-02 19:02, duration: 1
default      DEBUG      Recorder.vala:830: 1 timers and 1 active recordings left

is it possible that the timer start a new attempt to start the recording while the first one is still starting and causing multiple attemps to connect to the cam module?
Comment 103 steven vanden branden 2014-07-18 13:10:04 UTC
to test it with:

gst-launch-1.0 dvbbasebin .... program-number=1234 ! tsparse ! fakesink 

where do i find the program-number? is it the channelnumber from my dvbv5 channels file or do i have to supplie the program pid to this command?
Comment 104 Stefan Ringel 2014-07-18 13:49:54 UTC
(In reply to comment #103)
> to test it with:
> 
> gst-launch-1.0 dvbbasebin .... program-number=1234 ! tsparse ! fakesink 
> 
> where do i find the program-number? is it the channelnumber from my dvbv5
> channels file or do i have to supplie the program pid to this command?

you can find the program-number in the PAT. And it's the same as the service-id in dvb or isdb networks (atsc has a map in the vct tables).
Comment 105 Sebastian Pölsterl 2014-07-20 22:56:09 UTC
Comment on attachment 279593 [details] [review]
update mpegts vapi to git master and rtsp-server vapi

Both patches have been committed to the gst-1.0 branch. Merge to master can happen as soon as a tarball release of vala's latest development snapshot has been released.
Comment 106 steven vanden branden 2014-07-22 07:28:11 UTC
may i comment that dvb-s is broken due to a typo? so this should be patched?

> DvbSparameter has another typo:
> 
>    112         source.set ("symbol-rate", this.SymbolRate);
> 
> was sombol rate instead of symbol-rate.

also is suggest again a patch for a string NULL error that crashes the deamon:

Device.vala

70 string tmp = "";
71 tmp += parent.get_property ("ID_MODEL_FROM_DATABASE");
Comment 107 Sebastian Pölsterl 2014-07-22 14:18:15 UTC
Thanks for reminding me, both are fixed in the gst-1.0 branch.
Comment 108 steven vanden branden 2014-07-22 14:57:12 UTC
np, i just wished i could use the software now , because i guess there is still a python3 bug in the configure part that needs fixing,

also i have another problem about my tuner that has a size mismatch when using the cam module but thats out there on bug for gst-plugins-bad, https://bugzilla.gnome.org/show_bug.cgi?id=732643

anyway should we report bugs for the gstreamer v 1.0 version here also (in this bugtracker) also? and when will the gstreamer1 branch be merched in master?