Playbin video scaling

soumendra satapathy soumendra.satapathy at gmail.com
Mon Oct 10 00:06:55 PDT 2011


Hi,


I have a small issue I am using the "playbin" element in my media-player
app.

No w i wish to have control over the scale of my video, basically achieve
the same funcationality as "videoscale".

How do i do it ??


Please find the code below:

#include <gst/gst.h>
#include <stdbool.h>

static GMainLoop *loop;

static void player(const char *uri)
{
        GstElement *playbin,*videosink, *audiosink,*flt;

        loop = g_main_loop_new(NULL, FALSE);
        playbin = gst_element_factory_make("playbin", "player");
        videosink = gst_element_factory_make ("xvimagesink", "video-sink");
        audiosink = gst_element_factory_make ("alsasink", "audio-sink");


        if (uri){

g_object_set(G_OBJECT(videosink),"force-aspect-ratio",FALSE,NULL);
                   g_object_set(G_OBJECT(playbin), "uri",
uri,"audio-sink",audiosink,"video-sink", videosink,NULL);

                }




        gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PLAYING);

        g_main_loop_run(loop);

        gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_NULL);
        gst_object_unref(GST_OBJECT(playbin));
}

int main(int argc, char *argv[])
{
        gst_init(&argc, &argv);
        player(argv[1]);
        return 0;
}



I am kinda stuck .. any insight will be of real help.
Regards

-- 
follow me @ http://twitter.com/soum1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111010/6487a976/attachment.htm>


More information about the gstreamer-devel mailing list