Monday, 15 February 2010

assignment from incompatible pointer type (C) -



assignment from incompatible pointer type (C) -

i code bellow, rb_gst_get_encoding_profile not homecoming gchar* rec_settings.profile expects.

typedef struct recording_settings recording_settings; struct recording_settings { gchar *profile; gchar *destination; }; recording_settings rec_settings; typedef struct _gstencodingprofile gstencodingprofile; gstencodingprofile *rb_gst_get_encoding_profile (const char *media_type);

warning: assignment incompatible pointer type:

rec_settings.profile = gconf_client_get_string(client, "/apps/sound/recording/profile", null); if (!rec_settings.profile) rec_settings.profile = g_strdup("audio/x-vorbis"); static void profile_combo_change_cb(gtkcombobox *combo, gpointer userdata) { gtktreeiter iter; gtktreemodel *model; /* grab encoding profile choosen */ model = gtk_combo_box_get_model (gtk_combo_box (combo)); if (gtk_combo_box_get_active_iter(gtk_combo_box(combo), &iter)) { gchar *media_type; gtk_tree_model_get(gtk_tree_model(model), &iter, 0, &media_type, -1); rec_settings.profile = rb_gst_get_encoding_profile(media_type); // warning: assignment incompatible pointer type g_free (media_type); } }

i seek prepare them. way this?

thanks

audio_profile_combo = audio_profile_chooser_new(); gchar *media_type; media_type = rb_gst_encoding_profile_get_media_type(rec_settings.profile); // warning: assignment incompatible pointer type audio_profile_chooser_set_active(audio_profile_combo, media_type); g_free (media_type);

change recording_settings struct this:

struct recording_settings { gstencodingprofile *profile; gchar *destination; };

at least, that's garner should done little info available.

c

No comments:

Post a Comment