[gst-devel] ximagesink
nikhil almalkar
nikhil.almalkar at gmail.com
Tue May 5 09:32:43 CEST 2009
> On Mon, May 4, 2009 at 11:59 PM, nikhil almalkar
> <nikhil.almalkar at gmail.com> wrote:
> > Hi all,
> > I have a pipeline with an encoder plugin and decodebin (with required
> > decoder plugins available). I use ximagesink for display.
> > It works fine in gst-launch.. but when I put it in a pipeline that looks
> > like this :
> > (source, encoder, decoder, ffmpegcolorspace, ximagsink)
> > and try to play this, it does not show the xvideo output. What may be the
> > issue ?
>
> Be more specific. What _exactly_ are the source, encoder, and decoder?
> Maybe you need a videoscale? What errors are you getting? What does
> your code look like?
source is a filesrc, encoder is an in-house encoder, decoder is a
decodebin... there are no errors, just the ximagesink does not output
a video, the program runs though... Inserting a scale did not make any
difference...
void Create_Pipeline()
{
GMainLoop *loop;
GstBus *bus;
char *local;
loop = g_main_loop_new (NULL, FALSE);
/* create elements */
pipeline = gst_pipeline_new ("player"); //(here)
source = gst_element_factory_make ("filesrc", "source");
if (!source) {
g_print ("Failed to create element of type ’source’\n");
return -1;
}
if (encode_only)
{
calculate_datarate();
g_object_set (G_OBJECT (source), "location", Inputfile, NULL);
g_print("%u", value3);
g_print("%s", Inputfile);
}
if (decode_only)
{
g_object_set (G_OBJECT (source), "location", Inputfile, NULL);
}
encoder = gst_element_factory_make ("some encoder", "encoder");
if (!encoder) {
g_print ("Failed to create element of type
’encoder’\n");
return -1;
}
decoder = gst_element_factory_make ("decodebin", "decoder");
scale = gst_element_factory_make ("videoscale", "vidscale");
ffmpegcolorcon = gst_element_factory_make ("ffmpegcolorspace",
"colorconversion");
videosink = gst_element_factory_make ("ximagesink", "imagesink");
if (GST_IS_X_OVERLAY (videosink))
{
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY
(videosink), GPOINTER_TO_INT (window));
}
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_watch (bus, bus_call, loop);
gst_object_unref (bus);
if (encode_only && (DISPLAY))
{
g_print("\nDisplaying\n");
gst_bin_add_many (GST_BIN (pipeline),source,
encoder, decoder,ffmpegcolorcon, videosink, NULL);
gst_element_link_many (source,encoder,decoder,ffmpegcolorcon,
videosink, NULL);
}
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("Running\n");
g_main_loop_run (loop) ;
}
>
> > The source is a filesource, location provided, blocksize provided. The
> > encoder properties are set all right.
>
> You shouldn't need to specify the blocksize. If you DO need to do
> that, you're probably doing something else wrong.
>
> Mike
>
Specified or otherwise, the blocksize did not have any effect on the
video output.
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list