Problem with multiple tees in pipeline
yoyosuper8
yoyosuper8 at yahoo.com
Tue Jul 15 06:14:14 PDT 2014
Hi all, I'm having some problems with tee and I can't figure out why it
doesn't seem to work properly.
Please note that I'm working on Android devices. In my gstreamer pipeline, I
need to have two tees. One tee is for taking snapshots, the second tee is
for recording to a file. I'm also using valve to turn on/off each tee. Here
is what my testing pipeline looks like:
videotestsrc ! videoconvert ! tee name=snapshot ! valve name=snap drop=true
! jpegenc ! filesink location=/home/user/Desktop/pic1.jpg snapshot. !
eglglessink name=videosink
This simple pipeline I believe it should have the main branch which displays
the videotestsrc into the eglglessink and the second branch should save a
frame into a jpg file when the valve is set to drop=false.
When I push on a button, the valve is set to drop=false, but it does not
save a frame to a file. This is how I perform the update of valve:
gelement_name = "snap"; // name of element
gprop_val_name = "drop"; // name of property
gProp_val = "false"; // new value to set in property
// Get the element from the pipeline by using the element name
GstElement *element = gst_bin_get_by_name (GST_BIN (pipeline),
gelement_name);
if ( strcmp(gprop_val_name, "drop") == 0 )
{
gboolean prop_val = FALSE;
// if the property value is true, then send an EOS.
if ( strcmp(gProp_val, "true") == 0 ) {
gst_element_send_event(element, gst_event_new_eos());
prop_val = TRUE;
}
else {
prop_val = FALSE;
}
// Update property in pipeline.
g_object_set (element, gprop_val_name, prop_val, NULL);
}
However, if I remove the eglglessink name=videosink from the pipeline, the
above works. But with the eglglessink in the pipeline, the snapshot tee
doesn't work. Also, with eglglessink in the pipeline, I see the videotestsrc
in the screen, but it is a still image, it seems that all the other frames
are dropped, but in the log everything seems fine and no warnings or errors.
Am I missing something in the pipeline or am I using tee the wrong way?
Please help.
Andy
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-with-multiple-tees-in-pipeline-tp4667937.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list