I ended up going in another direction to solve this problem. First I created my own GstLogFunction()
void gstAndroidLog(GstDebugCategory * category,
GstDebugLevel level,
const gchar * file,
const gchar * function,
gint line,
GObject * object,
GstDebugMessage * message,
gpointer data)
{
if (level <= gst_debug_category_get_threshold (category))
{
__android_log_print(ANDROID_LOG_ERROR, "MY_APP", "%s,%s: %s",
file, function, gst_debug_message_get(message));
}
}
Then after gst_init() is called, I set up the log levels. If I want to see everything, I can set:
gst_debug_set_default_threshold( GST_LEVEL_DEBUG );
If I just want to see what is happening in a specific category, I can set:
gst_debug_set_threshold_for_name ("tcpclientsink", GST_LEVEL_LOG);
Then I just need to register the log function I created:
gst_debug_add_log_function(&gstAndroidLog, NULL);