Commit c3b0233d authored by Lori Anderson's avatar Lori Anderson

Changed var names to more meaningful values, strVal to src_type_name and arrayVal to rates_array.

parent 7a4ac1cd
......@@ -1255,7 +1255,7 @@ static void on_source_changed(GstElement* element, GParamSpec* param, gpointer d
int i = 0;
GstElement* src = NULL;
const gchar *strVal = NULL;
const gchar *src_type_name = NULL;
g_object_get(element, "source", &src, NULL);
if (src != NULL)
......@@ -1263,22 +1263,22 @@ static void on_source_changed(GstElement* element, GParamSpec* param, gpointer d
g_print("Got src from callback, determine if dlnasrc\n");
g_source = src;
strVal = g_type_name(G_OBJECT_TYPE (src));
if (strVal != NULL)
src_type_name = g_type_name(G_OBJECT_TYPE (src));
if (src_type_name != NULL)
{
g_print("type name of source for pipeline: %s\n", strVal);
if (strcmp(strVal, "GstDlnaSrc") == 0)
g_print("type name of source for pipeline: %s\n", src_type_name);
if (strcmp(src_type_name, "GstDlnaSrc") == 0)
{
// Get supported rates property value which is a GArray
g_print("Getting supported rates\n");
GArray* arrayVal = NULL;
g_object_get(src, "supported_rates", &arrayVal, NULL);
if (arrayVal != NULL)
GArray* rates_array = NULL;
g_object_get(src, "supported_rates", &rates_array, NULL);
if (rates_array != NULL)
{
g_print("Supported rates cnt: %d\n", arrayVal->len);
for (i = 0; i < arrayVal->len; i++)
g_print("Supported rates cnt: %d\n", rates_array->len);
for (i = 0; i < rates_array->len; i++)
{
g_print("Retrieved rate %d: %f\n", (i+1), g_array_index(arrayVal, gfloat, i));
g_print("Retrieved rate %d: %f\n", (i+1), g_array_index(rates_array, gfloat, i));
}
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment