OpenJPH
Open-source implementation of JPEG2000 Part-15
ojph::stex::stex_file Struct Reference

holds in memory j2k codestream together with other info More...

#include <stream_expand_support.h>

Public Member Functions

 stex_file ()
 default constructor More...
 
void init (frames_handler *parent, stex_file *next, j2k_frame_storer *storer, const char *name_template)
 call this function to initialize stex_file More...
 
void notify_file_completion ()
 other threads can call this function to signal completion of processing.
More...
 

Public Attributes

ojph::mem_outfile f
 holds in-memory j2k codestream More...
 
ui32 time_stamp
 time stamp at which this file must be displayed More...
 
ui32 last_seen_seq
 the last seen RTP sequence number More...
 
std::atomic_int done
 saving is completed when 0 is reached More...
 
ui32 frame_idx
 frame number in the sequence More...
 
frames_handlerparent
 the object holding this frame More...
 
const char * name_template
 name template for saved files More...
 
j2k_frame_storerstorer
 stores a j2k frame using another thread More...
 
stex_filenext
 used to create files chain More...
 

Detailed Description

holds in memory j2k codestream together with other info

This objects holds a j2k codestream file. The codestream is identified by its timestamp. Once complete the file is pushed to saver.

File chains can be created using the "next" member variable.

This object is handled by frames_handler, and therefore, it does not have many functions. stex_file does not create any objects of its own.

The object also serves to pass information to the j2k_frame_storer, which is run by another thread

Definition at line 353 of file stream_expand_support.h.

Constructor & Destructor Documentation

◆ stex_file()

ojph::stex::stex_file::stex_file ( )
inline

default constructor

Definition at line 358 of file stream_expand_support.h.

References done, frame_idx, last_seen_seq, name_template, next, parent, storer, and time_stamp.

Member Function Documentation

◆ init()

void ojph::stex::stex_file::init ( frames_handler parent,
stex_file next,
j2k_frame_storer storer,
const char *  name_template 
)
inline

call this function to initialize stex_file

It just copies parameters to the object.

Parameters
parentis a pointer to the object holding this file, which is frames_handler
nextis used to chain files
storerthis object is used to store j2k codestreams
name_templatefile name template to use for storeing files

Definition at line 381 of file stream_expand_support.h.

References name_template, next, parent, and storer.

Referenced by ojph::stex::frames_handler::init().

◆ notify_file_completion()

void ojph::stex::stex_file::notify_file_completion ( )

other threads can call this function to signal completion of processing.

This function basically reduces "done", and when 0 is reached the function will let the parent know that there is a stex_file waiting removal.

Definition at line 241 of file stream_expand_support.cpp.

References done, ojph::stex::frames_handler::increment_num_complete_files(), and parent.

Referenced by ojph::stex::j2k_frame_storer::execute().

Member Data Documentation

◆ done

std::atomic_int ojph::stex::stex_file::done

◆ f

◆ frame_idx

ui32 ojph::stex::stex_file::frame_idx

◆ last_seen_seq

ui32 ojph::stex::stex_file::last_seen_seq

the last seen RTP sequence number

Definition at line 403 of file stream_expand_support.h.

Referenced by ojph::stex::frames_handler::check_files_in_processing(), ojph::stex::frames_handler::push(), and stex_file().

◆ name_template

const char* ojph::stex::stex_file::name_template

name template for saved files

Definition at line 408 of file stream_expand_support.h.

Referenced by ojph::stex::j2k_frame_storer::execute(), init(), and stex_file().

◆ next

◆ parent

frames_handler* ojph::stex::stex_file::parent

the object holding this frame

Definition at line 406 of file stream_expand_support.h.

Referenced by init(), notify_file_completion(), and stex_file().

◆ storer

j2k_frame_storer* ojph::stex::stex_file::storer

stores a j2k frame using another thread

Definition at line 409 of file stream_expand_support.h.

Referenced by init(), ojph::stex::frames_handler::send_to_processing(), and stex_file().

◆ time_stamp

ui32 ojph::stex::stex_file::time_stamp

time stamp at which this file must be displayed

Definition at line 402 of file stream_expand_support.h.

Referenced by ojph::stex::frames_handler::check_files_in_processing(), ojph::stex::frames_handler::push(), and stex_file().


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