Module: FFMPEG::WindowTitles

Defined in:
lib/ffmpeg/window_titles.rb

Overview

Since:

  • 1.0.0-beta4

Defined Under Namespace

Classes: WindowGrabber

Constant Summary collapse

FILTERED_TITLES =

Regex to filter out “Window Title: N/A” from Chrome extensions and “Window Title: ”. This is done to remove unusable titles and to match the Ffmpeg expected input format for capturing specific windows. For example, “Window Title: Google - Mozilla Firefox” becomes “Google - Mozilla Firefox”.

Since:

  • 1.0.0-beta4

%r{^Window Title:( N/A|\s+)?}

Class Method Summary collapse

Class Method Details

.fetch(application) ⇒ Object

Returns a list of available window titles for the given application (process) name.

Since:

  • 1.0.0-beta4


13
14
15
16
# File 'lib/ffmpeg/window_titles.rb', line 13

def self.fetch(application)
  FFMPEG.logger.debug "Retrieving available windows for: #{application}"
  WindowGrabber.new.available_windows_for application
end