[gnome-dvb-daemon/gst-1.0] Fixed errors with owned/unowned variables
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dvb-daemon/gst-1.0] Fixed errors with owned/unowned variables
- Date: Sun, 13 Oct 2013 10:42:28 +0000 (UTC)
commit 69d2bb485ffd26dc2d8a9c6cb6ac44899ea93bbc
Author: Sebastian Pölsterl <sebp k-d-w org>
Date: Sat Oct 12 22:29:59 2013 +0200
Fixed errors with owned/unowned variables
src/Cable/CableScanner.vala | 2 +-
src/ChannelFactory.vala | 2 +-
src/EPGScanner.vala | 2 +-
src/Manager.vala | 2 +-
src/Satellite/SatelliteScanner.vala | 2 +-
src/Scanner.vala | 8 ++++----
src/Terrestrial/TerrestrialScanner.vala | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/Cable/CableScanner.vala b/src/Cable/CableScanner.vala
index fd594a7..6c1b95e 100644
--- a/src/Cable/CableScanner.vala
+++ b/src/Cable/CableScanner.vala
@@ -65,7 +65,7 @@ namespace DVB {
tuning_params.set_value ("inner-fec", code_rate);
tuning_params.set_value ("modulation", modulation);
- base.add_structure_to_scan (tuning_params);
+ base.add_structure_to_scan ((owned) tuning_params);
}
protected override void add_scanning_data_from_string (string line) {
diff --git a/src/ChannelFactory.vala b/src/ChannelFactory.vala
index 2e8da72..d666df3 100644
--- a/src/ChannelFactory.vala
+++ b/src/ChannelFactory.vala
@@ -500,7 +500,7 @@ namespace DVB {
* Forward EIT structure
*/
private void bus_watch_func (Gst.Bus bus, Gst.Message message) {
- Gst.Structure structure = message.get_structure ();
+ unowned Gst.Structure structure = message.get_structure ();
switch (message.type) {
case Gst.MessageType.ELEMENT:
string structure_name = structure.get_name ();
diff --git a/src/EPGScanner.vala b/src/EPGScanner.vala
index 31db27e..3e1dfcc 100644
--- a/src/EPGScanner.vala
+++ b/src/EPGScanner.vala
@@ -238,7 +238,7 @@ namespace DVB {
private bool bus_watch_func (Gst.Bus bus, Gst.Message message) {
switch (message.type) {
case Gst.MessageType.ELEMENT:
- Gst.Structure structure = message.get_structure ();
+ unowned Gst.Structure structure = message.get_structure ();
if (structure.get_name() == "dvb-read-failure") {
log.warning ("Could not read from DVB device");
} else if (structure.get_name() == "eit") {
diff --git a/src/Manager.vala b/src/Manager.vala
index 040f712..599857f 100644
--- a/src/Manager.vala
+++ b/src/Manager.vala
@@ -398,7 +398,7 @@ namespace DVB {
while (bus.have_pending()) {
Gst.Message msg = bus.pop ();
if (msg.type == Gst.MessageType.ELEMENT && msg.src == dvbelement) {
- Gst.Structure structure = msg.get_structure ();
+ unowned Gst.Structure structure = msg.get_structure ();
if (structure.get_name () == "dvb-adapter") {
info.name = structure.get_string ("name");
info.type = structure.get_string ("type");
diff --git a/src/Satellite/SatelliteScanner.vala b/src/Satellite/SatelliteScanner.vala
index a119fb4..ea2fbac 100644
--- a/src/Satellite/SatelliteScanner.vala
+++ b/src/Satellite/SatelliteScanner.vala
@@ -88,7 +88,7 @@ namespace DVB {
tuning_params.set_value ("symbol-rate", symbol_rate);
tuning_params.set_value ("polarization", polarization);
- base.add_structure_to_scan (tuning_params);
+ base.add_structure_to_scan ((owned) tuning_params);
}
protected override void add_scanning_data_from_string (string line) {
diff --git a/src/Scanner.vala b/src/Scanner.vala
index 4705588..2b14e53 100644
--- a/src/Scanner.vala
+++ b/src/Scanner.vala
@@ -355,7 +355,7 @@ namespace DVB {
if (!this.scanned_frequencies.contains (item)) {
log.debug ("Queueing new frequency %u", item.Frequency);
- this.frequencies.push_tail (structure);
+ this.frequencies.push_tail ((owned) structure);
this.scanned_frequencies.add (item);
}
}
@@ -650,7 +650,7 @@ namespace DVB {
if (transport.has_field ("delivery")) {
Value delivery_val = transport.get_value ("delivery");
- weak Gst.Structure delivery = Gst.Value.get_structure (
+ unowned Gst.Structure delivery = Gst.Value.get_structure (
delivery_val);
log.debug ("Received TS 0x%x", tsid);
@@ -658,7 +658,7 @@ namespace DVB {
uint freq;
delivery.get_uint ("frequency", out freq);
// Takes care of duplicates
- this.add_structure_to_scan (delivery);
+ this.add_structure_to_scan (delivery.copy());
}
if (transport.has_field ("channels")) {
@@ -754,7 +754,7 @@ namespace DVB {
protected bool bus_watch_func (Gst.Bus bus, Gst.Message message) {
switch (message.type) {
case Gst.MessageType.ELEMENT: {
- Gst.Structure structure = message.get_structure ();
+ unowned Gst.Structure structure = message.get_structure ();
string structure_name = structure.get_name();
if (structure_name == "dvb-frontend-stats")
this.on_dvb_frontend_stats_structure (structure);
diff --git a/src/Terrestrial/TerrestrialScanner.vala b/src/Terrestrial/TerrestrialScanner.vala
index e20b095..3737a57 100644
--- a/src/Terrestrial/TerrestrialScanner.vala
+++ b/src/Terrestrial/TerrestrialScanner.vala
@@ -98,7 +98,7 @@ namespace DVB {
tuning_params.set_value ("constellation", constellation);
tuning_params.set_value ("guard-interval", guard);
- base.add_structure_to_scan (tuning_params);
+ base.add_structure_to_scan ((owned) tuning_params);
}
protected override void add_scanning_data_from_string (string line) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]