| Ocean
    | 
#include <ImageFileSequence.h>
| Public Member Functions | |
| double | duration () const override | 
| Returns the duration of the finite medium. | |
| double | normalDuration () const override | 
| Returns the duration without speed consideration. | |
| double | position () const override | 
| Returns the recent position of the finite medium. | |
| float | speed () const override | 
| Returns the speed of the finite medium. | |
| std::string | currentUrl () const override | 
| Returns the url of the current image. | |
| unsigned int | images () const override | 
| Returns the number of images part of the sequence. | |
| bool | start () override | 
| Starts the medium. | |
| bool | pause () override | 
| Pauses the medium. | |
| bool | stop () override | 
| Stops the medium. | |
| bool | isStarted () const override | 
| Returns whether the medium is started currently. | |
| Timestamp | startTimestamp () const override | 
| Returns the start timestamp. | |
| Timestamp | pauseTimestamp () const override | 
| Returns the pause timestamp. | |
| Timestamp | stopTimestamp () const override | 
| Returns the stop timestamp. | |
| bool | setPosition (const double position) override | 
| Sets the recent position of the finite medium. | |
| bool | setSpeed (const float speed) override | 
| Sets the speed of the finite medium. | |
| bool | setCamera (SharedAnyCamera &&camera) override | 
| Sets the known camera profile of this frame medium. | |
| bool | forceNextFrame () override | 
| Forces the loading of the next image in the sequence. | |
|  Public Member Functions inherited from Ocean::Media::ImageSequence | |
| virtual SequenceMode | mode () const | 
| Returns the mode of this image sequence object. | |
| virtual unsigned int | index () const | 
| Returns the index of the current image. | |
| virtual bool | setMode (const SequenceMode mode) | 
| Sets the sequence mode of this image sequence. | |
| bool | setPreferredFramePixelFormat (const FrameType::PixelFormat format) override | 
| Sets the preferred frame pixel format. | |
| bool | setPreferredFrameFrequency (const FrameFrequency frequency) override | 
| Sets the preferred frame frequency in Hz. | |
|  Public Member Functions inherited from Ocean::Media::FiniteMedium | |
| bool | loop () const | 
| Returns whether the medium is played in a loop. | |
| virtual bool | setLoop (const bool value) | 
| Sets whether the medium has to be played in a loop. | |
| virtual bool | taskFinished () const | 
| Returns whether a previous task has been finished. | |
|  Public Member Functions inherited from Ocean::Media::Medium | |
| const std::string & | url () const | 
| Returns the url of the medium. | |
| bool | isValid () const | 
| Returns whether the medium is valid. | |
| const std::string & | library () const | 
| Returns the name of the owner library. | |
| Type | type () const | 
| Returns the type of the medium. | |
| bool | isType (const Type type) const | 
| Returns whether a medium has a given type. | |
| bool | isExclusive () const | 
| Returns whether this medium can be use exclusively. | |
| virtual MediumRef | clone () const | 
| Clones this medium and returns a new independent instance of this medium. | |
|  Public Member Functions inherited from Ocean::Media::FrameMedium | |
| ~FrameMedium () override | |
| Destructs a frame object. | |
| bool | hasFrame () const | 
| Returns whether the object holds a frame. | |
| FrameFrequency | frameFrequency () const | 
| Returns the frequency of the frame in Hz. | |
| virtual FrameRef | frame (SharedAnyCamera *anyCamera=nullptr) const | 
| Returns the most recent frame. | |
| virtual FrameRef | frame (const Timestamp timestamp, SharedAnyCamera *anyCamera=nullptr) const | 
| Returns the frame with a specific timestamp. | |
| virtual FrameRef | frameTimeout (const double timeout, SharedAnyCamera *anyCamera=nullptr) const | 
| Waits until the first frame is available. | |
| virtual bool | hasFrame (const Timestamp timestamp) const | 
| Returns whether this media object currently holds a frame with specified timestamp. | |
| unsigned int | preferredFrameWidth () const | 
| Returns the preferred width of the frame in pixel. | |
| unsigned int | preferredFrameHeight () const | 
| Returns the preferred height of the frame in pixel. | |
| FrameType::PixelFormat | preferredFramePixelFormat () const | 
| Returns the preferred frame pixel format. | |
| FrameFrequency | preferredFrameFrequency () const | 
| Returns the preferred frame frequency in Hz. | |
| virtual HomogenousMatrixD4 | device_T_camera () const | 
| Returns the transformation between the camera and device. | |
| virtual bool | setPreferredFrameDimension (const unsigned int width, const unsigned int height) | 
| Sets the preferred frame dimension. | |
| size_t | capacity () const | 
| Returns the capacity of the frame history of this frame medium object. | |
| bool | setCapacity (const size_t capacity) | 
| Sets or changes the capacity of the frame history of this frame medium object. | |
| FrameCallbackScopedSubscription | addFrameCallback (FrameCallbackFunction &&frameCallbackFunction) | 
| Adds a callback function which is called whenever a new frame arrives. | |
| Protected Member Functions | |
| ImageFileSequence (const std::string &url) | |
| Creates a new image file sequence by a given url. | |
| ~ImageFileSequence () override | |
| Destructs an image file sequence object. | |
| void | threadRun () override | 
| Thread run function. | |
| bool | determineSequence () | 
| Determines the image sequence parameters. | |
| std::string | imageFilename (const unsigned int index) const | 
| Returns the filename of a specific sequence image. | |
| virtual bool | loadImage (const std::string &filename, const Timestamp timestamp, Frame *frame=nullptr)=0 | 
| Loads a new image specified by the filename. | |
|  Protected Member Functions inherited from Ocean::Media::ImageSequence | |
| ImageSequence (const std::string &url) | |
| Creates a new image sequence by a given url. | |
| ~ImageSequence () override | |
| Destructs an image sequence object. | |
|  Protected Member Functions inherited from Ocean::Media::FiniteMedium | |
| FiniteMedium (const std::string &url) | |
| Creates a new finite medium by a given url. | |
|  Protected Member Functions inherited from Ocean::Media::Medium | |
| Medium (const Medium &medium)=delete | |
| Disabled copy constructor. | |
| Medium (const std::string &url) | |
| Creates a new medium by a given url. | |
| virtual | ~Medium () | 
| Destructs a medium. | |
| Medium & | operator= (const Medium &medium)=delete | 
| Disabled copy operator. | |
|  Protected Member Functions inherited from Ocean::Media::FrameMedium | |
| FrameMedium (const std::string &url) | |
| Creates a new frame medium by a given url. | |
| virtual bool | deliverNewFrame (Frame &&frame, SharedAnyCamera &&anyCamera=SharedAnyCamera()) | 
| Delivers a new frame to this FrameMedium. | |
|  Protected Member Functions inherited from Ocean::Thread | |
| Thread (const Thread &thread)=delete | |
| Disabled copy constructor. | |
| void | createThread () | 
| Creates the thread itself. | |
| void | destroyThread () | 
| Destroys the thread itself. | |
| void | stopThreadExplicitly (const unsigned int timeout=5000u) | 
| Tries to stop the thread gracefully. | |
| Thread & | operator= (const Thread &thread)=delete | 
| The disabled assign operator. | |
| Thread (const std::string &name=std::string()) | |
| Creates a new thread object. | |
| Thread (const unsigned int randomNumberSeedValue, const std::string &name=std::string()) | |
| Creates a new thread object. | |
| virtual | ~Thread () | 
| Destructs a thread object. | |
| bool | startThread () | 
| Starts the thread. | |
| void | stopThread () | 
| Informs the thread to stop. | |
| bool | terminateThread () | 
| Terminates the thread. | |
| bool | joinThread (const unsigned int timeout=(unsigned int)(-1)) | 
| Waits until this thread has been stopped. | |
| bool | shouldThreadStop () const | 
| Returns whether this thread should stop. | |
| bool | isThreadInvokedToStart () const | 
| Returns whether this thread has been invoked to start immediately. | |
| bool | isThreadActive () const | 
| Returns whether this thread is active. | |
| Protected Attributes | |
| Timestamp | mediumStartTimestamp | 
| Start timestamp. | |
| Timestamp | mediumPauseTimestamp | 
| Pause timestamp. | |
| Timestamp | mediumStopTimestamp | 
| Stop timestamp. | |
| std::string | mediumFilenamePrefix | 
| Image sequence prefix filename. | |
| std::string | mediumFilenameType | 
| Image sequence filename type. | |
| Frame | mediumNextFrame | 
| Next frame in the sequence. | |
| SharedAnyCamera | camera_ | 
| The camera profile for all images. | |
|  Protected Attributes inherited from Ocean::Media::ImageSequence | |
| unsigned int | mediumFrameStartIndex | 
| Index of the first frame. | |
| unsigned int | mediumFrameIndex | 
| Index of the recent frame. | |
| unsigned int | mediumImages | 
| Number of sequence frames. | |
| unsigned int | mediumFilenameIndexLength | 
| State determining whether the sequence filenames have a constant length. | |
| SequenceMode | mediumSequenceMode | 
| Sequence mode of this image sequence object. | |
| bool | mediumExplicitSequenceModeStarted | 
| State determining whether the explicit sequence mode has been started. | |
|  Protected Attributes inherited from Ocean::Media::FiniteMedium | |
| bool | loop_ = false | 
| Determines whether the medium is played in a loop. | |
|  Protected Attributes inherited from Ocean::Media::Medium | |
| std::string | url_ | 
| Url of the medium. | |
| std::string | libraryName_ | 
| Name of the owner library. | |
| bool | isValid_ = false | 
| Determines whether the medium is valid. | |
| Type | type_ = MEDIUM | 
| Type of the medium. | |
| Lock | lock_ | 
| Medium lock. | |
|  Protected Attributes inherited from Ocean::Media::FrameMedium | |
| FrameCollection | frameCollection_ | 
| Frame collection storing several frames with different timestamps. | |
| FrameCallbackHandler | frameCallbackHandler_ | 
| The handler for frame callback functions. | |
| FrameFrequency | recentFrameFrequency_ = FrameFrequency(0) | 
| Frame frequency. | |
| MediaFrameType | preferredFrameType_ | 
| Preferred frame type of the medium. | |
| Additional Inherited Members | |
|  Public Types inherited from Ocean::Media::ImageSequence | |
| enum | SequenceMode { SM_INVALID , SM_AUTOMATIC , SM_EXPLICIT } | 
| Defines different sequence modes.  More... | |
|  Public Types inherited from Ocean::Media::Medium | |
| enum | Type : uint32_t { MEDIUM = 0u , FRAME_MEDIUM = 1u << 0u , SOUND_MEDIUM = 1u << 1u , FINITE_MEDIUM = 1u << 2u , LIVE_MEDIUM = 1u << 3u , CONFIG_MEDIUM = 1u << 4u , AUDIO = (1u << 5u) | FINITE_MEDIUM | SOUND_MEDIUM , IMAGE = (1u << 6u) | FRAME_MEDIUM , PIXEL_IMAGE = (1u << 7u) | FRAME_MEDIUM , BUFFER_IMAGE = (1u << 8u) | FRAME_MEDIUM , IMAGE_SEQUENCE = (1u << 9u) | FRAME_MEDIUM | FINITE_MEDIUM , LIVE_AUDIO = (1u << 10u) | LIVE_MEDIUM | SOUND_MEDIUM , LIVE_VIDEO = (1u << 11u) | LIVE_MEDIUM | FRAME_MEDIUM , MICROPHONE = (1u << 12u) | LIVE_MEDIUM , MOVIE = (1u << 13u) | FINITE_MEDIUM | FRAME_MEDIUM | SOUND_MEDIUM } | 
| Definition of different medium types.  More... | |
|  Public Types inherited from Ocean::Media::FrameMedium | |
| using | FrameFrequency = double | 
| Definition of a frame frequency defined in Hz. | |
| using | FrameCallbackFunction = std::function< void(const Frame &frame, const SharedAnyCamera &camera)> | 
| Definition of a callback function for frame events. | |
| using | FrameCallbackScopedSubscription = ScopedSubscriptionHandler::ScopedSubscriptionType | 
| Definition of a subscription object for frame callback events. | |
|  Static Public Member Functions inherited from Ocean::Media::Medium | |
| static std::string | convertType (const Type type) | 
| Converts a medium type to a unique string. | |
| static Type | convertType (const std::string &type) | 
| Converts a medium type string to a medium type. | |
|  Static Public Member Functions inherited from Ocean::Media::FrameMedium | |
| static bool | syncedFrames (const FrameMediumRefs &frameMediums, const Timestamp lastTimestamp, FrameRefs &frames, SharedAnyCameras &cameras, const unsigned int waitTime=2u, bool *timedOut=nullptr, HomogenousMatricesD4 *device_T_cameras=nullptr) | 
| Extracts most recent frames from several frame medium objects and ensures that the timestamps of all frames are identical. | |
|  Static Public Attributes inherited from Ocean::Media::FiniteMedium | |
| static constexpr float | AS_FAST_AS_POSSIBLE = 0.0f | 
| Definition of a speed value allowing to deliver the media content as fast as possible. | |
|  Protected Types inherited from Ocean::Media::FrameMedium | |
| using | FrameCallbackHandler = ScopedSubscriptionCallbackHandlerT< FrameCallbackFunction, FrameMedium, true > | 
| Definition of a thread-safe subscription handler for frame callback functions. | |
| using | FrameTypes = std::vector< MediaFrameType > | 
| Definition of a vector holding frame types. | |
|  Protected Types inherited from Ocean::Thread | |
| typedef std::pair< pthread_t, bool > | TimedJoinPair | 
| Definition of a pair holding a thread id and a boolean state. | |
| enum | ThreadPriority { PRIORITY_IDLE , PRIORTY_BELOW_NORMAL , PRIORTY_NORMAL , PRIORTY_ABOVE_NORMAL , PRIORTY_HIGH , PRIORTY_REALTIME } | 
| Definition of different thread priority values.  More... | |
|  Static Protected Member Functions inherited from Ocean::Thread | |
| static void | sleep (unsigned int ms) | 
| Sleeps the calling thread for a given time. | |
| static void | giveUp () | 
| Gives up the remaining thread time. | |
| static ThreadId | currentThreadId () | 
| Returns the thread id of the current (calling) thread. | |
| static ThreadPriority | threadPriority () | 
| Returns the priority of the current thread. | |
| static bool | setThreadPriority (const ThreadPriority priority) | 
| Sets the priority of the current thread. | |
| template<typename TObject , typename TExpectedValue > | |
| static bool | waitForValue (TObject &object, const TExpectedValue &expectedValue, const double timeout=-1.0) | 
| Waits until an object/variable has an expected value. | |
| template<typename TObject , typename TExpectedValue > | |
| static bool | waitForValue (TObject &object, const TExpectedValue &expectedValue, TemporaryScopedLock &temporaryScopedLock, const double timeout=-1.0) | 
| Waits until an object/variable has an expected value. | |
| static int | pthread_timedjoin_np (pthread_t thread, void **retval, const struct timespec *abstime) | 
| Implements a thread join function with timeout value. | |
| 
 | explicitprotected | 
Creates a new image file sequence by a given url.
| url | Url of the image | 
| 
 | overrideprotected | 
Destructs an image file sequence object.
| 
 | overridevirtual | 
Returns the url of the current image.
Implements Ocean::Media::ImageSequence.
| 
 | protected | 
Determines the image sequence parameters.
| 
 | overridevirtual | 
Returns the duration of the finite medium.
Implements Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
Forces the loading of the next image in the sequence.
Implements Ocean::Media::ImageSequence.
| 
 | protected | 
Returns the filename of a specific sequence image.
| index | The index of the sequence image to create the filename for | 
| 
 | overridevirtual | 
Returns the number of images part of the sequence.
Implements Ocean::Media::ImageSequence.
| 
 | overridevirtual | 
Returns whether the medium is started currently.
Implements Ocean::Media::Medium.
| 
 | protectedpure virtual | 
Loads a new image specified by the filename.
| filename | The filename of the image to be loaded | 
| timestamp | Frame timestamp to be used | 
| frame | Optional frame receiving the image data, otherwise the frame will be added to the frame container | 
Implemented in Ocean::Media::ImageIO::IIOImageSequence, Ocean::Media::OpenImageLibraries::OILImageSequence, and Ocean::Media::WIC::WICImageSequence.
| 
 | overridevirtual | 
Returns the duration without speed consideration.
Implements Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
| 
 | overridevirtual | 
Returns the pause timestamp.
Implements Ocean::Media::Medium.
| 
 | overridevirtual | 
Returns the recent position of the finite medium.
Implements Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
Sets the known camera profile of this frame medium.
Reimplemented from Ocean::Media::FrameMedium.
| 
 | overridevirtual | 
Sets the recent position of the finite medium.
Reimplemented from Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
Sets the speed of the finite medium.
The speed of an image sequence is identical with the preferred frame rate (fps).
| speed | The speed to be set in fps, with range [0, infinity) | 
Reimplemented from Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
Returns the speed of the finite medium.
The speed of an image sequence is identical with the preferred frame rate (fps).
Implements Ocean::Media::FiniteMedium.
| 
 | overridevirtual | 
| 
 | overridevirtual | 
Returns the start timestamp.
Implements Ocean::Media::Medium.
| 
 | overridevirtual | 
| 
 | overridevirtual | 
| 
 | overrideprotectedvirtual | 
| 
 | protected | 
The camera profile for all images.
| 
 | protected | 
Image sequence prefix filename.
| 
 | protected | 
Image sequence filename type.
| 
 | protected | 
Next frame in the sequence.
| 
 | protected | 
Pause timestamp.
| 
 | protected | 
Start timestamp.
| 
 | protected | 
Stop timestamp.