Owns a MediaGraph and orchestrates pipeline processing. More...
#include <mediapipeline.h>


Public Types | |
| enum | State { Stopped , Starting , Running , Paused , Stopping , ErrorState } |
| Pipeline lifecycle state. More... | |
Public Types inherited from ObjectBase | |
| using | SlotVariantFunc = std::function< void(const VariantList &)> |
| Function type for invoking a slot with a list of Variants. | |
Public Member Functions | |
| MediaPipeline (ObjectBase *parent=nullptr) | |
| Constructs a MediaPipeline. | |
| virtual | ~MediaPipeline () |
| Destructor. Stops the pipeline if running. | |
| MediaGraph * | graph () |
| Returns the managed graph. | |
| const MediaGraph * | graph () const |
| Returns the managed graph (const). | |
| ThreadPool * | threadPool () |
| Returns the thread pool used for processing. | |
| void | setThreadPool (ThreadPool *pool) |
| Sets an external thread pool to use instead of the internal one. | |
| Error | start () |
| Validates the graph, configures all nodes, and starts processing. | |
| Error | stop () |
| Stops all nodes and waits for processing to complete. | |
| Error | pause () |
| Pauses processing. | |
| Error | resume () |
| Resumes processing from a paused state. | |
| State | state () const |
| Returns the current pipeline state. | |
| PROMEKI_SIGNAL (stateChanged, State) | |
| Emitted when the pipeline state changes. | |
| PROMEKI_SIGNAL (errorOccurred, Error) | |
| Emitted when an error occurs in the pipeline. | |
| PROMEKI_SIGNAL (started) | |
| Emitted when the pipeline has started. | |
| PROMEKI_SIGNAL (stopped) | |
| Emitted when the pipeline has stopped. | |
Public Member Functions inherited from ObjectBase | |
| ObjectBase (ObjectBase *p=nullptr) | |
| Default ObjectBase constructor. | |
| virtual | ~ObjectBase () |
| Destructor. Emits aboutToDestroy, detaches from parent, and destroys children. | |
| ObjectBase * | parent () const |
| Returns the parent object, if one. nullptr if none. | |
| void | setParent (ObjectBase *p) |
| Sets the parent of this object. If the object already has a parent, it will be removed as a child from the old parent and added as a child to the new one. | |
| const ObjectBaseList & | childList () const |
| Returns a list of children of this object. | |
| template<typename... Args> | |
| int | registerSlot (Slot< Args... > *slot) |
| Registers a slot with this object and assigns it an ID. | |
| EventLoop * | eventLoop () const |
| Returns the EventLoop this object is affiliated with. | |
| void | moveToThread (EventLoop *loop) |
| Changes the EventLoop affinity of this object. | |
| int | startTimer (unsigned int intervalMs, bool singleShot=false) |
| Starts a timer on this object's EventLoop. | |
| void | stopTimer (int timerId) |
| Stops a timer previously started with startTimer(). | |
| template<typename... Args> | |
| PROMEKI_NAMESPACE_BEGIN void | connect (Signal< Args... > *signal, Slot< Args... > *slot) |
Additional Inherited Members | |
Static Public Member Functions inherited from ObjectBase | |
| static const MetaInfo & | metaInfo () |
| Returns the MetaInfo for the ObjectBase class. | |
| template<typename... Args> | |
| static void | connect (Signal< Args... > *signal, Slot< Args... > *slot) |
| connects a signal and slot together. This function assumes both the signal and slot exist in a ObjectBase or derived object | |
Public Attributes inherited from ObjectBase | |
| Signal< ObjectBase * > | aboutToDestroySignal = Signal< ObjectBase * >(this, aboutToDestroySignalName) |
Static Public Attributes inherited from ObjectBase | |
| static constexpr const char * | aboutToDestroySignalName = PROMEKI_STRINGIFY( aboutToDestroy ) "(" PROMEKI_STRINGIFY_ARGS( ObjectBase * ) ")" |
| static SignalMeta | aboutToDestroySignalMeta = SignalMeta(metaInfo(), aboutToDestroySignalName) |
Protected Member Functions inherited from ObjectBase | |
| ObjectBase * | signalSender () |
| Returns the ObjectBase that emitted the signal currently being handled. | |
| virtual void | event (Event *e) |
| Called by EventLoop to deliver events to this object. | |
| virtual void | timerEvent (TimerEvent *e) |
| Called when a timer fires for this object. | |
Owns a MediaGraph and orchestrates pipeline processing.
MediaPipeline manages the execution of a media processing graph. It validates the graph, configures all nodes, and schedules processing using a thread pool. The processing model is back-pressure driven: source nodes run continuously gated by downstream queue depth, and only timing-aware sink nodes manage real-time pacing.
| MediaPipeline::MediaPipeline | ( | ObjectBase * | parent = nullptr | ) |
Constructs a MediaPipeline.
| parent | Optional parent object. |
| Error MediaPipeline::resume | ( | ) |
Resumes processing from a paused state.
|
inline |
Sets an external thread pool to use instead of the internal one.
| pool | The thread pool. Ownership is not transferred. |
| Error MediaPipeline::start | ( | ) |
Validates the graph, configures all nodes, and starts processing.
| Error MediaPipeline::stop | ( | ) |
Stops all nodes and waits for processing to complete.