|
dxd - dynax driver framework 2.6.0d204
cross platform open source driver development framework
|
#include <dx_usb_stream_pipe.h>
Classes | |
| struct | cache |
| struct | isoc |
Public Types | |
| typedef struct device_t::desc::stream | desc |
| typedef device<> | device_t |
| typedef device<> | device_t |
| typedef event< kernel > | event_t |
| enum | type |
Public Member Functions | |
| pipe & | abort () try |
| stream & | attach (channel_t **[2], uint64_t[(channels+63)/64]) |
| virtual void | callback () |
| void | conclude () noexcept override |
| conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there. | |
| dx_catchall_rethrow () os_result status() const noexcept | |
| dx_catchall_rethrow (;,"endpoint:%x interface:%d setting:%d", endpoint.address, endpoint.interface, endpoint.setting) pipe &max_frame_size(uint32_t frame_size) | |
| void | exception (const class exception &exception, bool filtered=false) const noexcept override |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | flush () override |
| void | launch () override try |
| operator dx::circular * () const noexcept | |
| operator os_event () noexcept | |
| dx::circular * | operator-> () const noexcept |
| pipe & | operator<< (const data_t &data) |
| synchronous USB write request | |
| pipe & | operator>> (data_t &data) |
| synchronous USB read request | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | reset (uint64_t count=0) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | reset (uint64_t count=0) override try |
| event & | signal (uint64_t count=1) override try |
| event & | signal (uint64_t count=1) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END uint64_t | signalled () const |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END uint64_t | signalled () const |
| virtual unsigned int | stop (bool force=false) noexcept |
| virtual unsigned int | stop (bool force=false) noexcept |
| virtual bool | submit (dx::stream::encoder::index::type, unsigned int, uint8_t) |
| submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start(). | |
| pipe & | submit (const request< data_t > &request) const try |
| standard request to pipe | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | wait (bool reset=false) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | wait (bool reset=false) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END bool | wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END bool | wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try |
Public Attributes | |
| const usb::endpoint::attributes & | attributes |
| std::deque< union audio::descriptor::endpoint > | audio |
| class buffer { | |
| } | buffer |
| event_t | data [direction::directions] |
| event signalising data arrival(in) or draining(out) | |
| uint32_t | granularity |
| ::WINUSB_INTERFACE_HANDLE | handle |
| const decltype(desc::target.idx()) | id |
| interface & | interface |
| uint32_t | latency |
| bool | launched |
| bool | launched |
| uint32_t | linesize |
| unsigned int | micro_frames |
| dx::stream::clock::monitor * | monitor |
| std::deque< std::function< void(control &)> > | notify |
| std::deque< std::function< void(control &)> > | notify |
| decltype(device_t::samplerate) & | samplerate |
| std::atomic< unsigned int > | started |
| std::atomic< unsigned int > | started |
Static Public Attributes | |
| static constexpr auto | scope |
Protected Member Functions | |
| __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) public | |
| creates this->circular streaming backing store and frame buffers | |
| __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void pump_in() noexcept try | |
| data driven streaming in | |
| __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void pump_out() noexcept try | |
| data driven streaming out | |
| void | alloc (size_t=0, bool free=true) override |
| catch (...) | |
| catch (...) | |
| catch (...) | |
| catch (...) | |
| catch (...) | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| catch (const std::exception &__std_exception) | |
| catch (const std::exception &__std_exception) | |
| catch (const std::exception &__std_exception) | |
| catch (const std::exception &__std_exception) | |
| catch (const std::exception &__std_exception) | |
| dx_catchall_handler (this,) ~pipe() override | |
| float | encoder (dx::stream::encoder::index::type type, unsigned int index) const override |
| bool | encoder (dx::stream::encoder::index::type type, unsigned int index, float value) override |
| void | exception (const dx::exception &exception, bool filtered=false) const noexcept override |
| notification exception handler | |
| void | free () noexcept override |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | halt () noexcept override |
| void | info (std::ostream &os) noexcept override try |
| log object class information | |
| void | initialize (uint32_t packet_size, uint32_t micro_frames) |
| void | initialize (uint32_t samplerate, uint32_t line_size, uint32_t micro_frames, bool implicit_feedback) |
| void | initialize () override |
| void | received (os_result status, size_t size) override try |
| virtual async callbacks | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | received (os_result status, size_t size, int64_t timestamp, usb::isoc::frame *frame) override try |
| async isoc read callback | |
| bool | start (uint64_t frame, unsigned int starting=1) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | transmitted (os_result status, size_t size) override try |
| async write callback | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | transmitted (os_result status, size_t size, int64_t timestamp, usb::isoc::frame *) override try |
| async isoc write callback | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END void | watchdog () noexcept try |
| observer watchdog thread: for clock driven endpoints | |
Protected Attributes | |
| struct { | |
| } | address |
| struct { | |
| volatile uint32_t completion | |
| os_result status | |
| streaming status for observer thread More... | |
| uint32_t submit | |
| } | async |
| struct dx::usb::stream::pipe::cache | cache |
| dx::circular * | circular |
| device<> & | device |
| device<> & | device |
| uint8_t | idx |
| struct dx::usb::stream::pipe::isoc | isoc |
| std::recursive_mutex | start_stop_in_progress |
| start/stop operation in progress | |
| std::recursive_mutex | start_stop_in_progress |
| start/stop operation in progress | |
| struct { | |
| struct { | |
| unsigned int ticks | |
| struct { | |
| unsigned int count | |
| } transaction | |
| } cycle | |
| } | sync |
| struct dx::usb::audio::isoc::cycle::tick * | tick = nullptr |
| struct { | |
| ::WINUSB_INTERFACE_HANDLE handle | |
| } | winusb |
Friends | |
| class | pause |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
stronginherited |
|
inlineprotected |
creates this->circular streaming backing store and frame buffers
|
inlineprotectednoexcept |
data driven streaming in
postponed
|
inlineprotectednoexcept |
data driven streaming out
|
inlineinherited |
|
inlineoverrideprotectedvirtual |
generates isoc cycle metrics from sample rate,
requests buffers to fit at least 3x max iosize with isoc cycle size granularity
update max frame size
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineinherited |
The default implementation is based on event<user> which is signalled when triggered via callback() from kernel. This is to achieve compatibility with Windows events. Its probably more adequate to overwrite callback() and do the work here if feasible.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineoverridevirtualnoexceptinherited |
conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.
Reimplemented from dx::object.
|
inlineoverrideprotected |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineoverrideprotected |
|
inlineoverrideprotectedvirtual |
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineoverridenoexceptinherited |
|
inlineoverrideprotectedvirtualnoexcept |
notification exception handler
Implements dx::object.
|
inlineoverridevirtualinherited |
Reimplemented from dx::stream::control< stream::object< device_t > >.
|
inlineoverrideprotectedvirtualnoexcept |
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineoverrideprotectedvirtualnoexcept |
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineoverrideprotectedvirtualnoexcept |
log object class information
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineinherited |
|
inlineinherited |
|
inlineoverrideprotectedvirtual |
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineoverridevirtualinherited |
Reimplemented from dx::object.
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
synchronous USB write request
|
inlineinherited |
synchronous USB read request
|
inlineoverrideprotectedvirtual |
virtual async callbacks
generates timestamp
Reimplemented from dx::usb::platform::pipe< device_t, interface >.
|
inlineoverrideprotected |
async isoc read callback
|
inlineoverrideinherited |
|
inlineoverrideinherited |
|
inlineoverrideprotectedvirtual |
result indicates if start changed the state.
estimate upcoming timestamp
scheduling all but one isoc requests at least 1 sequence ahead; aligned to whole cycles,
Reimplemented from dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inlinevirtualinherited |
submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().
|
inlineinherited |
standard request to pipe
|
inlineoverrideprotectedvirtual |
async write callback
generates timestamp
Reimplemented from dx::usb::platform::pipe< device_t, interface >.
|
inlineoverrideprotected |
async isoc write callback
|
inlineoverrideinherited |
|
inlineoverrideinherited |
|
inlineinherited |
wait with duration timeout returns true: signalled false: timed out
|
inlineinherited |
wait with duration timeout returns true: signalled false: timed out
|
inlineprotectednoexcept |
observer watchdog thread: for clock driven endpoints
|
friend |
| struct { ... } dx::usb::platform::pipe< device<>, interface >::address |
| struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::async |
|
inherited |
|
inherited |
| class { ... } ::buffer dx::usb::platform::pipe< device<>, interface >::buffer |
|
protected |
|
protectedinherited |
| volatile uint32_t dx::usb::stream::pipe< device_t, circular_t, stream_t >::completion |
| unsigned int dx::usb::stream::pipe< device_t, circular_t, stream_t >::count |
| struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::cycle |
|
inherited |
event signalising data arrival(in) or draining(out)
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
|
protected |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
start/stop operation in progress
|
protectedinherited |
start/stop operation in progress
|
inherited |
|
inherited |
| os_result dx::usb::stream::pipe< device_t, circular_t, stream_t >::status |
streaming status for observer thread
| uint32_t dx::usb::stream::pipe< device_t, circular_t, stream_t >::submit |
| struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::sync |
|
inherited |
| unsigned int dx::usb::stream::pipe< device_t, circular_t, stream_t >::ticks |
| struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::transaction |
| struct { ... } dx::usb::platform::pipe< device<>, interface >::winusb |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |