GstIdStr
A GstIdStr is string type optimized for short strings and used for structure names, structure field names and in other places.
Strings up to 16 bytes (including NUL terminator) are stored inline, other strings are stored on the heap.
GstIdStr s = GST_ID_STR_INIT;
gst_id_str_set (&s, "Hello, World!");
g_print ("%s\n", gst_id_str_as_str (&s));
gst_id_str_clear (&s);
GstIdStr
String type optimized for short strings.
Strings are usually stack- or inline-allocated, and for short strings smaller than 16 bytes (including NUL terminator) no heap allocations are performed.
Since : 1.26
Gst.IdStr
String type optimized for short strings.
Strings are usually stack- or inline-allocated, and for short strings smaller than 16 bytes (including NUL terminator) no heap allocations are performed.
Since : 1.26
Gst.IdStr
String type optimized for short strings.
Strings are usually stack- or inline-allocated, and for short strings smaller than 16 bytes (including NUL terminator) no heap allocations are performed.
Since : 1.26
Constructors
gst_id_str_new
GstIdStr * gst_id_str_new ()
Returns a newly heap allocated empty string.
A heap-allocated string.
Since : 1.26
Gst.IdStr.prototype.new
function Gst.IdStr.prototype.new(): {
// javascript wrapper for 'gst_id_str_new'
}
Returns a newly heap allocated empty string.
A heap-allocated string.
Since : 1.26
Gst.IdStr.new
def Gst.IdStr.new ():
#python wrapper for 'gst_id_str_new'
Returns a newly heap allocated empty string.
A heap-allocated string.
Since : 1.26
Methods
gst_id_str_as_str
const gchar * gst_id_str_as_str (const GstIdStr * s)
Parameters:
s
–
A GstIdStr
the NUL-terminated string representation of s.
Since : 1.26
Gst.IdStr.prototype.as_str
function Gst.IdStr.prototype.as_str(): {
// javascript wrapper for 'gst_id_str_as_str'
}
the NUL-terminated string representation of s.
Since : 1.26
gst_id_str_clear
gst_id_str_clear (GstIdStr * s)
Clears s and sets it to the empty string.
Parameters:
s
–
A GstIdStr
Since : 1.26
Gst.IdStr.prototype.clear
function Gst.IdStr.prototype.clear(): {
// javascript wrapper for 'gst_id_str_clear'
}
Clears s and sets it to the empty string.
Since : 1.26
gst_id_str_copy
GstIdStr * gst_id_str_copy (const GstIdStr * s)
Copies s into newly allocated heap memory.
Parameters:
s
–
A GstIdStr
A heap-allocated copy of s.
Since : 1.26
Gst.IdStr.prototype.copy
function Gst.IdStr.prototype.copy(): {
// javascript wrapper for 'gst_id_str_copy'
}
Copies s into newly allocated heap memory.
A heap-allocated copy of s.
Since : 1.26
gst_id_str_copy_into
gst_id_str_copy_into (GstIdStr * d, const GstIdStr * s)
Copies s into d.
Since : 1.26
Gst.IdStr.prototype.copy_into
function Gst.IdStr.prototype.copy_into(s: Gst.IdStr): {
// javascript wrapper for 'gst_id_str_copy_into'
}
Copies s into d.
Since : 1.26
gst_id_str_free
gst_id_str_free (GstIdStr * s)
Frees s. This should only be called for heap-allocated GstIdStr.
Parameters:
s
–
A heap allocated GstIdStr
Since : 1.26
Gst.IdStr.prototype.free
function Gst.IdStr.prototype.free(): {
// javascript wrapper for 'gst_id_str_free'
}
Frees s. This should only be called for heap-allocated Gst.IdStr.
Since : 1.26
gst_id_str_get_len
gsize gst_id_str_get_len (const GstIdStr * s)
Returns the length of s, exluding the NUL-terminator. This is equivalent to
calling strcmp()
but potentially faster.
Parameters:
s
–
A GstIdStr
Since : 1.26
Gst.IdStr.prototype.get_len
function Gst.IdStr.prototype.get_len(): {
// javascript wrapper for 'gst_id_str_get_len'
}
Returns the length of s, exluding the NUL-terminator. This is equivalent to
calling strcmp()
but potentially faster.
Since : 1.26
gst_id_str_init
gst_id_str_init (GstIdStr * s)
Initializes a (usually stack-allocated) id string s. The newly-initialized id string will contain an empty string by default as value.
Parameters:
s
–
A GstIdStr
Since : 1.26
Gst.IdStr.prototype.init
function Gst.IdStr.prototype.init(): {
// javascript wrapper for 'gst_id_str_init'
}
Initializes a (usually stack-allocated) id string s. The newly-initialized id string will contain an empty string by default as value.
Since : 1.26
gst_id_str_is_equal
gboolean gst_id_str_is_equal (const GstIdStr * s1, const GstIdStr * s2)
Compares s1 and s2 for equality.
TRUE if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.prototype.is_equal
function Gst.IdStr.prototype.is_equal(s2: Gst.IdStr): {
// javascript wrapper for 'gst_id_str_is_equal'
}
Compares s1 and s2 for equality.
Since : 1.26
gst_id_str_is_equal_to_str
gboolean gst_id_str_is_equal_to_str (const GstIdStr * s1, const gchar * s2)
Compares s1 and s2 for equality.
TRUE if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.prototype.is_equal_to_str
function Gst.IdStr.prototype.is_equal_to_str(s2: String): {
// javascript wrapper for 'gst_id_str_is_equal_to_str'
}
Compares s1 and s2 for equality.
Since : 1.26
gst_id_str_is_equal_to_str_with_len
gboolean gst_id_str_is_equal_to_str_with_len (const GstIdStr * s1, const gchar * s2, gsize len)
Compares s1 and s2 with length len for equality. s2 does not have to be NUL-terminated and len should not include the NUL-terminator.
This is generally faster than gst_id_str_is_equal_to_str if the length is already known.
TRUE if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.prototype.is_equal_to_str_with_len
function Gst.IdStr.prototype.is_equal_to_str_with_len(s2: String, len: Number): {
// javascript wrapper for 'gst_id_str_is_equal_to_str_with_len'
}
Compares s1 and s2 with length len for equality. s2 does not have to be NUL-terminated and len should not include the NUL-terminator.
This is generally faster than Gst.IdStr.prototype.is_equal_to_str if the length is already known.
Since : 1.26
Gst.IdStr.is_equal_to_str_with_len
def Gst.IdStr.is_equal_to_str_with_len (self, s2, len):
#python wrapper for 'gst_id_str_is_equal_to_str_with_len'
Compares s1 and s2 with length len for equality. s2 does not have to be NUL-terminated and len should not include the NUL-terminator.
This is generally faster than Gst.IdStr.is_equal_to_str if the length is already known.
Since : 1.26
gst_id_str_move
gst_id_str_move (GstIdStr * d, GstIdStr * s)
Moves s into d and resets s.
Since : 1.26
Gst.IdStr.prototype.move
function Gst.IdStr.prototype.move(s: Gst.IdStr): {
// javascript wrapper for 'gst_id_str_move'
}
Moves s into d and resets s.
Since : 1.26
gst_id_str_set
gst_id_str_set (GstIdStr * s, const gchar * value)
Sets s to the string value.
Since : 1.26
Gst.IdStr.prototype.set
function Gst.IdStr.prototype.set(value: String): {
// javascript wrapper for 'gst_id_str_set'
}
Sets s to the string value.
Since : 1.26
gst_id_str_set_static_str
gst_id_str_set_static_str (GstIdStr * s, const gchar * value)
Sets s to the string value. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Since : 1.26
Gst.IdStr.prototype.set_static_str
function Gst.IdStr.prototype.set_static_str(value: String): {
// javascript wrapper for 'gst_id_str_set_static_str'
}
Sets s to the string value. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Since : 1.26
Gst.IdStr.set_static_str
def Gst.IdStr.set_static_str (self, value):
#python wrapper for 'gst_id_str_set_static_str'
Sets s to the string value. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Since : 1.26
gst_id_str_set_static_str_with_len
gst_id_str_set_static_str_with_len (GstIdStr * s, const gchar * value, gsize len)
Sets s to the string value of length len. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
value must be NUL-terminated and len should not include the NUL-terminator.
Since : 1.26
Gst.IdStr.prototype.set_static_str_with_len
function Gst.IdStr.prototype.set_static_str_with_len(value: String, len: Number): {
// javascript wrapper for 'gst_id_str_set_static_str_with_len'
}
Sets s to the string value of length len. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
value must be NUL-terminated and len should not include the NUL-terminator.
Parameters:
A string
Length of the string
Since : 1.26
Gst.IdStr.set_static_str_with_len
def Gst.IdStr.set_static_str_with_len (self, value, len):
#python wrapper for 'gst_id_str_set_static_str_with_len'
Sets s to the string value of length len. value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
value must be NUL-terminated and len should not include the NUL-terminator.
Since : 1.26
gst_id_str_set_with_len
gst_id_str_set_with_len (GstIdStr * s, const gchar * value, gsize len)
Sets s to the string value of length len. value does not have to be NUL-terminated and len should not include the NUL-terminator.
Since : 1.26
Gst.IdStr.prototype.set_with_len
function Gst.IdStr.prototype.set_with_len(value: String, len: Number): {
// javascript wrapper for 'gst_id_str_set_with_len'
}
Sets s to the string value of length len. value does not have to be NUL-terminated and len should not include the NUL-terminator.
Parameters:
A string
Length of the string
Since : 1.26
Gst.IdStr.set_with_len
def Gst.IdStr.set_with_len (self, value, len):
#python wrapper for 'gst_id_str_set_with_len'
Sets s to the string value of length len. value does not have to be NUL-terminated and len should not include the NUL-terminator.
Since : 1.26
Constants
GST_ID_STR_INIT
#define GST_ID_STR_INIT { .pointer = NULL, .padding = {0, } }
Initializer for GstIdStr.
Since : 1.26
The results of the search are