lib/vlc-client/server.rb
# Starts a VLC instance in a subprocess
#
# @param [Boolean] detached if true VLC will be started as a deamon process.
#                     Defaults to false.
#
# @return [Integer] the subprocess PID
#
# @see #daemonize
#
Starts a VLC instance in a subprocess
Starts a VLC instance in a subprocess
def start(detached = false)
      return @pid if running?
      detached ? @deamon = true : setup_traps
      @pid = Process::spawn(
         (headless? ? 'cvlc' : 'vlc'),
         '--extraintf', 'rc', '--rc-host', "#{@host}:#{@port}",
         :pgroup => detached,
         :in => '/dev/null',
           :out => '/dev/null',
           :err => '/dev/null')
      return @pid
    end
def start ( detached = false ) return @pid if running? detached ? @deamon = true : setup_traps @pid = Process :: spawn ( ( headless? ? 'cvlc' : 'vlc' ) , '--extraintf' , 'rc' , '--rc-host' , "#{@host}:#{@port}" , :pgroup => detached , :in => '/dev/null' , :out => '/dev/null' , :err => '/dev/null' ) return @pid end
Starts a VLC instance in a subprocess
Starts a VLC instance in a subprocess
# use Process::spawn if we can # allows usage in JRuby
the subprocess PID
the subprocess PID
Integer
detached
detached if true VLC will be started as a deamon process. Defaults to false.
detached if true VLC will be started as a deamon process . Defaults to false .
see
None