grk::PLMarkerMgr Struct Reference

`#include <PLMarkerMgr.h>`

## Public Member Functions

| PLMarkerMgr (void)
| ~PLMarkerMgr (void)
void | disable (void)
bool | isEnabled (void)
void | pushInit (bool isFinal)
bool | pushPL (uint32_t len)
bool | write (void)
uint32_t | getTotalBytesWritten (void)
| PLMarkerMgr (BufferedStream *strm)
bool | readPLT (uint8_t *headerData, uint16_t header_size)
bool | readPLM (uint8_t *headerData, uint16_t header_size)
void | rewind (void)
uint32_t | pop (void)
uint64_t | pop (uint64_t numPackets)

## Private Member Functions

void | clearMarkers (void)
bool | findMarker (uint32_t index, bool compress)
grk_buf8 * | addNewMarker (uint8_t *data, uint16_t len)
bool | readNextByte (uint8_t Iplm, uint32_t *packetLength)

## Private Attributes

PL_MARKERS * | rawMarkers_
PL_MARKERS::iterator | currMarkerIter_
uint32_t | totalBytesWritten_
bool | isFinal_
BufferedStream * | stream_
bool | sequential_
uint32_t | packetLen_
uint32_t | currMarkerBufIndex_
grk_buf8 * | currMarkerBuf_
bool | enabled_

## Constructor & Destructor Documentation

## PLMarkerMgr() [1/2]

grk::PLMarkerMgr::PLMarkerMgr | ( | void |  | ) |

## ~PLMarkerMgr()

grk::PLMarkerMgr::~PLMarkerMgr | ( | void |  | ) |

References clearMarkers(), and rawMarkers_.

## PLMarkerMgr() [2/2]

grk::PLMarkerMgr::PLMarkerMgr | ( | BufferedStream * | strm | ) |

References grk::grk_read(), and stream_.

## Member Function Documentation

## addNewMarker()

grk_buf8 * grk::PLMarkerMgr::addNewMarker | ( | uint8_t * | data,
|  | uint16_t | len
| ) |  |

private

References currMarkerIter_, and grk::grk_read().

Referenced by pushPL(), readPLM(), and readPLT().

## clearMarkers()

void grk::PLMarkerMgr::clearMarkers | ( | void |  | ) |

private

References currMarkerBuf_, currMarkerIter_, grk::grk_read(), and rawMarkers_.

Referenced by pushInit(), and ~PLMarkerMgr().

## disable()

void grk::PLMarkerMgr::disable | ( | void |  | ) |

References enabled_.

## findMarker()

bool grk::PLMarkerMgr::findMarker | ( | uint32_t | index,
|  | bool | compress
| ) |  |

private

References currMarkerIter_, grk::GRK_ERROR(), grk::grk_read(), rawMarkers_, and sequential_.

Referenced by pushPL(), readPLM(), and readPLT().

## getTotalBytesWritten()

uint32_t grk::PLMarkerMgr::getTotalBytesWritten | ( | void |  | ) |

References totalBytesWritten_.

Referenced by grk::TileProcessor::doCompress(), and grk::TileProcessor::writeTilePartT2().

## isEnabled()

bool grk::PLMarkerMgr::isEnabled | ( | void |  | ) |

References enabled_.

Referenced by grk::PLCache::next().

## pop() [1/2]

uint64_t grk::PLMarkerMgr::pop | ( | uint64_t | numPackets | ) |

References grk::grk_read(), and pop().

## pop() [2/2]

uint32_t grk::PLMarkerMgr::pop | ( | void |  | ) |

References grk::grk_buf< T, A >::canRead(), currMarkerBuf_, currMarkerBufIndex_, currMarkerIter_, grk::GRK_ERROR(), grk::grk_read(), grk::grk_buf< T, A >::len, grk::grk_buf< T, A >::offset, rawMarkers_, grk::grk_buf< T, A >::read(), and readNextByte().

Referenced by grk::PLCache::next(), pop(), and grk::PacketIter::skipPackets().

## pushInit()

void grk::PLMarkerMgr::pushInit | ( | bool | isFinal | ) |

References clearMarkers(), grk::grk_read(), isFinal_, and totalBytesWritten_.

Referenced by grk::T2Compress::compressPacketsSimulate().

## pushPL()

bool grk::PLMarkerMgr::pushPL | ( | uint32_t | len | ) |

References addNewMarker(), currMarkerIter_, findMarker(), grk::floorlog2(), grk::grk_read(), isFinal_, grk::plWriteBufferLen, rawMarkers_, totalBytesWritten_, and grk::grk_buf< T, A >::write().

Referenced by grk::T2Compress::compressPacketSimulate().

## readNextByte()

bool grk::PLMarkerMgr::readNextByte | ( | uint8_t | Iplm,
|  | uint32_t * | packetLength
| ) |  |

private

References grk::grk_read(), and packetLen_.

Referenced by pop().

## readPLM()

bool grk::PLMarkerMgr::readPLM | ( | uint8_t * | headerData,
|  | uint16_t | header_size
| ) |  |

References addNewMarker(), findMarker(), grk::GRK_ERROR(), grk::grk_read(), and rawMarkers_.

Referenced by grk::CodeStreamDecompress::read_plm().

## readPLT()

bool grk::PLMarkerMgr::readPLT | ( | uint8_t * | headerData,
|  | uint16_t | header_size
| ) |  |

References addNewMarker(), findMarker(), grk::GRK_ERROR(), grk::GRK_INFO(), and grk::grk_read().

## rewind()

void grk::PLMarkerMgr::rewind | ( | void |  | ) |

References currMarkerBuf_, currMarkerIter_, and rawMarkers_.

Referenced by grk::PLCache::rewind().

## write()

bool grk::PLMarkerMgr::write | ( | void |  | ) |

References grk::grk_read(), isFinal_, grk::J2K_MS_PLT, rawMarkers_, stream_, grk::BufferedStream::writeBytes(), and grk::BufferedStream::writeShort().

Referenced by grk::TileProcessor::writeTilePartT2().

## Member Data Documentation

## currMarkerBuf_

grk_buf8* grk::PLMarkerMgr::currMarkerBuf_

private

Referenced by clearMarkers(), pop(), and rewind().

## currMarkerBufIndex_

uint32_t grk::PLMarkerMgr::currMarkerBufIndex_

private

Referenced by pop().

## currMarkerIter_

PL_MARKERS::iterator grk::PLMarkerMgr::currMarkerIter_

private

Referenced by addNewMarker(), clearMarkers(), findMarker(), pop(), pushPL(), and rewind().

## enabled_

bool grk::PLMarkerMgr::enabled_

private

Referenced by disable(), and isEnabled().

## isFinal_

bool grk::PLMarkerMgr::isFinal_

private

Referenced by pushInit(), pushPL(), and write().

## packetLen_

uint32_t grk::PLMarkerMgr::packetLen_

private

Referenced by readNextByte().

## rawMarkers_

PL_MARKERS* grk::PLMarkerMgr::rawMarkers_

private

Referenced by clearMarkers(), findMarker(), pop(), pushPL(), readPLM(), rewind(), write(), and ~PLMarkerMgr().

## sequential_

bool grk::PLMarkerMgr::sequential_

private

Referenced by findMarker().

## stream_

BufferedStream* grk::PLMarkerMgr::stream_

private

Referenced by PLMarkerMgr(), and write().

## totalBytesWritten_

uint32_t grk::PLMarkerMgr::totalBytesWritten_

private

Referenced by getTotalBytesWritten(), pushInit(), and pushPL().

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

- PLMarkerMgr.h
- PLMarkerMgr.cpp