#include <online-tcp-source.h>
Public Member Functions | |
OnlineTcpVectorSource (int32 socket) | |
~OnlineTcpVectorSource () | |
bool | Read (Vector< BaseFloat > *data) |
bool | IsConnected () |
size_t | SamplesProcessed () |
void | ResetSamples () |
Public Member Functions inherited from OnlineAudioSourceItf | |
virtual | ~OnlineAudioSourceItf () |
Private Member Functions | |
bool | ReadFull (char *buf, int32 len) |
int32 | GetNextPack () |
int32 | FillFrame (int32 size) |
KALDI_DISALLOW_COPY_AND_ASSIGN (OnlineTcpVectorSource) | |
Private Attributes | |
int32 | socket_desc |
bool | connected |
char * | pack |
int32 | pack_size |
char * | frame |
int32 | frame_size |
int32 | last_pack_size |
int32 | last_pack_rem |
size_t | samples_processed |
Definition at line 34 of file online-tcp-source.h.
OnlineTcpVectorSource | ( | int32 | socket | ) |
Definition at line 29 of file online-tcp-source.cc.
References OnlineTcpVectorSource::frame, OnlineTcpVectorSource::frame_size, OnlineTcpVectorSource::pack, and OnlineTcpVectorSource::pack_size.
Definition at line 41 of file online-tcp-source.cc.
References OnlineTcpVectorSource::frame, and OnlineTcpVectorSource::pack.
|
private |
Definition at line 93 of file online-tcp-source.cc.
References OnlineTcpVectorSource::frame, OnlineTcpVectorSource::GetNextPack(), OnlineTcpVectorSource::last_pack_rem, OnlineTcpVectorSource::last_pack_size, and OnlineTcpVectorSource::pack.
Referenced by OnlineTcpVectorSource::Read().
|
private |
Definition at line 71 of file online-tcp-source.cc.
References KALDI_ERR, OnlineTcpVectorSource::pack, OnlineTcpVectorSource::pack_size, and OnlineTcpVectorSource::ReadFull().
Referenced by OnlineTcpVectorSource::FillFrame().
bool IsConnected | ( | ) |
Definition at line 151 of file online-tcp-source.cc.
References OnlineTcpVectorSource::connected.
Referenced by main().
|
private |
Implements OnlineAudioSourceItf.
Definition at line 125 of file online-tcp-source.cc.
References OnlineTcpVectorSource::connected, VectorBase< Real >::Dim(), OnlineTcpVectorSource::FillFrame(), OnlineTcpVectorSource::frame, OnlineTcpVectorSource::frame_size, rnnlm::i, and OnlineTcpVectorSource::samples_processed.
Definition at line 53 of file online-tcp-source.cc.
References OnlineTcpVectorSource::connected, and OnlineTcpVectorSource::socket_desc.
Referenced by OnlineTcpVectorSource::GetNextPack().
void ResetSamples | ( | ) |
Definition at line 49 of file online-tcp-source.cc.
References OnlineTcpVectorSource::samples_processed.
Referenced by main().
size_t SamplesProcessed | ( | ) |
Definition at line 46 of file online-tcp-source.cc.
References OnlineTcpVectorSource::samples_processed.
Referenced by main().
|
private |
Definition at line 52 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::IsConnected(), OnlineTcpVectorSource::Read(), and OnlineTcpVectorSource::ReadFull().
|
private |
Definition at line 55 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::FillFrame(), OnlineTcpVectorSource::OnlineTcpVectorSource(), OnlineTcpVectorSource::Read(), and OnlineTcpVectorSource::~OnlineTcpVectorSource().
|
private |
Definition at line 56 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::OnlineTcpVectorSource(), and OnlineTcpVectorSource::Read().
|
private |
Definition at line 58 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::FillFrame().
|
private |
Definition at line 58 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::FillFrame().
|
private |
Definition at line 53 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::FillFrame(), OnlineTcpVectorSource::GetNextPack(), OnlineTcpVectorSource::OnlineTcpVectorSource(), and OnlineTcpVectorSource::~OnlineTcpVectorSource().
|
private |
Definition at line 54 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::GetNextPack(), and OnlineTcpVectorSource::OnlineTcpVectorSource().
|
private |
Definition at line 60 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::Read(), OnlineTcpVectorSource::ResetSamples(), and OnlineTcpVectorSource::SamplesProcessed().
|
private |
Definition at line 51 of file online-tcp-source.h.
Referenced by OnlineTcpVectorSource::ReadFull().