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

#include <dvb_image.h>

Public Member Functions

 DvbImageBuilder (const DvbImageColorSpace *color_space, const RgbaColor &default_color, uint16_t max_width, uint16_t max_height)
 
 DvbImageBuilder (const DvbImageBuilder &)=delete
 
DvbImageBuilderoperator= (const DvbImageBuilder &)=delete
 
uint16_t max_width () const
 
uint16_t max_height () const
 
bool AddPixel (BitDepth bit_depth, uint8_t byte_code, bool is_top_rows)
 
void NewRow (bool is_top_rows)
 
void MirrorToBottomRows ()
 Copies the top-rows to the bottom rows.
 
bool GetPixels (const RgbaColor **pixels, uint16_t *width, uint16_t *height) const
 

Detailed Description

Defines a builder that generates an image from a DVB-sub byte stream. This allocates a single buffer big enough to hold the max-sized image and fills it in series. The NewRow() method must be called to start a new line of the image.

This adds pixels in an interlaced format. Adding pixels and new rows on top-rows doesn't affect the bottom-rows. Top-rows refers to even-indexed lines (e.g. 0,2,4).

Definition at line 89 of file dvb_image.h.

Member Function Documentation

◆ GetPixels()

bool shaka::media::DvbImageBuilder::GetPixels ( const RgbaColor **  pixels,
uint16_t *  width,
uint16_t *  height 
) const

Gets the pixel buffer. Each row is based on the max_width field, but the max filled row with will be given in width. This assumes that NewRow was called recently and we are at the beginning of the rows.

Parameters
pixelsA pointer to a RgbaColor* variable that will be set to the pixel data pointer.
widthWill be filled with the max width of all rows.
heightWill be filled with the number of rows set.
Returns
True on success, false on error.

Definition at line 244 of file dvb_image.cc.


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