[gst-devel] gstreamer-devel Digest, Vol 11, Issue 22

CH Bhanu Prakash bhanuprakash at tataelxsi.co.in
Thu May 3 12:13:18 CEST 2007



-----Original Message-----
From: gstreamer-devel-bounces at lists.sourceforge.net
[mailto:gstreamer-devel-bounces at lists.sourceforge.net]On Behalf Of
gstreamer-devel-request at lists.sourceforge.net
Sent: Monday, April 30, 2007 6:10 PM
To: gstreamer-devel at lists.sourceforge.net
Subject: gstreamer-devel Digest, Vol 11, Issue 22


Send gstreamer-devel mailing list submissions to
	gstreamer-devel at lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
or, via email, send a message with subject or body 'help' to
	gstreamer-devel-request at lists.sourceforge.net

You can reach the person managing the list at
	gstreamer-devel-owner at lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."


Today's Topics:

   1. What is the necessary conditions to make the plugin
      recognized by	gst-inspect (gtxia)
   2. Re: What is the necessary conditions to make the plugin
      recognized by	gst-inspect (Stefan Kost)
   3. Re: What is the necessary conditions to make the	plugin
      recognized by	gst-inspect (gtxia)
   4. Re: What is the necessary conditions to make the plugin
      recognized by gst-inspect ( ????? ??? (Zeeshan Ali) )
   5. GStreamer / C++ example ? (fabien)
   6. Re: GStreamer / C++ example ? (gtxia)
   7. Re: GStreamer / C++ example ? (fabien)
   8. Re: GStreamer / C++ example ? (fabien)
   9.  GStreamer / C example (Erwan Masson)


----------------------------------------------------------------------

Message: 1
Date: Sat, 28 Apr 2007 18:07:18 +0800
From: gtxia <xia_guangtai at visualon.com>
Subject: [gst-devel] What is the necessary conditions to make the
	plugin	recognized by	gst-inspect
To: gstreamer-devel at lists.sourceforge.net
Message-ID: <1177754838.32612.20.camel at localhost.localdomain>
Content-Type: text/plain

Hello all.

Use the gst-template/gst-plugin/tools/make_element command to generate a
plugin skeleton and fill the sinkpad and srcpad informations. At the
same time I have set the element details. Then generate libXXX.so. since
I make GST_PLUGIN_PATH equal the directory that libXXX.so located and
run gst-inspect, I can not find any change in
$HOME/.gstreamer-0.10/registry.i686.xml. I wonder to know what kind of
functions that I must implement on my plugin to make the gst-inspect can
be recognized.

Thanks.

XiaGuangTai

2007-4-28





------------------------------

Message: 2
Date: Sat, 28 Apr 2007 17:53:04 +0300
From: Stefan Kost <ensonic at hora-obscura.de>
Subject: Re: [gst-devel] What is the necessary conditions to make the
	plugin recognized by	gst-inspect
To: gtxia <xia_guangtai at visualon.com>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <46335FD0.3060501 at hora-obscura.de>
Content-Type: text/plain; charset=ISO-8859-1

hi,

the usual suggestion: check if the plugin can be loaded:
GST_DEBUG="GST_PLUGIN_LOADING:5" gst-inspect

look for undefined symbols in the log output.

Stefan

gtxia wrote:
> Hello all.
>
> Use the gst-template/gst-plugin/tools/make_element command to generate a
> plugin skeleton and fill the sinkpad and srcpad informations. At the
> same time I have set the element details. Then generate libXXX.so. since
> I make GST_PLUGIN_PATH equal the directory that libXXX.so located and
> run gst-inspect, I can not find any change in
> $HOME/.gstreamer-0.10/registry.i686.xml. I wonder to know what kind of
> functions that I must implement on my plugin to make the gst-inspect can
> be recognized.
>
> Thanks.
>
> XiaGuangTai
>
> 2007-4-28
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




------------------------------

Message: 3
Date: Sun, 29 Apr 2007 16:52:51 +0800
From: gtxia <xia_guangtai at visualon.com>
Subject: Re: [gst-devel] What is the necessary conditions to make the
	plugin	recognized by	gst-inspect
To: Stefan Kost <ensonic at hora-obscura.de>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <1177836771.3412.4.camel at localhost.localdomain>
Content-Type: text/plain

Stefan

Thanks for your hint. It is indeed a good way to find out the key
reason. Can we use other functions such as dlerror in gstreamer
framework to help us to find the error code or error message when we
call some functions fail?

regards

XiaGuangTai

On Sat, 2007-04-28 at 17:53 +0300, Stefan Kost wrote:
> hi,
>
> the usual suggestion: check if the plugin can be loaded:
> GST_DEBUG="GST_PLUGIN_LOADING:5" gst-inspect
>
> look for undefined symbols in the log output.
>
> Stefan
>
> gtxia wrote:
> > Hello all.
> >
> > Use the gst-template/gst-plugin/tools/make_element command to generate a
> > plugin skeleton and fill the sinkpad and srcpad informations. At the
> > same time I have set the element details. Then generate libXXX.so. since
> > I make GST_PLUGIN_PATH equal the directory that libXXX.so located and
> > run gst-inspect, I can not find any change in
> > $HOME/.gstreamer-0.10/registry.i686.xml. I wonder to know what kind of
> > functions that I must implement on my plugin to make the gst-inspect can
> > be recognized.
> >
> > Thanks.
> >
> > XiaGuangTai
> >
> > 2007-4-28
> >
> >
> >
>
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




------------------------------

Message: 4
Date: Sun, 29 Apr 2007 14:20:18 +0300
From: " ????? ??? (Zeeshan Ali) "	<zeenix at gstreamer.net>
Subject: Re: [gst-devel] What is the necessary conditions to make the
	plugin	recognized by gst-inspect
To: gtxia <xia_guangtai at visualon.com>
Cc: gstreamer-devel at lists.sourceforge.net,	Stefan Kost
	<ensonic at hora-obscura.de>
Message-ID:
	<38294b740704290420l9ef74afy2b9708753191160 at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hey!

On 4/29/07, gtxia <xia_guangtai at visualon.com> wrote:
> Stefan
>
> Thanks for your hint. It is indeed a good way to find out the key
> reason. Can we use other functions such as dlerror in gstreamer
> framework to help us to find the error code or error message when we
> call some functions fail?

   If your gstreamer is built without '--disable-gst-debug' (which
AFAIK is generally the case for desktops), you can get useful info
from the debug output by just setting the debug level. E.g
`gst-inspect-0.10 --gst-debug="*:5"` will give you all possible
messages of all categories. Hold your breath though, it's quite a big
output so you may want to redirect the stderr to a file and then
greping throught that file might be a good idea.

> regards
>
> XiaGuangTai
>
> On Sat, 2007-04-28 at 17:53 +0300, Stefan Kost wrote:
> > hi,
> >
> > the usual suggestion: check if the plugin can be loaded:
> > GST_DEBUG="GST_PLUGIN_LOADING:5" gst-inspect
> >
> > look for undefined symbols in the log output.
> >
> > Stefan
> >
> > gtxia wrote:
> > > Hello all.
> > >
> > > Use the gst-template/gst-plugin/tools/make_element command to generate
a
> > > plugin skeleton and fill the sinkpad and srcpad informations. At the
> > > same time I have set the element details. Then generate libXXX.so.
since
> > > I make GST_PLUGIN_PATH equal the directory that libXXX.so located and
> > > run gst-inspect, I can not find any change in
> > > $HOME/.gstreamer-0.10/registry.i686.xml. I wonder to know what kind of
> > > functions that I must implement on my plugin to make the gst-inspect
can
> > > be recognized.
> > >
> > > Thanks.
> > >
> > > XiaGuangTai
> > >
> > > 2007-4-28
> > >
> > >
> > >
> >
> -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>


--
Regards,

Zeeshan Ali
Design Engineer, SW
Open Source Software Operations
Nokia Multimedia



------------------------------

Message: 5
Date: Sun, 29 Apr 2007 23:38:19 +0200
From: fabien <fabien.castan at free.fr>
Subject: [gst-devel] GStreamer / C++ example ?
To: gstreamer-devel at lists.sourceforge.net
Message-ID: <4635104B.1060301 at free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,
I'm working on a C++/Qt application for video editing, under the GPL
license. I would like to use GStreamer for the video management.
I need to open a video file, extract all image frames, and save it back
into another video file (possibly with a different codec). I suppose
it's not too hard to do, but I've never worked with GStreamer and I
didn't find too much information on the Internet so I'm having trouble
getting into it and writing the first lines.
Could you give me an example, even if it's written in C, as long as it
handles video and not only audio ?
Thank you



------------------------------

Message: 6
Date: Mon, 30 Apr 2007 08:36:53 +0800
From: gtxia <xia_guangtai at visualon.com>
Subject: Re: [gst-devel] GStreamer / C++ example ?
To: fabien <fabien.castan at free.fr>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <1177893413.3381.2.camel at localhost.localdomain>
Content-Type: text/plain

Hi.

Please visit http://gstreamer.freedesktop.org/src/, there are a lot of
examples to find what you want.

XiaGuangTai


On Sun, 2007-04-29 at 23:38 +0200, fabien wrote:
> Hello,
> I'm working on a C++/Qt application for video editing, under the GPL
> license. I would like to use GStreamer for the video management.
> I need to open a video file, extract all image frames, and save it back
> into another video file (possibly with a different codec). I suppose
> it's not too hard to do, but I've never worked with GStreamer and I
> didn't find too much information on the Internet so I'm having trouble
> getting into it and writing the first lines.
> Could you give me an example, even if it's written in C, as long as it
> handles video and not only audio ?
> Thank you
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




------------------------------

Message: 7
Date: Mon, 30 Apr 2007 12:20:27 +0200
From: fabien <fabien.castan at free.fr>
Subject: Re: [gst-devel] GStreamer / C++ example ?
To: gtxia <xia_guangtai at visualon.com>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <4635C2EB.8090206 at free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

I have already looked at those examples, as well as others. They
certainly contain the code I am looking for but it is difficult to
extract the few lines that actually open a video file. I have been
trying for three weeks now and still haven't succeeded.
I manage to read a "videotest" inside a Qt interface, to convert the
data into 24bits RGB and work with it in realtime. Otherwise I also
manage to read an audio file, because there are examples in the
documentation. However I can't manage to read a video file.
I've looked all over the Internet and asked in many forums, but I
couldn't find a simple example, only people looking for one. It must
take a few minutes for someone who knows GStreamer, while for the others
it is impossible to do. Is Gstreamer reserved for experts?

What I need is just a bit more complicated than a player: I need to open
a video file, to access its buffer (in 24bits RGB format), one image
frame at a time. Then I need to do the inverse operation - write in a
buffer and save it into a video file.
It sums up to reading and writing video files but not in real time.

I'm sorry if I seem a bit tense, but I find it a pity that video is so
poorly developped on Linux. I thought that using Gstreamer was supposed
to make it easier for me to work with video files, it wasn't supposed to
be the hardest part of the program.

Thank you for your comprehension and your help.


gtxia a ?crit :
> Hi.
>
> Please visit http://gstreamer.freedesktop.org/src/, there are a lot of
> examples to find what you want.
>
> XiaGuangTai
>
>
> On Sun, 2007-04-29 at 23:38 +0200, fabien wrote:
>
>> Hello,
>> I'm working on a C++/Qt application for video editing, under the GPL
>> license. I would like to use GStreamer for the video management.
>> I need to open a video file, extract all image frames, and save it back
>> into another video file (possibly with a different codec). I suppose
>> it's not too hard to do, but I've never worked with GStreamer and I
>> didn't find too much information on the Internet so I'm having trouble
>> getting into it and writing the first lines.
>> Could you give me an example, even if it's written in C, as long as it
>> handles video and not only audio ?
>> Thank you



------------------------------

Message: 8
Date: Mon, 30 Apr 2007 14:35:46 +0200
From: fabien <fabien.castan at free.fr>
Subject: Re: [gst-devel] GStreamer / C++ example ?
To: Stefan Kost <ensonic at hora-obscura.de>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <4635E2A2.4030207 at free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thank you for your answer, I will try...
Is fakesink and appsink exactly the same thing ?
If I succeed to open a video... how can I go to the next or previous
frame ? And go to a precise position in a movie ?
Can I use the status PAUSED and move in the movie ?


Stefan Kost a ?crit :
> Hi Fabien,
>
> in GStreamer you usually do not take out data, you write own plugins
> and add them to the processing pipeline. If you still need to take the
> data, you can use fakesink/appsink (and vice versa fakesrc/appsrc to
> inject).
>
> To decode any video use decodebin and connect fakesink's to the
> output-pads. Grepping the sources for decodebin should help you to
> locate some examples.
>
> Stefan
>>



------------------------------

Message: 9
Date: Mon, 30 Apr 2007 14:39:38 +0200
From: "Erwan Masson" <masson.erwan1 at gmail.com>
Subject: [gst-devel]  GStreamer / C example
To: gstreamer-devel at lists.sourceforge.net
Message-ID:
	<4f9afa260704300539x2a0f1cabie0bbc6fc8cb3845f at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,
 Some of people are asking a C code example for their application. I was on
the same problem a few weeks, I will give you a sample of my code. My code
was so horrible(lots of code in comments) that I was forced to cut a
(callback like hand off signal and typefind signal).
So It is just an example, you will have to code yourself the bus
fonction(see in doc), and also the callback function: new padd added.
With that structure, I was able to grab frame video and audio, to
synchronise manually audio and video buffers (after a frame audio and video
it stop to lets the other thread do the same frame).
Hope this help you a bit,
Erwan Masson

/* Main pipeline */
>   pipeline = gst_pipeline_new ("Main pipeline");
>   source = gst_element_factory_make ("filesrc", "file-source");
>   /* the parser got 2 dynamic output pad, you will have to link them to
> your audio thread and video thread */
>   parser = gst_element_factory_make ("decodebin", "decodebin-parser");
>
>   /* Audio Pipeline */
>   pipeAudio = gst_pipeline_new ("audio-player ");
>   /* A queue is needed to synchronise with Video thread */
>     aqueue = gst_element_factory_make("queue", "aqueue");
>   decoder = gst_element_factory_make ("identity",
> "identity-decoder-audio");
>   conv = gst_element_factory_make ("audioconvert", "converteraudio");
>   /* Identity, useful for add handdoff signal (to grab a sample) */
>   aconv2 = gst_element_factory_make ("identity", " identity conv2");
>   /* With typefind you are able to retrieves some info in the signal */
>   afind = gst_element_factory_make ("typefind", "typefindaudio");
>   sink = gst_element_factory_make ("alsasink", "alsa-output");
>
>
>
>   /* Video Pipeline */
>   pipeVideo = gst_pipeline_new ("video-player");
>   /* queue usefull to synchronize with audio thread */
>     vqueue = gst_element_factory_make("queue", "vqueue");
>   vdecoder = gst_element_factory_make ("identity", "identity-decoder");
>   vconv = gst_element_factory_make ("ffmpegcolorspace", "convertervideo");
>   /* Use capsfilter if you want to convert to RGB (default ffmpeg output
> is YUV */
>   vcapsfilter = gst_element_factory_make ("capsfilter", "restreint le
> caps");
>   g_object_set (G_OBJECT (vcapsfilter), "caps",
>           gst_caps_new_simple ("video/x-raw-rgb",
>                      "bpp", G_TYPE_INT, 32,
>                      "depth", G_TYPE_INT, 32,
>                      NULL)
>             , NULL);
>     /* Put a handoff signal on identity and you will grab video frame */
>   vconv2 = gst_element_factory_make ("identity", "identity-vconv2");
>   g_signal_connect (vconv2, "handoff", G_CALLBACK (cb_handoff_video),
> NULL);
>   /* use typefind if you want to grab some info on video, like width,
> height....*/
>   vfind = gst_element_factory_make ("typefind", "typefindVideo2");
>   vsink = gst_element_factory_make ("fakesink", "video-fake-output");
>
>
>   /* You need to test all Element to see if they are created */
>   if (!pipeline || !source || !parser || !decoder || !conv || !sink) {
>     g_print ("One element could not be created 1\n");
>     if (!decoder)
>        g_print("decoder\n");
>     if (!parser)
>         g_print("parser\n");
>     if (!source)
>         g_print("source\n");
>     if(!conv)
>         g_print("conv\n");
>     if(!pipeline)
>         g_print("pipeline\n");
>     if(!sink)
>         g_print("sink\n");
>     return -1;
>   }
>   if (!vqueue || !aqueue  || !vdecoder || !vconv || !vsink) {
>     g_print ("One element could not be created 2\n");
>     return -1;
>   }
>
>
>   g_object_set (G_OBJECT (source), "location","myFileName.avi", NULL);
>
> /* Add a  bus to catch Information */
>   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
>   gst_bus_add_watch (bus, cb_bus_call, loop);
>   gst_object_unref (bus);
>   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeVideo));
>   gst_bus_add_watch (bus, cb_bus_call, loop);
>   gst_object_unref (bus);
>
>
> /* Video pipeline */
> /* Add element in pipeline */
>   gst_bin_add_many (GST_BIN (pipeVideo), vqueue, vdecoder, vconv,
> vcapsfilter, vconv2, vfind, vsink, NULL);
>   /* Link element in pipeline */
>   gst_element_link_many (vqueue, vdecoder,  vconv, vcapsfilter, vconv2,
> vfind , vsink, NULL);
>   /* Set the ghost pad for the viedo pipeline (pad for input)*/
>   pad = gst_element_get_pad (vqueue, "sink");
>   gst_element_add_pad (pipeVideo, gst_ghost_pad_new ("sink", pad));
>   gst_object_unref (GST_OBJECT (pad));
>
>
>
>
> /* Audio pipeline */
>   gst_bin_add_many (GST_BIN (pipeAudio),aqueue, decoder, conv, aconv2,
> afind, sink, NULL);
>   gst_element_link_many (aqueue, decoder, conv, aconv2, afind, sink,
> NULL);
>   pad = gst_element_get_pad (aqueue, "sink");
>   gst_element_add_pad (pipeAudio, gst_ghost_pad_new ("sink", pad));
>   gst_object_unref (GST_OBJECT (pad));
>
> /* Main pipeline */
>   gst_bin_add_many (GST_BIN (pipeline), source, parser, NULL);
>   gst_element_link (source, parser);
>
>   /* link together - note that we cannot link the parser and
>    * decoder yet, because the parser uses dynamic pads. For
> that,GST_STATE_READY
>    * we set a pad-added signal handler. */
>   g_signal_connect (parser, "pad-added", G_CALLBACK (cb_new_pad), NULL);
>
>
>   /* Now set to playing and iterate. */
>   g_print ("Setting to PLAYING\n");
>   gst_element_set_state (pipeline, GST_STATE_PLAYING);
>
>   g_print ("Running\n");
>   g_main_loop_run (loop);
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

------------------------------

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


End of gstreamer-devel Digest, Vol 11, Issue 22
***********************************************





More information about the gstreamer-devel mailing list