Video display and composing engine for JUCE
Loading...
Searching...
No Matches
ClipDescriptor Class Reference

The ClipDescriptor configures the placement of each clip to be used in compositing the ComposedClip. More...

#include <foleys_ClipDescriptor.h>

+ Inheritance diagram for ClipDescriptor:

Classes

class  ClipParameterController
 
class  Listener
 Listener to be notified of changes in this ClipDescriptor, especially the removal of a ProcessorController. More...
 

Public Member Functions

 ClipDescriptor (ComposedClip &owner, std::shared_ptr< AVClip > clip, juce::UndoManager *undo)
 Create a ClipDescriptor from an AVClip, that will be included in the ComposedClip.
 
 ClipDescriptor (ComposedClip &owner, juce::ValueTree state, juce::UndoManager *undo)
 Create a ClipDescriptor from an AVClip, that will be included in the ComposedClip.
 
 ~ClipDescriptor () override
 
juce::String getDescription () const
 Returns a human readable description of this clip.
 
void setDescription (const juce::String &name)
 Set the description of this clip.
 
double getStart () const
 start of the clip in seconds
 
int64_t getStartInSamples () const
 
void setStart (double start)
 
double getLength () const
 length of the clip in seconds
 
int64_t getLengthInSamples () const
 
void setLength (double length)
 
double getOffset () const
 offset in seconds into the media
 
int64_t getOffsetInSamples () const
 
void setOffset (double offset)
 
void setVideoVisible (bool shouldBeVisible)
 switch video invisible
 
bool getVideoVisible () const
 
void setAudioPlaying (bool shouldPlay)
 switch audio muted
 
bool getAudioPlaying () const
 
double getClipTimeInDescriptorTime (double time) const
 Transforms a time relative to the containing clip into a local time in ClipDescriptor.
 
void readPluginStatesIntoValueTree ()
 Read all plugins getStateInformation() and save it into the statusTree as BLOB.
 
juce::ValueTree & getStatusTree ()
 Grants access to the underlying state.
 
void updateSampleCounts ()
 
ClipParameterControllergetAudioParameterController ()
 
ClipParameterControllergetVideoParameterController ()
 
void addProcessor (juce::ValueTree tree, int index=-1)
 
void addAudioProcessor (std::unique_ptr< ProcessorController > controller, int index=-1)
 
void addAudioProcessor (std::unique_ptr< juce::AudioProcessor > processor, int index=-1)
 
void removeAudioProcessor (int index)
 
const std::vector< std::unique_ptr< ProcessorController > > & getAudioProcessors () const
 
void addVideoProcessor (std::unique_ptr< ProcessorController > controller, int index=-1)
 
void addVideoProcessor (std::unique_ptr< VideoProcessor > processor, int index=-1)
 
void removeVideoProcessor (int index)
 
void removeProcessor (ProcessorController *controller)
 
const std::vector< std::unique_ptr< ProcessorController > > & getVideoProcessors () const
 
ComposedClipgetOwningClip ()
 
const ComposedClipgetOwningClip () const
 
void addListener (Listener *listener)
 Add a listener to the ClipDescriptor.
 
void removeListener (Listener *listener)
 Add a listener from the ClipDescriptor.
 
double getCurrentTimeInSeconds () const override
 Since the automation values are time dependent, every instance, that inherits ControllableBase needs a way to tell the local time (presentation time stamp).
 
void triggerTimecodeUpdate (juce::NotificationType type)
 Sends the current local timecode to it's timecodeListeners.
 
void updateAudioAutomations (double pts)
 
void updateVideoAutomations (double pts)
 
- Public Member Functions inherited from TimeCodeAware
 TimeCodeAware ()=default
 
virtual ~TimeCodeAware ()=default
 
void addTimecodeListener (Listener *listener)
 Register a TimecodeListener to be notified, when the visual frame changes.
 
void removeTimecodeListener (Listener *listener)
 Unregister a TimecodeListener.
 

Public Attributes

std::shared_ptr< AVClipclip
 

Additional Inherited Members

- Protected Member Functions inherited from TimeCodeAware
void sendTimecode (int64_t count, double seconds, juce::NotificationType nt)
 Subclasses can call this to notify displays, that the time code has changed, e.g.
 

Detailed Description

The ClipDescriptor configures the placement of each clip to be used in compositing the ComposedClip.

It also holds a list of VideoProcessors and AudioProcessors including their automation data relative to the clip.

Constructor & Destructor Documentation

◆ ClipDescriptor() [1/2]

ClipDescriptor ( ComposedClip owner,
std::shared_ptr< AVClip clip,
juce::UndoManager *  undo 
)

Create a ClipDescriptor from an AVClip, that will be included in the ComposedClip.

Every ClipDescriptor can only live in one ComposedClip.

Parameters
owneris the ComposedClip, where the Clipdescriptor will live in.
clipthe AVClip, that will be wrapped and described by this ClipDescriptor.

References ClipDescriptor::clip, and ClipDescriptor::ClipParameterController::setClip().

◆ ClipDescriptor() [2/2]

ClipDescriptor ( ComposedClip owner,
juce::ValueTree  state,
juce::UndoManager *  undo 
)

Create a ClipDescriptor from an AVClip, that will be included in the ComposedClip.

This will use the owners VideoEngine to resolve and load the clip and all processors. Every ClipDescriptor can only live in one ComposedClip.

Parameters
owneris the ComposedClip, where the Clipdescriptor will live in.
stateis the ValueTree coded state to describe this ClipDescriptor.

References ClipDescriptor::addAudioProcessor(), ClipDescriptor::addVideoProcessor(), ClipDescriptor::clip, AVClip::getVideoEngine(), and ClipDescriptor::ClipParameterController::setClip().

◆ ~ClipDescriptor()

Member Function Documentation

◆ getDescription()

juce::String getDescription ( ) const

Returns a human readable description of this clip.

This is initially set to the file name of wrapped clip.

◆ setDescription()

void setDescription ( const juce::String &  name)

Set the description of this clip.

◆ getStart()

double getStart ( ) const

start of the clip in seconds

Referenced by ClipDescriptor::getClipTimeInDescriptorTime().

◆ getStartInSamples()

int64_t getStartInSamples ( ) const

◆ setStart()

void setStart ( double  start)

◆ getLength()

double getLength ( ) const

length of the clip in seconds

◆ getLengthInSamples()

int64_t getLengthInSamples ( ) const

◆ setLength()

void setLength ( double  length)

◆ getOffset()

double getOffset ( ) const

offset in seconds into the media

Referenced by ClipDescriptor::getClipTimeInDescriptorTime().

◆ getOffsetInSamples()

int64_t getOffsetInSamples ( ) const

◆ setOffset()

void setOffset ( double  offset)

◆ setVideoVisible()

void setVideoVisible ( bool  shouldBeVisible)

switch video invisible

◆ getVideoVisible()

bool getVideoVisible ( ) const

◆ setAudioPlaying()

void setAudioPlaying ( bool  shouldPlay)

switch audio muted

◆ getAudioPlaying()

bool getAudioPlaying ( ) const

◆ getClipTimeInDescriptorTime()

double getClipTimeInDescriptorTime ( double  time) const

Transforms a time relative to the containing clip into a local time in ClipDescriptor.

References ClipDescriptor::getOffset(), and ClipDescriptor::getStart().

Referenced by ClipDescriptor::getCurrentTimeInSeconds().

◆ readPluginStatesIntoValueTree()

void readPluginStatesIntoValueTree ( )

Read all plugins getStateInformation() and save it into the statusTree as BLOB.

◆ getStatusTree()

juce::ValueTree & getStatusTree ( )

Grants access to the underlying state.

Your GUI may use this to add private data. It is your responsibility to avoid property or child collissions.

◆ updateSampleCounts()

void updateSampleCounts ( )

References ClipDescriptor::clip.

◆ getAudioParameterController()

ClipDescriptor::ClipParameterController & getAudioParameterController ( )

◆ getVideoParameterController()

ClipDescriptor::ClipParameterController & getVideoParameterController ( )

◆ addProcessor()

void addProcessor ( juce::ValueTree  tree,
int  index = -1 
)

◆ addAudioProcessor() [1/2]

◆ addAudioProcessor() [2/2]

void addAudioProcessor ( std::unique_ptr< juce::AudioProcessor >  processor,
int  index = -1 
)

◆ removeAudioProcessor()

void removeAudioProcessor ( int  index)

◆ getAudioProcessors()

const std::vector< std::unique_ptr< ProcessorController > > & getAudioProcessors ( ) const

◆ addVideoProcessor() [1/2]

void addVideoProcessor ( std::unique_ptr< ProcessorController controller,
int  index = -1 
)

◆ addVideoProcessor() [2/2]

void addVideoProcessor ( std::unique_ptr< VideoProcessor processor,
int  index = -1 
)

◆ removeVideoProcessor()

void removeVideoProcessor ( int  index)

◆ removeProcessor()

◆ getVideoProcessors()

const std::vector< std::unique_ptr< ProcessorController > > & getVideoProcessors ( ) const

◆ getOwningClip() [1/2]

◆ getOwningClip() [2/2]

const ComposedClip & getOwningClip ( ) const

◆ addListener()

void addListener ( Listener listener)

Add a listener to the ClipDescriptor.

◆ removeListener()

void removeListener ( Listener listener)

Add a listener from the ClipDescriptor.

◆ getCurrentTimeInSeconds()

double getCurrentTimeInSeconds ( ) const
overridevirtual

Since the automation values are time dependent, every instance, that inherits ControllableBase needs a way to tell the local time (presentation time stamp).

Implements TimeCodeAware.

References ClipDescriptor::getClipTimeInDescriptorTime(), ClipDescriptor::getCurrentTimeInSeconds(), and ClipDescriptor::getOwningClip().

Referenced by ProcessorController::getCurrentPTS(), ClipDescriptor::getCurrentTimeInSeconds(), and ClipDescriptor::triggerTimecodeUpdate().

◆ triggerTimecodeUpdate()

void triggerTimecodeUpdate ( juce::NotificationType  type)

Sends the current local timecode to it's timecodeListeners.

References ClipDescriptor::getCurrentTimeInSeconds(), and TimeCodeAware::sendTimecode().

◆ updateAudioAutomations()

void updateAudioAutomations ( double  pts)

◆ updateVideoAutomations()

void updateVideoAutomations ( double  pts)

Member Data Documentation

◆ clip


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