lib/ffmpeg/window_titles.rb
#
# Returns list of window titles in FFmpeg expected format when using Linux
#
Returns list of window titles in FFmpeg expected format when using Linux
Returns list of window titles in FFmpeg expected format when using Linux
def linux_os_window(application)
        FFMPEG.logger.warn 'Default capture device on Linux (x11grab) does not support window recording.'
        raise DependencyNotFound, 'wmctrl is not installed. Run: sudo apt install wmctrl.' unless wmctrl_installed?
        titles = `wmctrl -l | awk '{$3=""; $2=""; $1=""; print $0}'` 
                   .split("\n")
                   .map(&:strip)
                   .select { |t| t.match?(/#{application}/i) } 
        raise RecorderErrors::ApplicationNotFound, "No open windows found for: #{application}" if titles.empty?
        titles
      end
def linux_os_window ( application ) FFMPEG . logger . warn 'Default capture device on Linux (x11grab) does not support window recording.' raise DependencyNotFound , 'wmctrl is not installed. Run: sudo apt install wmctrl.' unless wmctrl_installed? titles = ` wmctrl -l | awk '{$3=""; $2=""; $1=""; print $0}' ` . split ( "\n" ) . map ( & :strip ) . select { | t | t . match? ( / #{ application } /i ) } raise RecorderErrors :: ApplicationNotFound , "No open windows found for: #{application}" if titles . empty? titles end
Returns list of window titles in FFmpeg expected format when using Linux
Returns list of window titles in FFmpeg expected format when using Linux
# Returns all open windows # Narrow down to given application
application