I have an app, which send samples of video to gstreamer. when the play back starts, gstreamer get the window size automatically based on the source.
But I want to control it.

I tried
videoscale = gst_element_factory_make ("videoscale", "video_scale");
    g_object_set (G_OBJECT (videoscale), "width", 500, NULL);
    g_object_set (G_OBJECT (videoscale), "height", 500, NULL);

but I am getting
Need some help here. how do i set the width and height correctly, and is there any way to change the dimensions while the video is playing.