libvisual  0.5.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
LV::Actor Class Reference

Actor class. More...

#include <libvisual/lv_actor.h>

Public Member Functions

 Actor (Actor const &)=delete
 
Actoroperator= (Actor const &)=delete
 
VisPluginData * get_plugin ()
 Returns the plugin object. More...
 
bool realize ()
 Realizes this Actor. More...
 
SongInfo const * get_songinfo ()
 Returns the song information used by this Actor for display. More...
 
Palette const * get_palette ()
 Returns the colour palette used. More...
 
bool video_negotiate (VisVideoDepth run_depth, bool noevent, bool forced)
 Configures actor to automatically work with the video target set with set_video(). More...
 
VisVideoDepth get_supported_depths ()
 Returns the set of colour depths natively supported. More...
 
VisVideoAttrOptions const * get_video_attribute_options ()
 
void set_video (VideoPtr const &video)
 Sets the video target for rendering. More...
 
VideoPtr const & get_video ()
 
void run (Audio const &audio)
 Runs this actor. More...
 

Static Public Member Functions

static ActorPtr load (std::string const &name)
 Creates a new Actor with a plugin of a given name. More...
 

Friends

void intrusive_ptr_add_ref (Actor const *actor)
 
void intrusive_ptr_release (Actor const *actor)
 

Detailed Description

Actor class.

Definition at line 51 of file lv_actor.h.

Member Function Documentation

Palette const * LV::Actor::get_palette ( )

Returns the colour palette used.

Note
Only 8-bit renders will have colour palettes.
Returns
Colour palette, or null if there is none

Definition at line 130 of file lv_actor.cpp.

Referenced by run().

VisPluginData * LV::Actor::get_plugin ( )

Returns the plugin object.

Returns
Plugin object

Definition at line 110 of file lv_actor.cpp.

Referenced by run().

SongInfo const * LV::Actor::get_songinfo ( )

Returns the song information used by this Actor for display.

Returns
Song information

Definition at line 125 of file lv_actor.cpp.

VisVideoDepth LV::Actor::get_supported_depths ( )

Returns the set of colour depths natively supported.

Returns
Set of supported colour depths

Definition at line 202 of file lv_actor.cpp.

Referenced by video_negotiate().

ActorPtr LV::Actor::load ( std::string const &  name)
static

Creates a new Actor with a plugin of a given name.

See Also
realize()
Parameters
nameName of plugin to load
Returns
New actor, or nullptr if plugin failed to load

Definition at line 77 of file lv_actor.cpp.

bool LV::Actor::realize ( )

Realizes this Actor.

Returns
true on success, false otherwise

Definition at line 115 of file lv_actor.cpp.

void LV::Actor::run ( Audio const &  audio)

Runs this actor.

Each call pumps events to the actor for handling and passes in the audio data for visualising.

Note
Scaling and depth conversions are automatically performed.
Parameters
audioAudio data to visualise

Definition at line 217 of file lv_actor.cpp.

void LV::Actor::set_video ( VideoPtr const &  video)

Sets the video target for rendering.

See Also
video_negotiate()
Parameters
videoVideo target

Definition at line 212 of file lv_actor.cpp.

bool LV::Actor::video_negotiate ( VisVideoDepth  run_depth,
bool  noevent,
bool  forced 
)

Configures actor to automatically work with the video target set with set_video().

Note
This method setups any necessary scaling and depth conversion necessary.
See Also
set_video()
Parameters
run_depthDesired colour depth used for rendering. Use VISUAL_VIDEO_DEPTH_NONE for auto selection
noeventSet to TRUE to stop events
forcedSet to TRUE If run_depth is set
Returns
true on success, false otherwise

Definition at line 141 of file lv_actor.cpp.


The documentation for this class was generated from the following files: