Module: MPlayer::SlaveTvCommands

Included in:
Slave
Defined in:
lib/mplayer-ruby/slave_tv_commands.rb

Instance Method Summary collapse

Instance Method Details

#next_channelObject

next TV channel



18
19
20
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 18

def next_channel
  tv_step_channel :next
end

#prev_channelObject

previous TV channel



23
24
25
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 23

def prev_channel
  tv_step_channel :prev
end

#tv_last_channelObject Also known as: last_channel

Set the current TV Channel to the last channel



44
45
46
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 44

def tv_last_channel
  command("tv_last_channel")
end

#tv_set_brightness(value, type = :relative) ⇒ Object

Set/adjust video parameters. If :relative, modifies parameter by <value>. If :absolute, parameter is set to <value>. <value> is in the range [-100, 100].



84
85
86
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 84

def tv_set_brightness(value, type = :relative)
  setting :tv_set_brightness, value, type
end

#tv_set_channel(value) ⇒ Object Also known as: set_channel

Set TV Channel to <value>



38
39
40
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 38

def tv_set_channel(value)
  command("tv_set_channel #{value}")
end

#tv_set_contrast(value, type = :relative) ⇒ Object

Set/adjust video parameters. If :relative, modifies parameter by <value>. If :absolute, parameter is set to <value>. <value> is in the range [-100, 100].



68
69
70
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 68

def tv_set_contrast(value, type = :relative)
  setting :tv_set_contrast, value, type
end

#tv_set_freq(value) ⇒ Object

set TV Frequency in MHz



50
51
52
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 50

def tv_set_freq(value)
  command("tv_set_freq #{value}")
end

#tv_set_hue(value, type = :relative) ⇒ Object

Set/adjust video parameters. If :relative, modifies parameter by <value>. If :absolute, parameter is set to <value>. <value> is in the range [-100, 100].



76
77
78
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 76

def tv_set_hue(value, type = :relative)
  setting :tv_set_hue, value, type
end

#tv_set_norm(value) ⇒ Object

Set the TV tuner norm (PAL, SECAM, NTSC, … ).



60
61
62
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 60

def tv_set_norm(value)
  command("tv_set_norm #{value.to_s.upcase}")
end

#tv_set_saturation(value, type = :relative) ⇒ Object

Set/adjust video parameters. If :relative, modifies parameter by <value>. If :absolute, parameter is set to <value>. <value> is in the range [-100, 100].



92
93
94
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 92

def tv_set_saturation(value, type = :relative)
  setting :tv_set_saturation, value, type
end

#tv_start_scanObject

Start automatic TV channel scanning



5
6
7
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 5

def tv_start_scan
  command("tv_start_scan")
end

#tv_step_chanlistObject

Change TV Channel list



33
34
35
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 33

def tv_step_chanlist
  command("tv_step_chanlist")
end

#tv_step_channel(action) ⇒ Object

Select the next/previous TV Channel :next selects next channel :prev select previous channel



12
13
14
15
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 12

def tv_step_channel(action)
  value = action ==  :prev ? -1 : 1
  command "tv_step_channel #{value}"
end

#tv_step_freq(value) ⇒ Object

set the TV frequency relative to the current frequency



55
56
57
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 55

def tv_step_freq(value)
  command("tv_step_freq #{value}")
end

#tv_step_normObject

Change TV norm



28
29
30
# File 'lib/mplayer-ruby/slave_tv_commands.rb', line 28

def tv_step_norm
  command("tv_step_norm")
end