GNOME Bugzilla – Bug 725230
Port to GStreamer 1.0
Last modified: 2014-07-22 14:57:12 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.
Created attachment 271069 [details] [review] change to Gstreamer-mpegts library version >= 1.3.0.1 (Git)
Created attachment 271070 [details] [review] change device managment to handle multiple delivery systems
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
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).
(In reply to comment #4) > Is that on top of https://git.gnome.org/browse/gnome-dvb-daemon/log/?h=gst-1.0 > ? yes.
Created attachment 271109 [details] [review] correction api chank
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.
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.
(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
(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.
(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.
(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.
Created attachment 272143 [details] [review] change to Gstreamer-mpegts library version >= 1.3.0.1 (Git)
Created attachment 272144 [details] [review] change device managment to handle multiple delivery systems
Created attachment 272697 [details] [review] Bugfix pad linking
Created attachment 272698 [details] [review] change to rtsp-server => 1.3.0.1
Created attachment 272700 [details] [review] correction vapi
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
Created attachment 272746 [details] [review] correction vapi
Created attachment 272747 [details] [review] change to rtsp-server => 1.3.0.1
Created attachment 273003 [details] [review] change to dvb-v5 files
Created attachment 273081 [details] [review] add missed files and bugfix arraylist cleanup
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.
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.
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.
Created attachment 274181 [details] [review] correction vapi
Created attachment 274182 [details] [review] change to gstreamer 1.3.0.1
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.
Created attachment 276260 [details] [review] change to gstreamer 1.3.1
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.
Created attachment 276319 [details] [review] change to gstreamer 1.3.1
Created attachment 276320 [details] [review] change to gstreamer 1.3.1
Created attachment 276321 [details] [review] correction vapi
Review of attachment 276320 [details] [review]: Looks fine, can be committed once the vala changes have been accepted.
*** Bug 728975 has been marked as a duplicate of this bug. ***
*** Bug 729618 has been marked as a duplicate of this bug. ***
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 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.
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?
(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
(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.
I just updated the gstreamer bindings in vala to current gstreamer git.
(In reply to comment #42) > I just updated the gstreamer bindings in vala to current gstreamer git. and the gstreamer-mpegts?
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.
(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]).
(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.
(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
(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.
(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.
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 #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.
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) {
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;
(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.
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?
sorry, its an install problem of the package i made to install it, so it works
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):
+ Trace 233656
result_callback(obj, self._unpack_result(ret), real_user_data)
result_handler([DeviceGroup(path) for path in paths])
self.__model.get_all_devices(result_handler=devices_handler)
result_handler(devs)
dev.frontend)
info_t, success = manager.get_adapter_info(adapter, frontend)
return self.manager.GetAdapterInfo('(uu)', adapter, frontend, **kwargs)
None)
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
(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
> 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
+ Trace 233664
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
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;
(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?
(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
+ Trace 233671
not found configure: error: could not find Python headers
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;
tmp="Unknown"; typo corretion
(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".
Created attachment 279133 [details] [review] update mpegts vapi to git master
Created attachment 279134 [details] [review] update mpegts vapi to git master
Created attachment 279362 [details] [review] update mpegts vapi to git master
Created attachment 279593 [details] [review] update mpegts vapi to git master and rtsp-server vapi
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?
> 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
is the rtsp server vapi based on the git version or the 1.3.90 version?
makes no difference, i dont have a clue anymore
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.
(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
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):
+ Trace 233754
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
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
(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.
(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
(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?
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
(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?
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
(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?
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.
in device.vala, setAdapterTypeAndName: add after line: dvbsrc.set ("frontend", frontend); the line dvbsrc.set ("timeout", 10000000); or dvbsrc.set ("tuning-timeout", 50000000);
DvbSparameter has another typo: 112 source.set ("symbol-rate", this.SymbolRate); was sombol rate instead of symbol-rate.
(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.
(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,
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.
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.
(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).
(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?
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
(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.
(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
(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
> 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?
(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
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
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?
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?
(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 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.
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");
Thanks for reminding me, both are fixed in the gst-1.0 branch.
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?