Commit 314c8181 authored by Sebastian Pölsterl's avatar Sebastian Pölsterl

Renamed get to get_channel to avoid confusions with GObject's get method

parent 1ea5a8f0
......@@ -24,7 +24,7 @@ namespace DVB {
this.channels_file = channels;
}
public Channel? get (uint sid) {
public Channel? get_channel (uint sid) {
Channel? val = null;
lock (this.channels) {
if (this.channels.contains (sid))
......@@ -193,7 +193,8 @@ namespace DVB {
lock (this.channels) {
if (this.channels.contains (channel_id)) {
Channel channel = this.channels.get (channel_id);
url = "rtsp://localhost:1554/%u/%u".printf (this.group_id, channel.Sid);
url = "rtsp://localhost:1554/%u/%u".printf (
this.group_id, channel.Sid);
}
}
......
......@@ -191,7 +191,7 @@ namespace DVB {
event = val.get_structure ();
uint sid = get_uint_val (structure, "service-id");
Channel channel = this.DeviceGroup.Channels.get (sid);
Channel channel = this.DeviceGroup.Channels.get_channel (sid);
if (channel == null) {
warning ("Could not find channel %u for this device", sid);
return;
......
......@@ -446,7 +446,8 @@ namespace DVB {
var conn = get_dbus_connection ();
if (conn == null) return "";
Schedule schedule = devgroup.Channels.get (channel_sid).Schedule;
Schedule schedule = devgroup.Channels.get_channel (
channel_sid).Schedule;
conn.register_object (
path,
......
......@@ -123,7 +123,7 @@ namespace DVB {
critical ("Could not create dvbbasebin element");
return;
}
DVB.Channel channel = this.device.Channels.get (
DVB.Channel channel = this.device.Channels.get_channel (
channel_sid);
channel.setup_dvb_source (dvbbasebin);
......@@ -290,7 +290,7 @@ namespace DVB {
// Find name and description for recordings
foreach (Recording rec in this.recordings.get_values ()) {
if (rec.Name == null) {
Channel chan = this.device.Channels.get (rec.ChannelSid);
Channel chan = this.device.Channels.get_channel (rec.ChannelSid);
Schedule sched = chan.Schedule;
Event? event = sched.get_running_event ();
......@@ -376,7 +376,7 @@ namespace DVB {
// TODO Get name for timer
var new_timer = new Timer (timer_id,
this.DeviceGroup.Channels.get(channel).Sid,
this.DeviceGroup.Channels.get_channel (channel).Sid,
start_year, start_month, start_day,
start_hour, start_minute, duration,
null);
......@@ -549,7 +549,7 @@ namespace DVB {
lock (this.timers) {
if (this.timers.contains (timer_id)) {
Timer t = this.timers.get (timer_id);
name = this.DeviceGroup.Channels.get (t.ChannelSid).Name;
name = this.DeviceGroup.Channels.get_channel (t.ChannelSid).Name;
}
}
return name;
......@@ -643,7 +643,7 @@ namespace DVB {
* Start recording of specified timer
*/
protected void start_recording (Timer timer) {
Channel channel = this.DeviceGroup.Channels.get (timer.ChannelSid);
Channel channel = this.DeviceGroup.Channels.get_channel (timer.ChannelSid);
File? location = this.create_recording_dirs (channel,
timer.get_start_time ());
......@@ -656,7 +656,7 @@ namespace DVB {
foreach (uint32 timer_id in this.active_timers) {
Timer other_timer = this.timers.get (timer_id);
Channel other_channel =
this.DeviceGroup.Channels.get (other_timer.ChannelSid);
this.DeviceGroup.Channels.get_channel (other_timer.ChannelSid);
if (channel.on_same_transport_stream (other_channel)) {
debug ("Using already active RecordingThread");
......
......@@ -396,7 +396,7 @@ namespace DVB {
this.add_new_channel (sid);
}
Channel channel = this.channels.get(sid);
Channel channel = this.channels.get_channel (sid);
if (service.has_field ("scrambled")) {
bool scrambled;
......@@ -479,7 +479,7 @@ namespace DVB {
this.add_new_channel (sid);
}
Channel dvb_channel = this.channels.get (sid);
Channel dvb_channel = this.channels.get_channel (sid);
if (name.validate ()) {
dvb_channel.Network = name;
......@@ -507,7 +507,7 @@ namespace DVB {
this.add_new_channel (program_number);
}
Channel dvb_channel = this.channels.get (program_number);
Channel dvb_channel = this.channels.get_channel (program_number);
Gst.Value streams = structure.get_value ("streams");
uint size = streams.list_get_size ();
......@@ -581,7 +581,7 @@ namespace DVB {
ArrayList<uint> del_channels = new ArrayList<uint> ();
foreach (uint sid in this.new_channels) {
DVB.Channel channel = this.channels.get (sid);
DVB.Channel channel = this.channels.get_channel (sid);
uint tsid = channel.TransportStreamId;
// Check if already came across the transport stream
......
......@@ -43,7 +43,7 @@ namespace DVB {
return null;
}
Channel? channel = free_dev.Channels.get (sidnr);
Channel? channel = free_dev.Channels.get_channel (sidnr);
if (channel == null) {
warning ("No channel %u in group %u", sidnr, grpnr);
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment