mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
mf::ndarray_shared_ring< Frame_dim, Elem > Class Template Reference

Shared ring wrapper with concrete frame type. More...

#include <ndarray_ring.h>

Inheritance diagram for mf::ndarray_shared_ring< Frame_dim, Elem >:
mf::shared_ring

Public Types

using frame_shape_type = typename base::frame_shape_type
 
using frame_view_type = typename base::frame_view_type
 
using section_view_type = ndarray_timed_view< concrete_dim, Elem >
 
- Public Types inherited from mf::shared_ring
using section_view_type = timed_ring::section_view_type
 

Public Member Functions

 ndarray_shared_ring (const frame_shape_type &frame_shape, std::size_t dur, bool seekable, time_unit end_time=-1)
 
section_view_type begin_write (time_unit write_duration)
 
bool try_begin_write (time_unit write_duration, section_view_type &section)
 
section_view_type begin_read_span (time_span span)
 
section_view_type begin_read (time_unit read_duration)
 
bool try_begin_read (time_unit read_duration, section_view_type &section)
 
- Public Member Functions inherited from mf::shared_ring
 shared_ring (const frame_array_properties &, bool seekable, time_unit end_time=-1)
 
void initialize ()
 
const frame_formatformat () const noexcept
 
time_unit capacity () const
 Capacity of buffer. More...
 
section_view_type begin_write (time_unit write_duration)
 Begin writing write_duration frames at current write start time. More...
 
section_view_type try_begin_write (time_unit write_duration)
 Begin writing write_duration frames at current write start time, if they are available. More...
 
bool wait_writable (event &break_event)
 Wait until a frame become writable, or break_event occurs. More...
 
void end_write (time_unit written_duration, bool mark_end=false)
 End writing written_duration frames. More...
 
section_view_type begin_read_span (time_span)
 Begin reading frames at time span span. More...
 
section_view_type begin_read (time_unit read_duration)
 Begin reading read_duration frames at current read start time. More...
 
section_view_type try_begin_read (time_unit read_duration)
 Begin reading read_duration frames at current read start time, if they are available. More...
 
bool wait_readable (event &break_event)
 Wait until a frame become readable, or break_event occurs. More...
 
void end_read (time_unit read_duration)
 End reading read_duration frames. More...
 
void skip (time_unit skip_duration)
 Skips duration frames. More...
 
bool is_seekable () const
 Check if the ring is seekable. More...
 
void seek (time_unit target_time)
 Seeks to read time t. More...
 
bool can_seek (time_unit target_time) const
 Verifies if is is possible to seek to read time t. More...
 
time_unit current_time () const
 Time of last written frame in buffer. More...
 
time_unit write_start_time () const
 Presumptive start time of next write. More...
 
time_unit read_start_time () const
 Read start time. More...
 
time_span writable_time_span () const
 Currently writable time span. More...
 
time_span readable_time_span () const
 Currently readable time span. More...
 
time_unit writable_duration () const
 Currently writable duration. More...
 
time_unit readable_duration () const
 Currently readable duration. More...
 
time_unit end_time () const
 End of file time. */. More...
 
bool end_time_is_defined () const
 True if end of file time is known. */. More...
 
bool writer_reached_end () const
 True if writer has written last frame. More...
 
bool reader_reached_end () const
 True if reader has read last frame. More...
 

Detailed Description

template<std::size_t Frame_dim, typename Elem>
class mf::ndarray_shared_ring< Frame_dim, Elem >

Shared ring wrapper with concrete frame type.

Member Typedef Documentation

template<std::size_t Frame_dim, typename Elem >
using mf::ndarray_shared_ring< Frame_dim, Elem >::frame_shape_type = typename base::frame_shape_type
template<std::size_t Frame_dim, typename Elem >
using mf::ndarray_shared_ring< Frame_dim, Elem >::frame_view_type = typename base::frame_view_type
template<std::size_t Frame_dim, typename Elem >
using mf::ndarray_shared_ring< Frame_dim, Elem >::section_view_type = ndarray_timed_view<concrete_dim, Elem>

Constructor & Destructor Documentation

template<std::size_t Frame_dim, typename Elem >
mf::ndarray_shared_ring< Frame_dim, Elem >::ndarray_shared_ring ( const frame_shape_type frame_shape,
std::size_t  dur,
bool  seekable,
time_unit  end_time = -1 
)
inline

Member Function Documentation

template<std::size_t Frame_dim, typename Elem >
section_view_type mf::ndarray_shared_ring< Frame_dim, Elem >::begin_read ( time_unit  read_duration)
inline
template<std::size_t Frame_dim, typename Elem >
section_view_type mf::ndarray_shared_ring< Frame_dim, Elem >::begin_read_span ( time_span  span)
inline
template<std::size_t Frame_dim, typename Elem >
section_view_type mf::ndarray_shared_ring< Frame_dim, Elem >::begin_write ( time_unit  write_duration)
inline
template<std::size_t Frame_dim, typename Elem >
bool mf::ndarray_shared_ring< Frame_dim, Elem >::try_begin_read ( time_unit  read_duration,
section_view_type section 
)
inline
template<std::size_t Frame_dim, typename Elem >
bool mf::ndarray_shared_ring< Frame_dim, Elem >::try_begin_write ( time_unit  write_duration,
section_view_type section 
)
inline

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