mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
mf::timed_ring Class Reference

Ring buffer which adds absolute time index to frames. More...

#include <timed_ring.h>

Inheritance diagram for mf::timed_ring:
mf::ring mf::ndarray_generic< raw_ring_allocator > mf::ndarray< 2, byte, raw_ring_allocator > mf::ndarray_timed_ring< Frame_dim, Elem >

Public Types

using section_view_type = timed_frame_array_view
 
- Public Types inherited from mf::ring
using section_view_type = frame_array_view
 
- Public Types inherited from mf::ndarray_generic< raw_ring_allocator >
using view_type = ndarray_view_generic< 2 >
 
- Public Types inherited from mf::ndarray< 2, byte, raw_ring_allocator >
using view_type = ndarray_view< Dim, byte >
 
using const_view_type = ndarray_view< Dim, const byte >
 
using index_type = typename view_type::index_type
 
using coordinates_type = typename view_type::coordinates_type
 
using shape_type = typename view_type::shape_type
 
using strides_type = typename view_type::strides_type
 
using span_type = typename view_type::span_type
 
using value_type = byte
 
using pointer = byte *
 
using const_pointer = const byte *
 
using reference = byte &
 
using const_reference = const byte &
 
using iterator = typename view_type::iterator
 
using const_iterator = typename const_view_type::iterator
 

Public Member Functions

 timed_ring (const frame_array_properties &prop)
 
void initialize ()
 
time_unit current_time () const noexcept
 
time_unit read_start_time () const noexcept
 
time_unit write_start_time () const noexcept
 
time_span readable_time_span () const
 
time_span writable_time_span () const
 
bool can_write_span (time_span) const
 
bool can_read_span (time_span) const
 
bool can_skip_span (time_span) const
 
section_view_type begin_write (time_unit)
 
section_view_type begin_write_span (time_span)
 
void end_write (time_unit written_duration)
 
section_view_type begin_read (time_unit)
 
section_view_type begin_read_span (time_span)
 
void skip_span (time_span)
 
void seek (time_unit)
 
- Public Member Functions inherited from mf::ring
 ring (const frame_array_properties &)
 
void initialize ()
 
time_unit total_duration () const noexcept
 
time_unit frame_length () const noexcept
 
time_unit writable_duration () const
 
time_unit readable_duration () const
 
section_view_type begin_write (time_unit duration)
 
void end_write (time_unit written_duration)
 
section_view_type begin_read (time_unit duration)
 
void end_read (time_unit read_duration)
 
void skip (time_unit duration)
 
- Public Member Functions inherited from mf::ndarray_generic< raw_ring_allocator >
 ndarray_generic (const ndarray_generic_properties &, std::size_t padding=0, const raw_ring_allocator &=raw_ring_allocator())
 
 ndarray_generic (const ndarray_generic &)=default
 
const frame_formatformat () const noexcept
 
view_type view ()
 
- Public Member Functions inherited from mf::ndarray< 2, byte, raw_ring_allocator >
 ndarray (const shape_type &shp, const raw_ring_allocator &allocator=raw_ring_allocator())
 
 ndarray (const const_view_type &)
 
 ndarray (const ndarray &arr)
 
 ~ndarray ()
 
ndarrayoperator= (const const_view_type &arr)
 
ndarrayoperator= (const ndarray &arr)
 
view_type view ()
 
const_view_type view () const
 
const_view_type cview () const
 
 operator view_type () noexcept
 
 operator const_view_type () const noexcept
 
coordinates_type index_to_coordinates (const index_type &index) const
 
index_type coordinates_to_index (const coordinates_type &coord) const
 
pointer coordinates_to_pointer (const coordinates_type &coord)
 
const_pointer coordinates_to_pointer (const coordinates_type &coord) const
 
std::size_t size () const noexcept
 
pointer start () noexcept
 
const_pointer start () const noexcept
 
const shape_typeshape () const noexcept
 
const strides_typestrides () const noexcept
 
std::size_t contiguous_length () const noexcept
 
std::size_t padding () const noexcept
 
decltype(auto) section (Args &&...args)
 
decltype(auto) section (Args &&...args) const
 
decltype(auto) slice (Args &&...args)
 
decltype(auto) slice (Args &&...args) const
 
decltype(auto) operator() (Args &&...args)
 
decltype(auto) operator() (Args &&...args) const
 
decltype(auto) operator[] (Args &&...args)
 
decltype(auto) operator[] (Args &&...args) const
 
decltype(auto) at (Args &&...args)
 
decltype(auto) at (Args &&...args) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 

Additional Inherited Members

- Static Public Attributes inherited from mf::ndarray< 2, byte, raw_ring_allocator >
static constexpr std::size_t dimension
 
- Protected Member Functions inherited from mf::ndarray< 2, byte, raw_ring_allocator >
void allocate_ ()
 
void deallocate_ ()
 
 ndarray (const shape_type &shape, std::size_t padding, std::size_t stride, const raw_ring_allocator &allocator)
 Constructor for use by derived classes. More...
 
strides_type strides_with_padding_ (const shape_type &shape, std::size_t padding)
 
- Protected Attributes inherited from mf::ndarray< 2, byte, raw_ring_allocator >
raw_ring_allocator allocator_
 Raw allocator used to allocate memory, in bytes. More...
 
std::size_t stride_
 Stride of elements, in bytes. More...
 
std::size_t padding_
 Padding between frames, in bytes. More...
 
std::size_t allocated_size_
 Allocated memory size, in bytes. More...
 
view_type view_
 View used to access items. More...
 

Detailed Description

Ring buffer which adds absolute time index to frames.

Member Typedef Documentation

Constructor & Destructor Documentation

mf::timed_ring::timed_ring ( const frame_array_properties prop)
inline

Member Function Documentation

auto mf::timed_ring::begin_read ( time_unit  duration)
auto mf::timed_ring::begin_read_span ( time_span  span)
auto mf::timed_ring::begin_write ( time_unit  duration)
auto mf::timed_ring::begin_write_span ( time_span  span)
bool mf::timed_ring::can_read_span ( time_span  span) const
bool mf::timed_ring::can_skip_span ( time_span  span) const
bool mf::timed_ring::can_write_span ( time_span  span) const
time_unit mf::timed_ring::current_time ( ) const
inlinenoexcept
void mf::timed_ring::end_write ( time_unit  written_duration)
void mf::timed_ring::initialize ( )
time_unit mf::timed_ring::read_start_time ( ) const
noexcept
time_span mf::timed_ring::readable_time_span ( ) const
void mf::timed_ring::seek ( time_unit  t)
void mf::timed_ring::skip_span ( time_span  span)
time_span mf::timed_ring::writable_time_span ( ) const
time_unit mf::timed_ring::write_start_time ( ) const
noexcept

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