Project Name  Version 1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
jh_monitor_ts Struct Reference

Defines the progress status of a library function, allowing both progress monitoring and encoding canceling. More...

#include <jh_datatypes.h>

Data Fields

volatile int cancel
volatile float progress

Detailed Description

Defines the progress status of a library function, allowing both progress monitoring and encoding canceling.

Note
The variables of type jh_monitor_ts serve both caller (a consumer of the requested service) and callee (the provider of the requested service). When the caller decides to stop the callee, it sets the value of cancel to 1. The callee is supposed to watch this variable. When the value of cancel becomes non-zero, the callee shuts down nicely whatever it is doing.
The value of progress must be in the range 0 to 1, indicating the percentage of the work completed by the callee. When the progress is reported to the caller, the caller is allowed to update a progress indicator. The caller is responsible for setting the correct values of the variables.
At the moment the callee is called, the value of cancel must be 0.

Definition at line 114 of file jh_datatypes.h.

Field Documentation

volatile int jh_monitor_ts::cancel

Cancel flag. If set, the execution of a library function is aborted.

Definition at line 115 of file jh_datatypes.h.

volatile float jh_monitor_ts::progress

A library function updates this variable during execution. Valid values 0 = 0% to 1 = 100%.

Definition at line 116 of file jh_datatypes.h.


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