#include <CPipeFindSync.h>
Inheritance diagram for AxPipe::Stock::CPipeFindSync:
Public Member Functions | |
CPipeFindSync * | Init (const void *p, size_t cb, bool fInvert=false, int iSkipTo=1) |
Set the sync sequence to look for. | |
Protected Member Functions | |
void | Out (AxPipe::CSeg *pSeg) |
Accept pushed data and skip until sync. | |
Private Member Functions | |
void | PumpBuf (size_t cbBuf) |
Re-generate early parts of the sync sequence. | |
Private Attributes | |
int | m_iSkipTo |
Number of GUID's to skip + 1. | |
const unsigned char * | m_pPattern |
Ptr to the pattern to search for. | |
size_t | m_cbPattern |
Length of pattern. | |
size_t | m_iNext |
Index of next byte to match in pattern. | |
int | m_iInvert |
Flag set to 1 if we are to bit-flip the pattern. | |
bool | m_fSkipAfterSync |
Determine what happens after we've sync'd-. |
Find sync and start or stop passing it on from that point. The default is to start passing data after the first sync that is found, but it's possible to specify how many to skip. The actual sync sequence is not passed along, only the data following it. In some cases it may be necessary to bit-flip the pattern before compare, do specify in the call to Init().
Definition at line 48 of file CPipeFindSync.h.
|
Set the sync sequence to look for. Initialize the pattern to sync with. Note that the we only save a reference to the pattern, so it must not be destructed before this object. Use a negative value of iSkipTo to indicate that you'd like to pass data _until_ the given number of patterns are detected.
Definition at line 44 of file CPipeFindSync.cpp. References m_cbPattern, m_fSkipAfterSync, m_iInvert, m_iNext, m_iSkipTo, and m_pPattern. |
|
Accept pushed data and skip until sync. Accepted segements of pushed data, skipping m_iSkipTo number of occurrences of of the pattern represented by m_pPattern and m_cbPattern before starting to to pass segments through.
Implements AxPipe::CPipe. Definition at line 72 of file CPipeFindSync.cpp. |
|
Re-generate early parts of the sync sequence. Regenerate a partial sync sequence that we've already passed
Definition at line 57 of file CPipeFindSync.cpp. |