Hi,
(please keep list in copy... the more, the merrier ;) )
Diqing Zhong wrote:
> Hi,
>
> Here's the code, thanks so much for the help.
>
> - Max
>
>
------------------------------------------------------------
-------------------------------
> static GstElement *decbin = NULL;
> static GstElement *video_decode = NULL;
>
>
video_decode=gst_element_factory_make("mpeg2_video_dec&
quot;, NULL);
> decbin = gst_bin_new("decbin");
> if ( gst_bin_add(GST_BIN(decbin), video_decode) ==
FALSE) {
> g_print("Error add video decode to
bin");
> }
>
> GstPad *video_decode_sinkpad;
> video_decode_sinkpad =
gst_element_get_pad(video_decode, "sink");
> if (gst_element_add_pad (decbin, gst_ghost_pad_new
("sink",
> video_decode_sinkpad)) == FALSE) {
> g_print("Error gst element add sink
pad");
> }
>
do you link your sink pad with anything ?
> GstPad *video_decode_srcpad;
> video_decode_srcpad =
gst_element_get_pad(video_decode, "src");
> if (gst_element_add_pad (decbin, gst_ghost_pad_new
("src",
> video_decode_srcpad))== FALSE) {
> g_print("Error gst element add source
pad");
> }
>
> gst_object_unref (GST_OBJECT
(video_decode_sinkpad));
> gst_object_unref (GST_OBJECT
(video_decode_srcpad));
>
> gst_bin_add_many(GST_BIN(bin), decbin, video_sink,
NULL);
>
> if(gst_element_link(decbin, video_sink) == FALSE)
{
> g_print("Error linking
decbin->video_sinkn");
> g_assert(0);
> }
>
Ben
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|