Shaka Packager SDK
Public Member Functions | List of all members
shaka::media::ByteQueue Class Reference

#include <byte_queue.h>

Public Member Functions

void Reset ()
 Reset the queue to the empty state.
 
void Push (const uint8_t *data, int size)
 Append new bytes to the end of the queue.
 
void Peek (const uint8_t **data, int *size) const
 
void Pop (int count)
 

Detailed Description

Represents a queue of bytes. Data is added to the end of the queue via an Push() and removed via Pop(). The contents of the queue can be observed via the Peek() method. This class manages the underlying storage of the queue and tries to minimize the number of buffer copies when data is appended and removed.

Definition at line 22 of file byte_queue.h.

Member Function Documentation

◆ Peek()

void shaka::media::ByteQueue::Peek ( const uint8_t **  data,
int *  size 
) const

Get a pointer to the front of the queue and the queue size. These values are only valid until the next Push() or Pop() call.

Definition at line 62 of file byte_queue.cc.

◆ Pop()

void shaka::media::ByteQueue::Pop ( int  count)

Remove a number of bytes from the front of the queue.

Parameters
countspecifies number of bytes to be popped.

Definition at line 69 of file byte_queue.cc.


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