How can I set capabilities on videotestsrc?

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

How can I set capabilities on videotestsrc?

Psychesnet Hsieh
Hi all,

On my PC, I can run "gst-launch-1.0 videotestsrc pattern=1 ! video/x-raw, width=1920, height=1080 ! autovideosink" to get correct result.
But, if I use C language to write a sample code, not using gst_parse_launch, how can I set capabilities for videotestsrc? Thanks.
caps  = gst_caps_new_simple ("video/x-raw",  
            "width", G_TYPE_INT, 1920,
             "height", G_TYPE_INT, 1080,
             "framerate", G_TYPE_INT, 60,
             NULL);

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How can I set capabilities on videotestsrc?

Matthew Waters
Insert a capsfilter element after videotestsrc and set the caps on that using g_object_set (capsfilter, "caps", caps, NULL);

On 31/7/20 5:05 pm, Psychesnet Hsieh wrote:
Hi all,

On my PC, I can run "gst-launch-1.0 videotestsrc pattern=1 ! video/x-raw, width=1920, height=1080 ! autovideosink" to get correct result.
But, if I use C language to write a sample code, not using gst_parse_launch, how can I set capabilities for videotestsrc? Thanks.
caps  = gst_caps_new_simple ("video/x-raw",  
            "width", G_TYPE_INT, 1920,
             "height", G_TYPE_INT, 1080,
             "framerate", G_TYPE_INT, 60,
             NULL);

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: How can I set capabilities on videotestsrc?

Psychesnet Hsieh
Hi Waters,

Thanks. I will try it now.

Matthew Waters <[hidden email]> 於 2020年7月31日 週五 下午3:06寫道:
Insert a capsfilter element after videotestsrc and set the caps on that using g_object_set (capsfilter, "caps", caps, NULL);

On 31/7/20 5:05 pm, Psychesnet Hsieh wrote:
Hi all,

On my PC, I can run "gst-launch-1.0 videotestsrc pattern=1 ! video/x-raw, width=1920, height=1080 ! autovideosink" to get correct result.
But, if I use C language to write a sample code, not using gst_parse_launch, how can I set capabilities for videotestsrc? Thanks.
caps  = gst_caps_new_simple ("video/x-raw",  
            "width", G_TYPE_INT, 1920,
             "height", G_TYPE_INT, 1080,
             "framerate", G_TYPE_INT, 60,
             NULL);

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel