Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends

df_SplitInfoUnpacker Class Reference
[IVD Data format.]

#include <df.h>

Inheritance diagram for df_SplitInfoUnpacker:
Inheritance graph
[legend]
Collaboration diagram for df_SplitInfoUnpacker:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 df_SplitInfoUnpacker (ivd_MedVolNum_t a_medVolNum, ivd_MediaKey_t a_mediaKey, df_BlockProxy *a_reader, bool a_unpackNSCfields=false, ivd_BlockOffset_t a_lastDataVolBlkOfs=0, const cmn_UUID_t &a_volumeID=cmn_UUID_t(string("")))
 Default constructor.
virtual ~df_SplitInfoUnpacker ()
ivd_MedVolNum_t GetMedVolNum ()
ivd_MediaKey_t GetMediumKey ()
vector< UInt64_tGetMinorCollocationIds ()

Protected Member Functions

virtual void ProcRecFileHdr (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecFileEnd (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecBSStart (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecEmbData (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecRawData (const UInt8_t *a_block_p)
virtual void ProcRecBSEnd (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecFRIEnd (const df_RecCmn_t *a_recCmn_p)
virtual void ProcRecFRISpInfo (const df_RecCmn_t *a_recCmn_p)
virtual void ProcEndOfInput ()
 method ProcEndOfInput() must be called at the end of input when block per block parsing is used (migration, FRI check before wirtten to media.
void ExtractCollocationIds (const char *a_block_p, UInt32_t a_size)

Protected Attributes

ivd_BlockOffset_t m_lastDataVolBlkOfs
ivd_BlockOffset_t m_lastDataPosInFRI
bool m_collocationDataValid
UInt64_t m_majorColId
UInt64_t m_lastMinorColId
vector< UInt64_tm_minorColIds

Private Member Functions

virtual void ProcSplitInfo (df_SplitInfo *a_splitInfo)
 when one split info is parsed then call ProcSplitInfo()

Private Attributes

 log_CLASSID_m
 Macro to add class name member s_className.
const bool m_unpackNSCfields
bool m_unpackMetaData
string m_lastStreamName
const ivd_MedVolNum_t m_medVolNum
const ivd_MediaKey_t m_mediaKey
df_SplitInfo m_splitInfo
UInt64_t m_streamOfs
 TODO reuse following members from inherited class df_RecordReader m_curStreamOffset, m_curStreamLeft, m_curStreamType, m_curStreamName.clear().
UInt64_t m_streamSizeToRead
 size of stream that need to be read streamsize - streamOfs
UInt64_t m_readStreamSize
 how much atream is realy read
UInt64_t m_allStreamOfs
 point in data format where stream is written
bool m_headerToWrite
 Does the header for this stream have to be written?

Friends

IVD_DF_DECL_d ostream & operator<< (ostream &a_os, const df_SplitInfoUnpacker &a_obj)

Detailed Description

Definition at line 1679 of file df.h.


Constructor & Destructor Documentation

df_SplitInfoUnpacker::df_SplitInfoUnpacker ( ivd_MedVolNum_t  a_medVolNum,
ivd_MediaKey_t  a_mediaKey,
df_BlockProxy a_reader,
bool  a_unpackNSCfields = false,
ivd_BlockOffset_t  a_lastDataVolBlkOfs = 0,
const cmn_UUID_t a_volumeID = cmn_UUID_t(string("")) 
)

Default constructor.

Definition at line 53 of file df_splitinfounpacker.cpp.

References ie_PRECONDITION, ivd_Error, m_splitInfo, and df_SplitInfo::mediaKey.

        :
        df_RecReader(a_reader, a_volumeID),
        m_unpackNSCfields(a_unpackNSCfields),
        m_unpackMetaData(false),
        m_medVolNum(a_medVolNum),
        m_mediaKey(a_mediaKey),
        m_headerToWrite(false),
        m_lastDataVolBlkOfs(a_lastDataVolBlkOfs),
        m_lastDataPosInFRI(0),
        m_collocationDataValid(false),
        m_majorColId(0),
        m_lastMinorColId(0)
{
    // empty
    m_splitInfo.mediaKey = 0;
    if (a_mediaKey > USHRT_MAX) {
        stringstream err;
        err << " The medium key is too large ("
            << a_mediaKey << "). "
            << " Not supported by the FSC.\n";
        throw ivd_Error(ie_PRECONDITION, err.str(), true);
    }
}

virtual df_SplitInfoUnpacker::~df_SplitInfoUnpacker (  )  [inline, virtual]

Definition at line 1691 of file df.h.

{};


Member Function Documentation

void df_SplitInfoUnpacker::ExtractCollocationIds ( const char *  a_block_p,
UInt32_t  a_size 
) [protected]

Definition at line 414 of file df_splitinfounpacker.cpp.

References dbg_DETAIL, _ivdfs_Collocation_EA_tag::EaName, ivdfs_COLLOCATION_EANAME_SZ_d, log_DBG_m, log_FUNC_m, m_collocationDataValid, m_lastMinorColId, m_majorColId, m_minorColIds, _ivdfs_Collocation_EA_tag::major, _ivdfs_Collocation_EA_tag::minor, and _ivdfs_Collocation_EA_tag::NextEntryOffset.

Referenced by ProcRecEmbData().

                                                                                       {
    log_FUNC_m(ExtractCollocationIds);

#if TGT_OS_windows
    char* buffer_p = const_cast<char*>(a_block_p);
    ivdfs_Collocation_EA_t *ea;
    do { // go through all EAs
        ea = reinterpret_cast<ivdfs_Collocation_EA_t*>(buffer_p);

        if (memcmp(ea->EaName, ivdfs_COLLOCATION_EANAME_SZ_d, sizeof(ivdfs_COLLOCATION_EANAME_SZ_d)) == 0) {
            log_DBG_m(dbg_DETAIL, "Collocation EA found."
                << " Major: 0x" << hex << ea->major
                << " Minor: 0x" << hex << ea->minor);

            if ((ea->major == 0) || (ea->minor == 0)) {
                log_DBG_m(dbg_DETAIL, "Skipped");
                return;
            }
            if (!m_collocationDataValid) {
                m_majorColId = ea->major;
                m_collocationDataValid = true;
            }
            else if (m_majorColId != ea->major) {
                // TODO: Log error?
                log_DBG_m(dbg_DETAIL, "BUG: Unexpected major collocation ID"
                    << " 0x" << hex << ea->major
                    << " (expected 0x" << hex << m_majorColId << ").");

                m_collocationDataValid = false;
                m_minorColIds.clear();
                return;
            }

            if (m_lastMinorColId != ea->minor) {
                bool alreadyInserted(false);
                for (UInt32_t i(0); i < m_minorColIds.size(); i++) {
                    if (m_minorColIds[i] == ea->minor) {
                        alreadyInserted = true;
                        break;
                    }
                }

                if (!alreadyInserted) {
                    m_minorColIds.push_back(ea->minor);
                    m_lastMinorColId = ea->minor;
                    log_DBG_m(dbg_DETAIL, "Minor ID " << ea->minor << " inserted.");
                }
            }
            // No need to check other EAs
            break;
        }

        // move to next EA
        buffer_p += ea->NextEntryOffset;
        if ((a_block_p + a_size) > buffer_p) {
            // Out of buffer
            break;
        }
    } while (ea->NextEntryOffset != 0);
#else
    log_DBG_m(dbg_DETAIL, "No implementation for Linux.");
#endif
}

Here is the caller graph for this function:

ivd_MediaKey_t df_SplitInfoUnpacker::GetMediumKey (  )  [inline]

Definition at line 1745 of file df.h.

Referenced by i_FSC_i::InsertSplitFromFRIBlock(), and fsc_VolumeCheck::RestDataHandle().

{ return m_mediaKey; };

Here is the caller graph for this function:

ivd_MedVolNum_t df_SplitInfoUnpacker::GetMedVolNum (  )  [inline]

Definition at line 1744 of file df.h.

Referenced by i_FSC_i::InsertSplitFromFRIBlock(), and fsc_VolumeCheck::RestDataHandle().

{ return m_medVolNum; };

Here is the caller graph for this function:

vector<UInt64_t> df_SplitInfoUnpacker::GetMinorCollocationIds (  )  [inline]

Definition at line 1746 of file df.h.

Referenced by i_FSC_i::InsertSplitFromFRIBlock().

{ return m_minorColIds; }

Here is the caller graph for this function:

void df_SplitInfoUnpacker::ProcEndOfInput (  )  [protected, virtual]

method ProcEndOfInput() must be called at the end of input when block per block parsing is used (migration, FRI check before wirtten to media.

).

Reimplemented from df_RecReader.

Definition at line 382 of file df_splitinfounpacker.cpp.

References dbg_DETAIL, df_RecReader::GetLastKnownGoodBlockID(), ie_DF_INVSEQ, ie_DF_INVSTATE, cmn_UUID_t::IsNull(), log_DBG_m, log_FUNC_m, df_RecReader::m_currVolID, m_lastDataPosInFRI, and m_lastDataVolBlkOfs.

                                          {
    log_FUNC_m(ProcEndOfInput);

    log_DBG_m(dbg_DETAIL,  "m_currVolID " << m_currVolID
                       <<  ", m_lastDataVolBlkOfs " << m_lastDataVolBlkOfs);

    if (!m_currVolID.IsNull()) {
        ostringstream sstr;
        sstr << *this;
        throw ivd_DFError(
            ie_DF_INVSEQ,
            GetLastKnownGoodBlockID(),
            "No more FRI data, but FRIEnd missing.", sstr.str(), true);
    }

    if ( m_lastDataVolBlkOfs == 0) {
        return;
    }

    if (m_lastDataPosInFRI < m_lastDataVolBlkOfs) {
        ostringstream sstr;
        sstr
            << " FRI end position : " << m_lastDataPosInFRI
            << " lastBlkOfs : " << m_lastDataVolBlkOfs << endl
            << *this;
        throw ivd_DFError(
            ie_DF_INVSTATE,
            GetLastKnownGoodBlockID(),
            "Read less FRI data then expected.", sstr.str(), true);
    }
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecBSEnd ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 265 of file df_splitinfounpacker.cpp.

References df_SplitInfo::attrStream, df_Stream::Cut(), dbg_DETAIL, dbg_LOW, df_SS_COMPLETE, df_ST_META, evt_ERROR, df_SplitInfo::failedDataType, df_SplitInfo::fileID, ie_DATA_CORRUPTION, log_DBG_m, log_FUNC_m, log_WriteEvent(), df_RecReader::m_curStreamName, df_RecReader::m_curStreamType, df_RecReader::m_ignoreCorruptedMetaData, m_lastStreamName, m_readStreamSize, m_splitInfo, m_streamSizeToRead, m_unpackMetaData, m_unpackNSCfields, ntoh(), df_RecByteStreamEnd_t::status, and df_Stream::WriteZeroes().

                                                                     {
    log_FUNC_m(ProcRecBSEnd);

    if (  !m_unpackNSCfields
       || !m_unpackMetaData) {
        return;
    }
    const df_RecByteStreamEnd_t *bse_p = df_GetSpecificRec<df_RecByteStreamEnd_t>(a_recCmn_p);
    if (m_lastStreamName != m_curStreamName) {
        throw ivd_InternalError(ie_DATA_CORRUPTION,
                "BSEnd stream name doesn't match BSS name. Start name = '" + m_lastStreamName
                + "', end name = '" + m_curStreamName + string("'"));
    }
    // check if all stream is read
    if (m_streamSizeToRead != m_readStreamSize) {
        if (m_readStreamSize == 0) {
            log_DBG_m(dbg_LOW,
                "Detected empty split \'" << m_curStreamName << "\'");
        }
        else {
            log_DBG_m(dbg_LOW,
                "Incomplete re-located stream \'" << m_curStreamName <<
                "\'. Filling remainder with zeroes.");
            // fill zeroes up to the end of the stream

            m_splitInfo.attrStream.WriteZeroes(m_streamSizeToRead - m_readStreamSize);
        }
    }

    if (ntoh(bse_p->status) != df_SS_COMPLETE) {
        // failedDataType member could be used in future for better error handling.
        // see bug
        m_splitInfo.failedDataType |= m_curStreamType;
        if (m_ignoreCorruptedMetaData && (m_curStreamType == df_ST_META)) {
            ostringstream sstr;
            sstr << "Incomplete meta data stream ignored. "
                 << " FileID = " << m_splitInfo.fileID;
            log_WriteEvent(evt_ERROR, sstr.str());
            m_splitInfo.attrStream.Cut(sizeof(df_StandardAttr_t));
        }
        else {
            log_DBG_m(dbg_DETAIL,
                "Stream is not complete. FileID = " << m_splitInfo.fileID
                << " failed byte stream type = " << m_curStreamType
                << " Only header is stored in attrStream.");
            m_splitInfo.attrStream.Cut(sizeof(df_StandardAttr_t));
        }
    }

    // prepare for next stream
    m_lastStreamName.erase();
    m_unpackMetaData = false;
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecBSStart ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 189 of file df_splitinfounpacker.cpp.

References df_RecByteStreamStart_t::allStreamSize, at_ADS, df_SplitInfo::attrStream, df_ST_ALTDATA, df_ST_META, df_RecCmn_t::GetVarDataNet(), m_allStreamOfs, df_RecReader::m_curStreamLeft, df_RecReader::m_curStreamType, m_headerToWrite, m_lastStreamName, m_readStreamSize, m_splitInfo, m_streamOfs, m_streamSizeToRead, m_unpackMetaData, m_unpackNSCfields, ntoh(), ivd_VarData_t::size, df_RecByteStreamStart_t::streamName, df_RecByteStreamStart_t::streamOffset, df_RecByteStreamStart_t::streamSize, and df_Stream::Write().

                                                                       {
    if (!m_unpackNSCfields) {
        return;
    }
    const df_RecByteStreamStart_t *bss_p = df_GetSpecificRec<df_RecByteStreamStart_t>(a_recCmn_p);
    if (m_curStreamType == df_ST_META) {
        m_lastStreamName = a_recCmn_p->GetVarDataNet(bss_p->streamName);
//        if (m_lastStreamName == c_df_StreamNameMetaWinACL) {
        m_unpackMetaData = true;
        // to know where is stored
        m_readStreamSize    = 0;
        m_streamOfs         = ntoh(bss_p->streamOffset);
        UInt64_t streamSize = ntoh(bss_p->streamSize);
        m_streamSizeToRead  = streamSize - m_streamOfs ;
        m_allStreamOfs      = ntoh(bss_p->allStreamSize);

        m_headerToWrite = true;
    }
    else if (m_curStreamType == df_ST_ALTDATA) {
        UInt32_t nameSize = ntoh(bss_p->streamName.size);
        df_AttrHeader_t ah(at_ADS, 0, nameSize);
        m_splitInfo.attrStream.Write((char*)&ah, sizeof(ah));
        m_splitInfo.attrStream.Write(a_recCmn_p->GetVarDataNet(bss_p->streamName),
                                     nameSize);
        // ADS are not packed in FRI
        m_curStreamLeft = 0;
    }
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecEmbData ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]
void df_SplitInfoUnpacker::ProcRecFileEnd ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 143 of file df_splitinfounpacker.cpp.

References at_FIRSTSPLIT, at_SPLIT, df_SplitInfo::attrStream, df_SplitInfo::continueSplit, dbg_DETAIL, df_RF_SPLITTED, df_SplitInfo::Dump(), df_SplitInfo::fileID, df_RecCmn_t::flags, df_RecReader::GetLastKnownGoodBlockID(), ie_DF_INVSEQ, df_SplitInfo::lastSplit, log_DBG_m, log_FUNC_m, m_splitInfo, df_SplitInfo::mediaKey, ntoh(), ProcSplitInfo(), df_SplitInfo::splitOffset, df_SplitInfo::splitSize, and df_Stream::Write().

                                                                      {
    log_FUNC_m(ProcRecFileEnd);

    // if not splited then is last split

    // df_distiler did not set df_RF_SPLITTED at fileEnd record before version 3.0.131 Beta_01
    // Work around: recreate FRI for particular volume.
    UInt32_t flags = ntoh(a_recCmn_p->flags);
    m_splitInfo.lastSplit = !(flags & df_RF_SPLITTED);

    log_DBG_m(dbg_DETAIL, "last split " << boolalpha << m_splitInfo.lastSplit
                    << ", flags " << hex << flags << dec);

    if (  !m_splitInfo.mediaKey) {
        throw ivd_DFError(
            ie_DF_INVSEQ,
            GetLastKnownGoodBlockID(),
            "No File record before FileEnd");
    }
    log_DBG_m(dbg_DETAIL, "At FEnd extracted from FRI " << m_splitInfo.Dump());
    const df_RecFileEnd_t *recFileEnd_p = df_GetSpecificRec<df_RecFileEnd_t>(a_recCmn_p);


    if (ntoh(recFileEnd_p->status) == df_FS_COMPLETE) { // skip it if not valid
        if (m_splitInfo.continueSplit || (flags & df_RF_SPLITTED) != 0) { //
            // write info about the split

            df_AttrType_e splitPosition = at_LASTSPLIT;
            if ( (flags & df_RF_SPLITTED) != 0) {
                splitPosition = (m_splitInfo.continueSplit) ? at_SPLIT : at_FIRSTSPLIT;
            }
            log_DBG_m(dbg_DETAIL,
                "File ID: " << m_splitInfo.fileID <<
                ", splitPosition:" << splitPosition);

            df_AttrHeader_t at(splitPosition, m_splitInfo.splitOffset, m_splitInfo.splitSize);
            m_splitInfo.attrStream.Write((char*)&at, sizeof(at));
        }
        ProcSplitInfo(&m_splitInfo);
    }
    // clear mediaKey
    m_splitInfo.mediaKey = 0;
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecFileHdr ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 97 of file df_splitinfounpacker.cpp.

References df_SplitInfo::attrStream, df_SplitInfo::chunkOffset, df_RecFile_t::chunkSize, df_SplitInfo::chunkSize, df_Stream::Clear(), df_SplitInfo::continueSplit, df_SplitInfo::dataType, df_SplitInfo::failedDataType, df_SplitInfo::fileID, df_SplitInfo::fileName, df_SplitInfo::fileSize, df_SplitInfo::fileType, df_RecCmn_t::flags, df_RecCmn_t::GetVarDataNet(), df_RecFile_t::idFile, df_RecFile_t::idMig, df_RecFile_t::idParent, df_RecFile_t::idParentOld, df_SplitInfo::lastSplit, m_mediaKey, m_medVolNum, m_splitInfo, df_SplitInfo::mediaKey, df_SplitInfo::medVolNum, df_SplitInfo::migrationID, df_RecFile_t::name, df_RecFile_t::nameOld, df_SplitInfo::noCopies, ntoh(), df_RecFile_t::numCopies, df_StandardAttr_t::numLinks, df_SplitInfo::numLinks, df_SplitInfo::oldFileName, df_SplitInfo::oldOwnerID, OnlyFileName(), df_SplitInfo::ownerID, ivd_VarData_t::size, df_StandardAttr_t::size, df_SplitInfo::splitOffset, df_SplitInfo::splitSize, df_RecFile_t::stdAttr, df_StandardAttr_t::type, and df_Stream::Write().

                                                                      {
    const df_RecFile_t *file_p = df_GetSpecificRec<df_RecFile_t>(a_recCmn_p);

    m_splitInfo.fileType     = static_cast<ivd_FileType_e>( ntoh(file_p->stdAttr.type) );
    m_splitInfo.dataType     = ivd_ATTR_d;
    m_splitInfo.failedDataType = 0;

#if IVD_POSIX_OS
    #warning "do we use numLinks"
#elif TGT_OS_windows
    #pragma message ("WARNING: do we use numLinks")
#endif
    m_splitInfo.numLinks     = ntoh(file_p->stdAttr.numLinks);
    m_splitInfo.lastSplit    = false;        // we do not know yet

    m_splitInfo.medVolNum    = m_medVolNum;
    m_splitInfo.mediaKey     = m_mediaKey;

    m_splitInfo.noCopies     = ntoh(file_p->numCopies);

    m_splitInfo.fileID       = static_cast<ivd_FileID_t>(ntoh(file_p->idFile));
    m_splitInfo.migrationID  = ntoh(file_p->idMig);
    m_splitInfo.fileSize     = ntoh(file_p->stdAttr.size);
    m_splitInfo.chunkSize    = ntoh(file_p->chunkSize);
    m_splitInfo.ownerID      = static_cast<ivd_FileID_t>(ntoh(file_p->idParent));
    m_splitInfo.oldOwnerID   = static_cast<ivd_FileID_t>(ntoh(file_p->idParentOld));

    m_splitInfo.fileName = OnlyFileName(a_recCmn_p->GetVarDataNet(file_p->name),
                                        ntoh(file_p->name.size));

    m_splitInfo.oldFileName = OnlyFileName(a_recCmn_p->GetVarDataNet(file_p->nameOld),
                                        ntoh(file_p->nameOld.size));

    m_splitInfo.chunkOffset  = 0;
    m_splitInfo.splitOffset  = 0;
    m_splitInfo.splitSize    = 0;

    m_splitInfo.attrStream.Clear();
    m_splitInfo.attrStream.Write((const char*)&file_p->stdAttr,
                                 sizeof(file_p->stdAttr));

    m_splitInfo.continueSplit = ntoh(a_recCmn_p->flags) & df_RF_CONTINUED;
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecFRIEnd ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 320 of file df_splitinfounpacker.cpp.

References at_FIRSTSPLIT, at_SPLIT, df_SplitInfo::attrStream, df_SplitInfo::continueSplit, dbg_LOW, df_RecFRIEnd_t::endPos, log_DBG_m, log_FUNC_m, df_RecReader::m_curStreamName, m_lastDataPosInFRI, m_readStreamSize, m_splitInfo, m_streamSizeToRead, m_unpackMetaData, df_SplitInfo::mediaKey, ntoh(), ProcSplitInfo(), df_SplitInfo::splitOffset, df_SplitInfo::splitSize, df_Stream::Write(), and df_Stream::WriteZeroes().

                                                                      {
    log_FUNC_m(ProcRecFRIEnd);

    const df_RecFRIEnd_t *frie_p = df_GetSpecificRec<df_RecFRIEnd_t>(a_recCmn_p);
    m_lastDataPosInFRI = ntoh(frie_p->endPos);

    // at end of tape no file End record exist. lastSplit stay false
    if (m_splitInfo.mediaKey != 0) {

        if (m_unpackMetaData) {
            // check if all stream is read
            if (m_streamSizeToRead != m_readStreamSize) {
                if (m_readStreamSize == 0) {
                    log_DBG_m(dbg_LOW,
                        "Detected empty split \'" << m_curStreamName << "\'");
                }
                else {
                    log_DBG_m(dbg_LOW,
                        "Incomplete re-located stream \'" << m_curStreamName <<
                        "\'. Filling remainder with zeroes.");
                        // fill zeroes up to the end of the stream

                    m_splitInfo.attrStream.WriteZeroes(m_streamSizeToRead - m_readStreamSize);
                }
            }

            m_unpackMetaData = false;
        }
        // not all stream data read, write spliPos Info.
        df_AttrType_e splitPosition = (m_splitInfo.continueSplit)
                                    ? at_SPLIT
                                    : at_FIRSTSPLIT;
        df_AttrHeader_t at(splitPosition, m_splitInfo.splitOffset, m_splitInfo.splitSize);
        m_splitInfo.attrStream.Write((char*)&at, sizeof(at));

        ProcSplitInfo(&m_splitInfo);
        m_splitInfo.mediaKey = 0;
    }

}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecFRISpInfo ( const df_RecCmn_t a_recCmn_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 363 of file df_splitinfounpacker.cpp.

References df_RecFRISpInfo_t::allStreamOffset, df_RecFRISpInfo_t::allStreamSize, df_SplitInfo::blockOffset, df_SplitInfo::dataType, dbg_DETAIL, log_DBG_m, log_FUNC_m, m_splitInfo, df_RecFRISpInfo_t::mediaBlockAddr, ntoh(), df_SplitInfo::splitOffset, df_SplitInfo::splitSize, and df_RecFRISpInfo_t::streamType.

                                                                        {
    log_FUNC_m(ProcRecFRISpInfo);

    const df_RecFRISpInfo_t *friSI_p = df_GetSpecificRec<df_RecFRISpInfo_t>(a_recCmn_p);

    m_splitInfo.splitOffset = ntoh(friSI_p->allStreamOffset);
    m_splitInfo.splitSize   = ntoh(friSI_p->allStreamSize);
    m_splitInfo.dataType    = static_cast<ivd_DataType_t>(  // only lower 16-bit
                                                    ntoh(friSI_p->streamType));
    m_splitInfo.blockOffset = ntoh(friSI_p->mediaBlockAddr);
    log_DBG_m(dbg_DETAIL, "df_RecFRISpInfo_t: "
        << "\nallStreamOffset " << m_splitInfo.splitOffset
        << "\nallStreamSize " << m_splitInfo.splitSize
        << "\nstreamType " << m_splitInfo.dataType
        << "\nmediaBlockAddr " << m_splitInfo.blockOffset
        << endl);
}

Here is the call graph for this function:

void df_SplitInfoUnpacker::ProcRecRawData ( const UInt8_t a_block_p  )  [protected, virtual]

Reimplemented from df_RecReader.

Definition at line 250 of file df_splitinfounpacker.cpp.

References df_SplitInfo::attrStream, df_RecReader::GetBlkSize(), log_ERR_m, log_FUNC_m, m_readStreamSize, m_splitInfo, m_unpackMetaData, m_unpackNSCfields, and df_Stream::Write().

                                                                  {
    log_FUNC_m(ProcRecRawData);

    log_ERR_m("Raw data blocks not supported for streams from FRI." << (*this) );

    if (  !m_unpackNSCfields
       || !m_unpackMetaData) {
        return;
    }
    m_readStreamSize += GetBlkSize();
    m_splitInfo.attrStream.Write((const char*)a_block_p, GetBlkSize());
}

Here is the call graph for this function:

virtual void df_SplitInfoUnpacker::ProcSplitInfo ( df_SplitInfo a_splitInfo  )  [inline, private, virtual]

when one split info is parsed then call ProcSplitInfo()

Reimplemented in fsc_FRIunpacker, and fsc_VolumeCheck.

Definition at line 1752 of file df.h.

Referenced by ProcRecFileEnd(), and ProcRecFRIEnd().

{};

Here is the caller graph for this function:


Friends And Related Function Documentation

IVD_DF_DECL_d ostream& operator<< ( ostream &  a_os,
const df_SplitInfoUnpacker a_obj 
) [friend]

Definition at line 479 of file df_splitinfounpacker.cpp.

                                                                     {
    a_os << "m_mediumKey : " << a_o.m_mediaKey << endl
         << "m_medVolNum : " << a_o.m_medVolNum << endl
         << "m_unpackNSCfields : " << boolalpha  << a_o.m_unpackNSCfields << endl
         << "m_unpackMetaData : " << boolalpha << a_o.m_unpackMetaData << endl
         << "m_lastDataVolBlkOfs : " << a_o.m_lastDataVolBlkOfs << endl
         << endl
         << *static_cast<const df_RecReader*>(&a_o);

    return a_os;
}


Member Data Documentation

Macro to add class name member s_className.

Reimplemented from df_RecReader.

Reimplemented in fsc_FRIblockUnpacker, fsc_FRIunpacker, and fsc_VolumeCheck.

Definition at line 1691 of file df.h.

point in data format where stream is written

Definition at line 1717 of file df.h.

Referenced by ProcRecBSStart().

Definition at line 1726 of file df.h.

Referenced by ExtractCollocationIds().

Does the header for this stream have to be written?

Definition at line 1720 of file df.h.

Referenced by ProcRecBSStart(), and ProcRecEmbData().

Definition at line 1724 of file df.h.

Referenced by ProcEndOfInput(), and ProcRecFRIEnd().

Definition at line 1723 of file df.h.

Referenced by operator<<(), and ProcEndOfInput().

Definition at line 1728 of file df.h.

Referenced by ExtractCollocationIds().

Definition at line 1699 of file df.h.

Referenced by ProcRecBSEnd(), ProcRecBSStart(), and ProcRecEmbData().

Definition at line 1727 of file df.h.

Referenced by ExtractCollocationIds().

Definition at line 1701 of file df.h.

Referenced by operator<<(), and ProcRecFileHdr().

Definition at line 1700 of file df.h.

Referenced by operator<<(), and ProcRecFileHdr().

Definition at line 1729 of file df.h.

Referenced by ExtractCollocationIds().

how much atream is realy read

Definition at line 1715 of file df.h.

Referenced by ProcRecBSEnd(), ProcRecBSStart(), ProcRecEmbData(), ProcRecFRIEnd(), and ProcRecRawData().

TODO reuse following members from inherited class df_RecordReader m_curStreamOffset, m_curStreamLeft, m_curStreamType, m_curStreamName.clear().

start point of stream data

Definition at line 1711 of file df.h.

Referenced by ProcRecBSStart(), and ProcRecEmbData().

size of stream that need to be read streamsize - streamOfs

Definition at line 1713 of file df.h.

Referenced by ProcRecBSEnd(), ProcRecBSStart(), ProcRecEmbData(), and ProcRecFRIEnd().

Definition at line 1697 of file df.h.

Referenced by operator<<(), ProcRecBSEnd(), ProcRecBSStart(), ProcRecEmbData(), and ProcRecRawData().


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