Capsfilter problem for rtp streaming

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Capsfilter problem for rtp streaming

Zhang, Boning
I write a cmd line for receiving the rtp stream :
 
gst-launch udpsrc port=5000 caps=application/x-rtp ! rtph263pdepay ! ffdec_h263 ! filesink location=./abc.out
 
and it runs ok.
 
But I change it to C code, the application cannot run.
 
c code:
{
  pipeline = gst_pipeline_new ("Video-DERTP");
  rtpsrc   = gst_element_factory_make ("udpsrc",  "sourcer");
  vidCaps = gst_element_factory_make("capsfilter", "capsfilter");
  rtpdepay  = gst_element_factory_make ("rtph263pdepay", "H263+ depayload");
  decoder  = gst_element_factory_make ("ffdec_h263", "h263+ decode");
  filesink  = gst_element_factory_make ("filesink", "filesink");
 
 
 
    g_object_set(G_OBJECT(vidCaps), "caps",gst_caps_new_simple("application/x-rtp",
                                                        "media",G_TYPE_STRING,"video",          
                                                        "payload",G_TYPE_INT,96,
                                                        "clock-rate",G_TYPE_INT,90000,
                                                        "encoding-name", G_TYPE_STRING, "ffenc_h263p",
                                                        NULL), NULL);
 
    g_object_set (G_OBJECT (rtpsrc), "port",5000, NULL);
    g_object_set (G_OBJECT (filesink), "location","./abc.out", NULL);
 
 
  gst_bin_add_many (GST_BIN (pipeline),rtpsrc,vidCaps,rtpdepay,decoder,filesink,NULL);
  gst_element_link_many (rtpsrc,vidCaps,rtpdepay,decoder,filesink,NULL);
}
 
error:
gst_capsfilter_prepare_buf:assertion 'out_caps != NULL' failed
Error Internal data flow error
 
 
Thanks
------------------------------------
Boning,Zhang
 
 
 
 
 
 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Capsfilter problem for rtp streaming

Marc Leeman
Something along these lines

>     g_object_set(G_OBJECT(rtpsrc), "caps",gst_caps_new_simple("application/x-rtp",
>                                                         "clock-rate",G_TYPE_INT,90000,
>                                                         NULL), NULL);

should work and match your commandline.

--
  greetz, marc
It seems intuitively obvious to me, which means that it might be wrong.
                -- Chris Torek
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Capsfilter problem for rtp streaming

Zhang, Boning
No it failed

Error: Filter caps do not completely specify the output format
Returned, stopping playback
Deleting pipeline




-----Original Message-----
From: Marc Leeman [mailto:[hidden email]]
Sent: 2009年8月25日 20:21
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Capsfilter problem for rtp streaming

Something along these lines

>     g_object_set(G_OBJECT(rtpsrc), "caps",gst_caps_new_simple("application/x-rtp",
>                                                         "clock-rate",G_TYPE_INT,90000,
>                                                         NULL), NULL);

should work and match your commandline.

--
  greetz, marc
It seems intuitively obvious to me, which means that it might be wrong.
                -- Chris Torek
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Capsfilter problem for rtp streaming

Zhang, Boning
I got it


   g_object_set(G_OBJECT(vidCaps), "caps",gst_caps_new_simple("application/x-rtp", // required caps
                                                        "media",G_TYPE_STRING,"video", // video settings
                                                        "payload",G_TYPE_INT,96,
                                                        "clock-rate",G_TYPE_INT,90000,
                                                        "encoding-name", G_TYPE_STRING, "H263-1998",
                                                        NULL), NULL);




-----Original Message-----
From: Zhang, Boning [mailto:[hidden email]]
Sent: 2009年8月26日 10:27
To: Marc Leeman; Discussion of the development of GStreamer
Subject: Re: [gst-devel] Capsfilter problem for rtp streaming

No it failed

Error: Filter caps do not completely specify the output format
Returned, stopping playback
Deleting pipeline




-----Original Message-----
From: Marc Leeman [mailto:[hidden email]]
Sent: 2009年8月25日 20:21
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Capsfilter problem for rtp streaming

Something along these lines

>     g_object_set(G_OBJECT(rtpsrc), "caps",gst_caps_new_simple("application/x-rtp",
>                                                         "clock-rate",G_TYPE_INT,90000,
>                                                         NULL), NULL);

should work and match your commandline.

--
  greetz, marc
It seems intuitively obvious to me, which means that it might be wrong.
                -- Chris Torek
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Capsfilter problem for rtp streaming

Marc Leeman
In reply to this post by Zhang, Boning
> No it failed
>
> Error: Filter caps do not completely specify the output format
> Returned, stopping playback
> Deleting pipeline

I wasn't setting the caps on the capsfilter; but on the updsrc; just as
you did on the commandline.

If it fails, it's probably something related to timezones; since it's
working fine here.

oldcaps = streamingbin->udpsrc.caps;
newcaps = gst_caps_new_simple("application/x-rtp",
              "clock-rate",G_TYPE_INT,90000,
              NULL);
streamingbin->udpsrc.caps = newcaps;
if (oldcaps)
   gst_caps_unref (oldcaps);


I'd better add an extra check then :-)

--
  greetz, marc
A mathematician is a device for turning coffee into theorems.
                -- P. Erdos
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (196 bytes) Download Attachment