Hi
I need to transmit video h264 with KLV meta data I succeeded to send encoded video using appsrc element Now I am trying to send metdata using appsrc the same way that I use to send video Instead of config appsrc to video I config It as meta data klv *this is the function for config appsrc for klv:* mSource = gst_element_factory_make("appsrc", "app_src"); gst_app_src_set_stream_type(GST_APP_SRC(mSource), GST_APP_STREAM_TYPE_STREAM); g_object_set(mSource,"format" , GST_FORMAT_TIME,NULL); *The capsfilter for the appsrc:* mSourceCaps = gst_caps_new_simple("video/x-raw", "format",G_TYPE_STRING,FrameFormatToStringLut[mVideoProperties.mFrameProperties.mFormat].c_str(), "width",G_TYPE_INT,mVideoProperties.mFrameProperties.mWidth, "height",G_TYPE_INT,mVideoProperties.mFrameProperties.mHeight, "framerate",GST_TYPE_FRACTION,mVideoProperties.mFramePerSecond,1, NULL); mSourceFilter = gst_element_factory_make("capsfilter", "source_caps"); g_object_set(G_OBJECT(mSourceFilter),"caps",mSourceCaps,NULL); gst_caps_unref(mSourceCaps); *The function for sending buffer on appsrc:* static GstClockTime sTimeStamp = 0; GstBuffer* lBuffer = NULL; GstFlowReturn lRetValue = GST_FLOW_OK; lBuffer = gst_buffer_new_allocate(NULL,inSize,NULL); gst_buffer_fill (lBuffer,0,inData,inSize); //update buffer playing timestamp GST_BUFFER_PTS(lBuffer) = sTimeStamp; if (!GST_BUFFER_PTS_IS_VALID(lBuffer)) { g_printerr("Failed to setup PTS"); } GST_BUFFER_DURATION(lBuffer) = gst_util_uint64_scale_int(1,GST_SECOND,mVideoProperties.mFramePerSecond); sTimeStamp += GST_BUFFER_DURATION(lBuffer); lRetValue = gst_app_src_push_buffer((GstAppSrc*)mSource,lBuffer); when I am trying to play the pipeline no packets sent. 1. I glad to know why I play pipeline no packet sent 2. If someone have an example of code sending appsrc as klv with video stream Thanks! Eli -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |