#include <query.h>
Public Member Functions | |
QueryBuffering (GstQuery* query) | |
void | set (bool busy, int percent) |
Set the percentage of buffered data. | |
void | parse (bool& busy, int& percent) |
Get the busy flag and percentage of the buffered data. | |
bool | parse_busy () |
Get the busy flag of the buffered data. | |
int | parse_percent () |
Get the percentage of the buffered data. | |
void | set (BufferingMode mode, int avg_in, int avg_out, gint64 buffering_left) |
Configures the buffering stats values in query. | |
void | parse (BufferingMode& mode, int& avg_in, int& avg_out, gint64 buffering_left) |
Extracts the buffering stats values from the query. | |
BufferingMode | parse_mode () |
Extracts the buffering mode from the query. | |
int | parse_input_rate () |
Extracts the average input rate from the query. | |
int | parse_output_rate () |
Extracts the average output rate from the query. | |
gint64 | parse_time_left () |
Extracts the buffering time left from the query. | |
void | set (Format format, gint64 start, gint64 stop, gint64 estimated_total) |
Set the available query result fields in query. | |
void | parse (Format& format, gint64& start, gint64& stop, gint64& estimated_total) |
Parse the query, writing the format into format, and other results into the passed parameters. | |
Format | parse_format () |
Parse the query, returning the format. | |
gint64 | parse_start () |
Parse the query, returning the start range value. | |
gint64 | parse_stop () |
Parse the query, returning the stop range value. | |
gint64 | parse_total_time () |
Parse the query, returning the estimated total amount of download time. | |
Static Public Member Functions | |
static Glib::RefPtr<Gst::Query> | create (Format format) |
Constructs a new query object for querying the buffering status of a stream. |
See create() for more details.
Gst::QueryBuffering::QueryBuffering | ( | GstQuery * | query | ) | [explicit] |
static Glib::RefPtr<Gst::Query> Gst::QueryBuffering::create | ( | Format | format | ) | [static] |
Constructs a new query object for querying the buffering status of a stream.
format | The default Gst::Format for the new query. |
void Gst::QueryBuffering::parse | ( | Format& | format, | |
gint64 & | start, | |||
gint64 & | stop, | |||
gint64 & | estimated_total | |||
) |
Parse the query, writing the format into format, and other results into the passed parameters.
Use the other parse() methods to parse individual values.
format | The location to store the format. | |
start | The location to store the start. | |
stop | The location to store the stop. | |
estimated_total | The location to store the estimated total amount of download time. |
void Gst::QueryBuffering::parse | ( | BufferingMode& | mode, | |
int & | avg_in, | |||
int & | avg_out, | |||
gint64 | buffering_left | |||
) |
Extracts the buffering stats values from the query.
Use the other parse() methods to parse individual values.
mode | The location to store the buffering mode. | |
avg_in | The location to store the average input rate. | |
avg_out | The location to store the average output rate. | |
buffering_left | The location to store the amount of buffering time left. |
void Gst::QueryBuffering::parse | ( | bool & | busy, | |
int & | percent | |||
) |
Get the busy flag and percentage of the buffered data.
The percent is a value between 0 and 100. The busy indicator is true when the buffering is in progress. Use the other parse() methods to parse individual values.
busy | The location to store the buffering busy flag. | |
percent | The location to store the buffering percent. |
bool Gst::QueryBuffering::parse_busy | ( | ) |
Get the busy flag of the buffered data.
The busy indicator is true when the buffering is in progress.
Format Gst::QueryBuffering::parse_format | ( | ) |
int Gst::QueryBuffering::parse_input_rate | ( | ) |
Extracts the average input rate from the query.
BufferingMode Gst::QueryBuffering::parse_mode | ( | ) |
Extracts the buffering mode from the query.
int Gst::QueryBuffering::parse_output_rate | ( | ) |
Extracts the average output rate from the query.
int Gst::QueryBuffering::parse_percent | ( | ) |
Get the percentage of the buffered data.
The percent is a value between 0 and 100.
gint64 Gst::QueryBuffering::parse_start | ( | ) |
gint64 Gst::QueryBuffering::parse_stop | ( | ) |
gint64 Gst::QueryBuffering::parse_time_left | ( | ) |
Extracts the buffering time left from the query.
gint64 Gst::QueryBuffering::parse_total_time | ( | ) |
Parse the query, returning the estimated total amount of download time.
void Gst::QueryBuffering::set | ( | Format | format, | |
gint64 | start, | |||
gint64 | stop, | |||
gint64 | estimated_total | |||
) |
Set the available query result fields in query.
format | The format to set for the start and stop values. | |
start | The start to set. | |
stop | The stop to set. | |
estimated_total | Estimated total amount of download time. |
void Gst::QueryBuffering::set | ( | BufferingMode | mode, | |
int | avg_in, | |||
int | avg_out, | |||
gint64 | buffering_left | |||
) |
Configures the buffering stats values in query.
mode | A buffering mode. | |
avg_in | The average input rate. | |
avg_out | The average output rate. | |
buffering_left | Amount of buffering time left. |
void Gst::QueryBuffering::set | ( | bool | busy, | |
int | percent | |||
) |
Set the percentage of buffered data.
This is a value between 0 and 100. The busy indicator is true when the buffering is in progress.
busy | If buffering is busy. | |
percent | A buffering percent. |