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);
gst_id_str_new
GstIdStr *
gst_id_str_new ()
Returns a newly heap allocated empty string.
Returns
(
[transfer: full])
–
A heap-allocated string.
Since : 1.26
Gst.IdStr.prototype.new
function Gst.IdStr.prototype.new(): {
}
Returns a newly heap allocated empty string.
Since : 1.26
Gst.IdStr.new
def Gst.IdStr.new ():
Returns a newly heap allocated empty string.
Since : 1.26
gst_id_str_clear
gst_id_str_clear (GstIdStr * s)
Clears s and sets it to the empty string.
Since : 1.26
Gst.IdStr.prototype.clear
function Gst.IdStr.prototype.clear(): {
}
Clears s and sets it to the empty string.
Since : 1.26
Gst.IdStr.clear
def Gst.IdStr.clear (self):
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.
Returns
(
[transfer: full])
–
A heap-allocated copy of s.
Since : 1.26
Gst.IdStr.prototype.copy
function Gst.IdStr.prototype.copy(): {
}
Copies s into newly allocated heap memory.
A heap-allocated copy of s.
Since : 1.26
Gst.IdStr.copy
def Gst.IdStr.copy (self):
Copies s into newly allocated heap memory.
A heap-allocated copy of s.
Since : 1.26
gst_id_str_free
gst_id_str_free (GstIdStr * s)
Frees s. This should only be called for heap-allocated GstIdStr.
Since : 1.26
Gst.IdStr.prototype.free
function Gst.IdStr.prototype.free(): {
}
Frees s. This should only be called for heap-allocated Gst.IdStr.
Since : 1.26
Gst.IdStr.free
def Gst.IdStr.free (self):
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.
Returns
–
No description available
Since : 1.26
Gst.IdStr.prototype.get_len
function Gst.IdStr.prototype.get_len(): {
}
Returns the length of s, exluding the NUL-terminator. This is equivalent to
calling strcmp()
but potentially faster.
Since : 1.26
Gst.IdStr.get_len
def Gst.IdStr.get_len (self):
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.
Since : 1.26
Gst.IdStr.prototype.init
function Gst.IdStr.prototype.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.IdStr.init
def Gst.IdStr.init (self):
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.
Returns
–
TRUE if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.prototype.is_equal
function Gst.IdStr.prototype.is_equal(s2: Gst.IdStr): {
}
Compares s1 and s2 for equality.
true if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.is_equal
def Gst.IdStr.is_equal (self, s2):
Compares s1 and s2 for equality.
True if s1 and s2 are equal.
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.
Returns
–
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): {
}
Compares s1 and s2 for equality.
true if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.is_equal_to_str
def Gst.IdStr.is_equal_to_str (self, s2):
Compares s1 and s2 for equality.
True if s1 and s2 are equal.
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.
Returns
–
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): {
}
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.
true if s1 and s2 are equal.
Since : 1.26
Gst.IdStr.is_equal_to_str_with_len
def Gst.IdStr.is_equal_to_str_with_len (self, s2, 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.
True if s1 and s2 are equal.
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): {
}
Moves s into d and resets s.
Since : 1.26
Gst.IdStr.move
def Gst.IdStr.move (self, s):
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.
Parameters:
value
–
A NUL-terminated string
Since : 1.26
Gst.IdStr.prototype.set
function Gst.IdStr.prototype.set(value: String): {
}
Sets s to the string value.
Since : 1.26
Gst.IdStr.set
def Gst.IdStr.set (self, value):
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.
Parameters:
value
–
A NUL-terminated string
Since : 1.26
Gst.IdStr.prototype.set_static_str
function Gst.IdStr.prototype.set_static_str(value: String): {
}
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):
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.
Parameters:
len
–
Length of the string
Since : 1.26
Gst.IdStr.prototype.set_static_str_with_len
function Gst.IdStr.prototype.set_static_str_with_len(value: String, len: Number): {
}
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.set_static_str_with_len
def Gst.IdStr.set_static_str_with_len (self, value, 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.
Parameters:
len
–
Length of the string
Since : 1.26
Gst.IdStr.prototype.set_with_len
function Gst.IdStr.prototype.set_with_len(value: String, len: Number): {
}
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.set_with_len
def Gst.IdStr.set_with_len (self, value, 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