dxd - dynax driver framework  2721
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::dmus::stream< circular_t, bus_t, stream_desc_t > Class Template Reference

dmus::stream More...

#include <dxd_portcls_audio.h>

+ Inheritance diagram for dxd::dmus::stream< circular_t, bus_t, stream_desc_t >:
+ Collaboration diagram for dxd::dmus::stream< circular_t, bus_t, stream_desc_t >:

Public Types

typedef bus_t bus
 
typedef stream_desc_t stream_desc
 

Public Member Functions

virtual os_result start ()
 
virtual void stop ()
 
 stream (::IUnknown *unknown,::IAllocatorMXF *allocator,::IMasterClock *master_clock, const ::DEVICE_OBJECT *wdm_bus, const dx::stream::open< bus_t > &open, const stream_desc_t &stream_desc, unsigned char cable)
 MIDI stream constructor. More...
 
 ~stream ()
 

Public Attributes

os_result status =not_initialized
 

Protected Types

enum  priority { priority::low =LOW_PRIORITY, priority::realtime =LOW_REALTIME_PRIORITY, priority::high =HIGH_PRIORITY }
 

Protected Member Functions

bool cancel ()
 
virtual void completion (os_result)
 
::NTSTATUS __stdcall ConnectOutput (::IMXF *sink) overridefinal
 
os_result ctl (unsigned int ioctl, bool internal=false)
 
::NTSTATUS __stdcall DisconnectOutput (::IMXF *sink) overridefinal
 
os_result ictl (unsigned int ioctl, receipt_t &receipt, bool internal=false)
 
os_result ioctl (const void *post, size_t post_size, unsigned int ioctl, void *receipt, size_t receipt_size, bool internal=false)
 IOCTL IRP http://msdn.microsoft.com/en-us/library/windows/hardware/ff540663(v=vs.85).aspx. More...
 
os_result ioctl (const post_t &post, unsigned int ioctl, receipt_t &receipt, bool internal=false)
 
os_result octl (const post_t &post, unsigned int ioctl, bool internal=false)
 
os_result octl (unsigned int post, unsigned int ioctl, bool internal=false)
 
os_result prio (priority priority)
 
os_result run ()
 IOKit process thread start. More...
 
os_result run ()
 
::NTSTATUS __stdcall SetState (::KSSTATE state) overridefinal
 Sets the state of the channel. More...
 
os_result submit (unsigned int ioctl, void *others)
 submit other IRP More...
 

Static Protected Member Functions

static unsigned int prio ()
 
static unsigned int prio ()
 

Protected Attributes

os_event data
 data available event More...
 
os_event gap
 space available event More...
 
circular_t * io
 define the I/O class for shared memory More...
 
uint64_t rx =0
 
bool started =false
 
os_result status
 

Detailed Description

template<typename circular_t, typename bus_t, typename stream_desc_t>
class dxd::dmus::stream< circular_t, bus_t, stream_desc_t >

dmus::stream

generic_audio.png

Member Typedef Documentation

template<typename circular_t , typename bus_t , typename stream_desc_t >
typedef bus_t dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::bus
template<typename circular_t , typename bus_t , typename stream_desc_t >
typedef stream_desc_t dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::stream_desc
inherited

Member Enumeration Documentation

enum dxd::process::priority
stronginherited
Enumerator
low 

Lowest thread priority level.

realtime 

Lowest realtime priority level.

high 

Highest thread priority level.

Constructor & Destructor Documentation

template<typename circular_t , typename bus_t , typename stream_desc_t >
dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::stream ( ::IUnknown *  unknown,
::IAllocatorMXF *  allocator,
::IMasterClock *  master_clock,
const ::DEVICE_OBJECT *  wdm_bus,
const dx::stream< circular_t, bus_t, stream_desc_t >::open< bus_t > &  open,
const stream_desc_t &  stream_desc,
unsigned char  cable 
)
inline

MIDI stream constructor.

starts base driver streaming

+ Here is the call graph for this function:

template<typename circular_t , typename bus_t , typename stream_desc_t >
dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::~stream ( )
inline

stop streaming

Following sequence is only needed if stream was not disconnected: stops the streaming-from-device thread,

and waits for its termination while deconstruction.

If destructor waits here, it must reset the event! otherwise the stream process destructor will stall.

closes the endpoint,

+ Here is the call graph for this function:

Member Function Documentation

bool dxd::wdm::irp< synchrony_t >::cancel ( )
inlineinherited
virtual void dxd::wdm::irp< synchrony_t >::completion ( os_result  )
inlineprotectedvirtualinherited
template<typename circular_t , typename bus_t , typename stream_desc_t >
::NTSTATUS __stdcall dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::ConnectOutput ( ::IMXF *  sink)
inlinefinaloverrideprotected

Checks if this stream is not already connected,

checks if sink is valid,

this is a from-device-to-applicatopn stream: start device reader thread

+ Here is the call graph for this function:

os_result dxd::wdm::irp< synchrony_t >::ctl ( unsigned int  ioctl,
bool  internal = false 
)
inlineinherited

+ Here is the call graph for this function:

template<typename circular_t , typename bus_t , typename stream_desc_t >
::NTSTATUS __stdcall dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::DisconnectOutput ( ::IMXF *  sink)
inlinefinaloverrideprotected

stops the streaming-from-device thread

and waits for its termination to ensure the stream is still connected.

If DisconnectOutput() waits here, it must reset the event! otherwise the stream cannot be deleted.

os_result dxd::wdm::irp< synchrony_t >::ictl ( unsigned int  ioctl,
receipt_t &  receipt,
bool  internal = false 
)
inlineinherited

+ Here is the call graph for this function:

os_result dxd::wdm::irp< synchrony_t >::ioctl ( const void *  post,
size_t  post_size,
unsigned int  ioctl,
void *  receipt,
size_t  receipt_size,
bool  internal = false 
)
inlineinherited

IOCTL IRP http://msdn.microsoft.com/en-us/library/windows/hardware/ff540663(v=vs.85).aspx.

Todo:
: check and refuse IRQL; handle completion
Todo:
:for asynchronous IRP request: move buffered copy into completion!

+ Here is the call graph for this function:

os_result dxd::wdm::irp< synchrony_t >::ioctl ( const post_t &  post,
unsigned int  ioctl,
receipt_t &  receipt,
bool  internal = false 
)
inlineinherited

+ Here is the call graph for this function:

os_result dxd::wdm::irp< synchrony_t >::octl ( const post_t &  post,
unsigned int  ioctl,
bool  internal = false 
)
inlineinherited

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::wdm::irp< synchrony_t >::octl ( unsigned int  post,
unsigned int  ioctl,
bool  internal = false 
)
inlineinherited

+ Here is the call graph for this function:

static unsigned int dxd::process::prio ( )
inlinestaticinherited
static unsigned int dxd::process::prio ( )
inlinestaticinherited
os_result dxd::process::prio ( priority  priority)
inlineinherited
os_result dxd::process::run ( )
inlineinherited

IOKit process thread start.

run() starts this process. The internal mechanism blocks object termination until thread start() returns.

+ Here is the caller graph for this function:

os_result dxd::process::run ( )
inlineinherited
template<typename circular_t , typename bus_t , typename stream_desc_t >
::NTSTATUS __stdcall dxd::dmus::stream< circular_t, bus_t, stream_desc_t >::SetState ( ::KSSTATE  state)
inlinefinaloverrideprotected

Sets the state of the channel.

template<typename circular_t , typename bus_t , typename stream_desc_t >
virtual os_result dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::start ( )
inlinevirtualinherited

starts base driver streaming

+ Here is the caller graph for this function:

template<typename circular_t , typename bus_t , typename stream_desc_t >
virtual void dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::stop ( )
inlinevirtualinherited

stops the underlaying base driver streaming

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::wdm::irp< synchrony_t >::submit ( unsigned int  ioctl,
void *  others 
)
inlineinherited

submit other IRP

+ Here is the call graph for this function:

Member Data Documentation

os_event dxd::stream::opened< circular_t >::data
inherited

data available event

os_event dxd::stream::opened< circular_t >::gap
inherited

space available event

circular_t * dxd::stream::opened< circular_t >::io
inherited

define the I/O class for shared memory

template<typename circular_t , typename bus_t , typename stream_desc_t >
uint64_t dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::rx =0
protectedinherited
template<typename circular_t , typename bus_t , typename stream_desc_t >
bool dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::started =false
protectedinherited
template<typename circular_t , typename bus_t , typename stream_desc_t >
os_result dxd::portcls::stream< circular_t, bus_t, stream_desc_t >::status =not_initialized
inherited
os_result dxd::process::status
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Sun May 5 2019

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.