Which gstreamer plug-in source code to reffer ?

ssshukla26 ssshukla26 at gmail.com
Mon Jan 18 01:23:42 PST 2016


Solved it by changing the capabilities of sink and source pads as follows.

static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
    GST_PAD_SINK,
    GST_PAD_ALWAYS,
    *GST_STATIC_CAPS ("video/x-raw, "
        "format = (string) { NV12 }, "
        "framerate = (fraction) [0, MAX], "
        "width = (int) [ 16, MAX ], " "height = (int) [ 16, MAX ]")*
    );

static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    *GST_STATIC_CAPS ("video/x-raw, "
        "format = (string) { NV12 }, "
        "framerate = (fraction) [0, MAX], "
        "width = (int) [ 16, MAX ], " "height = (int) [ 16, MAX ]")*
    );


But I have already overridden the *set_format* function with below code,
then why I have to change src and sink pad capabilities ? Please explain as
am confused ! 

static gboolean *gst_myencoder_set_format* (GstVideoEncoder *encoder,
GstVideoCodecState *state)
{
    g_print("%s....................\n",__func__);
   
*gst_video_encoder_set_output_state(encoder,gst_caps_new_empty_simple("video/x-raw"),state);*
    return TRUE;
}



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Which-gstreamer-plug-in-source-code-to-reffer-tp4675203p4675331.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list