|  |  |  | GStreamer Base Plugins 1.0 Library Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#include <gst/rtsp/gstrtsprange.h> enum GstRTSPRangeUnit; struct GstRTSPTimeRange; struct GstRTSPTime; struct GstRTSPTime2; enum GstRTSPTimeType; GstRTSPResult gst_rtsp_range_parse (const gchar *rangestr,GstRTSPTimeRange **range); gboolean gst_rtsp_range_get_times (const GstRTSPTimeRange *range,GstClockTime *min,GstClockTime *max); gchar * gst_rtsp_range_to_string (const GstRTSPTimeRange *range); gboolean gst_rtsp_range_convert_units (GstRTSPTimeRange *range,GstRTSPRangeUnit unit); void gst_rtsp_range_free (GstRTSPTimeRange *range);
Provides helper functions to deal with time ranges. Last reviewed on 2007-07-25 (0.10.14)
typedef enum {
  GST_RTSP_RANGE_SMPTE,
  GST_RTSP_RANGE_SMPTE_30_DROP,
  GST_RTSP_RANGE_SMPTE_25,
  GST_RTSP_RANGE_NPT,
  GST_RTSP_RANGE_CLOCK
} GstRTSPRangeUnit;
Different possible time range units.
struct GstRTSPTimeRange {
  GstRTSPRangeUnit unit;
  GstRTSPTime  min;
  GstRTSPTime  max;
  GstRTSPTime2 min2;
  GstRTSPTime2 max2;
};
A time range.
| GstRTSPRangeUnit  | the time units used | 
| GstRTSPTime  | the minimum interval | 
| GstRTSPTime  | the maximum interval | 
| GstRTSPTime2  | extra fields in the minimum interval (Since: 1.1.1) | 
| GstRTSPTime2  | extra fields in the maximum interval (Since: 1.1.1) | 
struct GstRTSPTime {
  GstRTSPTimeType type;
  gdouble         seconds;
};
A time indication.
| GstRTSPTimeType  | the time of the time | 
| gdouble  | seconds when typeis GST_RTSP_TIME_SECONDS,
GST_RTSP_TIME_UTC and GST_RTSP_TIME_FRAMES | 
struct GstRTSPTime2 {
  gdouble         frames;
  guint           year;
  guint           month;
  guint           day;
};
Extra fields for a time indication.
| gdouble  | frames and subframes when type in GstRTSPTime is GST_RTSP_TIME_FRAMES | 
| guint  | year when type is GST_RTSP_TIME_UTC | 
| guint  | month when type is GST_RTSP_TIME_UTC | 
| guint  | day when type is GST_RTSP_TIME_UTC | 
Since 1.1.1
typedef enum {
  GST_RTSP_TIME_SECONDS,
  GST_RTSP_TIME_NOW,
  GST_RTSP_TIME_END,
  GST_RTSP_TIME_FRAMES,
  GST_RTSP_TIME_UTC
} GstRTSPTimeType;
Possible time types.
GstRTSPResult gst_rtsp_range_parse (const gchar *rangestr,GstRTSPTimeRange **range);
Parse rangestr to a GstRTSPTimeRange.
| 
 | a range string to parse | 
| 
 | location to hold the GstRTSPTimeRange result | 
| Returns : | GST_RTSP_OK on success. | 
gboolean gst_rtsp_range_get_times (const GstRTSPTimeRange *range,GstClockTime *min,GstClockTime *max);
Retrieve the minimum and maximum values from range converted to
GstClockTime in min and max.
A value of GST_CLOCK_TIME_NONE will be used to signal GST_RTSP_TIME_NOW
and GST_RTSP_TIME_END for min and max respectively.
UTC times will be converted to nanoseconds since 1900.
| 
 | a GstRTSPTimeRange | 
| 
 | result minimum GstClockTime | 
| 
 | result maximum GstClockTime | 
| Returns : | TRUEon success. | 
Since 1.1.1
gchar *             gst_rtsp_range_to_string            (const GstRTSPTimeRange *range);
Convert range into a string representation.
| 
 | a GstRTSPTimeRange | 
| Returns : | The string representation of range.g_free()after usage. | 
gboolean gst_rtsp_range_convert_units (GstRTSPTimeRange *range,GstRTSPRangeUnit unit);
Converts the range in-place between different types of units. Ranges containing the special value GST_RTSP_TIME_NOW can not be converted as these are only valid for GST_RTSP_RANGE_NPT.
| 
 | a GstRTSPTimeRange | 
| 
 | the unit to convert the range into | 
| Returns : | TRUEif the range could be converted | 
void                gst_rtsp_range_free                 (GstRTSPTimeRange *range);
Free the memory allocated by range.
| 
 | a GstRTSPTimeRange |