HI,
I am wondering if any of u could help in any way.. :) I am currently working on a Intelce4100 based settop box and happen to use ismd_vidrend_sink. My application is such that video should be played in a particular Directfb rectangle. I am using ismd_vidrend_sink and with the property "rectangle". I could get the video playing in the gdl-plane but not in the desired directfb rectangle. I am a newbie to ismd and wonder if i am doing things right here...
Below is a overview of my code: static void dfb_update(player_stream_t *player_stream)
{ if (! player_stream) { return; }
if (player_stream->fVideoSink && player_stream->fIsPlaying) { /* That's the interesting part, giving the dfb video surface to dfbvideosink */
printf("dfb Update ###########Co ordinates for Rectangle : %s\n",rectangle_desc); g_object_set(peer_player_stream->fVideoSink,"rectangle",rectangle_desc, NULL);
} } static slim_int dfb_initialize (player_stream_t *player_stream)
{ slim_int iResult = SLIM_E_OK; /* ------------------------------------------------
* DirectFB Surface Initialization for media player * ------------------------------------------------ */
if (! player_stream || ! player_stream->fPeerPlayer) { return SLIM_E_GENERIC; }
/* Restrict video area to rectangle*/ rect.x = player_stream->fPeerPlayer->fDisplayParam.xpos;
rect.y = player_stream->fPeerPlayer->fDisplayParam.ypos; rect.w = player_stream->fPeerPlayer->fDisplayParam.width; rect.h = player_stream->fPeerPlayer->fDisplayParam.height;
rectangle_desc=g_strdup_printf("%d,%d,%d,%d",rect.x,rect.y,rect.w,rect.h); printf("dfb Initialize ###########Co ordinates for Rectangle : %s\n",rectangle_desc);
/* * GetSubsurface from primary surface and restrict it to the rectangle. Instead of using
* the surface created for the gst-player we directly get the subsurface of the primary * surface created by dfb by which we can avoid extra operations
* */ g_object_set(peer_player_stream->fVideoSink, "rectangle",rectangle_desc, NULL); // This seems to me the problem as it always gives GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed.
gWavePeerPrimary->GetSubSurface( gWavePeerPrimary, &rect, &peer_player_stream->fVideoSink); peer_player_dfb_update(peer_player_stream);
/* Cleanup underlying Surface */ DFBCHECK(gWavePeerPrimary->Clear(gWavePeerPrimary, 0, 0, 0, 0x80)); return iResult;
} static void peer_player_gst_init(peer_player_stream_t *peer_player_stream) {
GstBus *bus = NULL; GstPad* pad; DFBCHECK (DirectFBInit (NULL, NULL)); gst_init (NULL, NULL);
/* Create the bin and its elements */ peer_player_stream->fVideoSink = gst_element_factory_make ("ismd_vidrend_bin", "ismd_videosink");
bus = gst_pipeline_get_bus (GST_PIPELINE (peer_player_stream->fPlay)); gst_bus_add_watch (bus, peer_player_gst_bus_callback, peer_player_stream);
gst_object_unref (bus); gst_bin_add(GST_BIN(peer_player_stream->fBin), peer_player_stream->fVideoSink);
/* Create the ghost pad and let the it point to bin's first element's sink */ pad = gst_element_get_static_pad(peer_player_stream->fVideoSink, "sink");
gst_element_add_pad(peer_player_stream->fBin, gst_ghost_pad_new("sink", pad)); gst_object_unref(GST_OBJECT (pad)); }
static void peer_player_gst_prepare_to_play(peer_player_stream_t *peer_player_stream) {
slim_int gst_flags; g_object_get (G_OBJECT (peer_player_stream->fPlay), "flags", &gst_flags, NULL);
g_object_set (G_OBJECT (peer_player_stream->fPlay), "flags", gst_flags, NULL); g_object_set (G_OBJECT (peer_player_stream->fPlay), "buffer-size", 1024*1024, NULL);
g_object_set (G_OBJECT (peer_player_stream->fPlay), "uri", peer_player_stream->fUri, NULL); g_object_set(peer_player_stream->fVideoSink,"rectangle",rectangle_desc,NULL);
g_object_set(peer_player_stream->fVideoSink,"gdl-plane","UPPC",NULL); /* Set the video surface to dfbvideosink property "surface" */
peer_player_dfb_update(peer_player_stream); peer_player_set_event(peer_player_stream); g_play = peer_player_stream->fPlay; if(g_play) { if(g_mute) {
g_object_set(G_OBJECT(g_play), "volume", 0.0, NULL); } else {
g_object_set(G_OBJECT(g_play), "volume", g_vol, NULL); } } peer_player_stream->fSpeed = NORMAL_SPEED; if (gst_element_set_state(peer_player_stream->fPlay, GST_STATE_READY) == GST_STATE_CHANGE_FAILURE) {
printf("peer_player_gst_prepare_to_play() - Error: Pipeline Is Not Ready\n"); else {
/* TODO Normally the autovideo sink would create an own output window, so we set GstXOverlay for outputting video to browser window. */ g_object_set (G_OBJECT (peer_player_stream->fPlay), "video-sink", peer_player_stream->fBin , NULL);
} } I am just stuck here and going no where.... thanks in advance
Regards, Sudhir . _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |