How come the tee in pipeline blocks after I just unblocked the tee?

killerrats koreysjunkmail at gmail.com
Thu Nov 3 18:01:49 UTC 2016


Figured out how to unblock it. The Only problem is that it won't have the
video written to the file. It has the Audio but not the Video. Any Idea? I
extracted the header and it says there is plenty enough of video frames.

The Link below is a testing project that has all in one functions instead of
a bunch of headers. So the methods below are similar to the Gstreamer
project.

Gstreamer Project <http://www.planetkorey.com/tmp/testingPurpose.h>  

///// ---------------------------- METHODS -------------------------------
/////////
GstPadProbeReturn PipelineClass::RtspEventProbe (GstPad * pad,
GstPadProbeInfo * info, gpointer user_data);
GstPadProbeReturn PipelineClass::cb_block (GstPad * pad, GstPadProbeInfo *
info, gpointer user_data);



GstPadProbeReturn PipelineClass::RtspEventProbe (GstPad * pad,
GstPadProbeInfo * info, gpointer user_data)
{

	if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info)) != GST_EVENT_EOS)
	return GST_PAD_PROBE_PASS;
	
	GstElement* valve1,* valve2;
	gboolean ret = FALSE;
	GstEvent* flush_stop;

	gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info));

	std::cout << std::endl << "Got Eos and Restarting Recording" << std::endl;
	
        *\/-------------------- Important Area --------------------------\/*
	
         UnlinkRecPipeline();

	gst_pad_remove_probe(_videoD->BlockAudioPad,_videoD->aID);
	gst_pad_remove_probe(_videoD->BlockVideoPad,_videoD->vID);

	isBlocked = FALSE;
        
        *cb_block method is below:*
	gst_pad_add_probe (_videoD->BlockAudioPad,
GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM
		,*cb_block*, user_data, NULL);
	gst_pad_add_probe (_videoD->BlockVideoPad,
GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM
		,*cb_block*, user_data, NULL);

	LinkRtspRecPipeline();

        */\-------------------- Important Area --------------------------/\*

	std::cout << "\nRecord to Playing Check";
	AccessToVideoClass->CheckStateChange(gst_element_set_state (_videoD->Rec,
GST_STATE_PLAYING));
	std::cout << std::endl;

	std::cout << "\nSetting up appsink signals\n";
	g_signal_connect(_videoD->appsink, "new-sample",
G_CALLBACK(appsink_ToFile),_videoD);
	g_signal_connect(_videoD->appsink, "eos",
G_CALLBACK(check_for_eos),_videoD);
	
	return GST_PAD_PROBE_DROP;
	  
}

GstPadProbeReturn PipelineClass::cb_block (GstPad * pad, GstPadProbeInfo *
info, gpointer user_data)
{
	do{
		if(!_videoD->isBlocked)
		{
			g_print("\nUnblocking\n");
			return GST_PAD_PROBE_REMOVE;
		}
	}while(_videoD->isBlocked);
}



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-come-the-tee-in-pipeline-blocks-after-I-just-unblocked-the-tee-tp4680317p4680429.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list