View Single Post
Posts: 124 | Thanked: 213 times | Joined on Dec 2009
#29
I use a quick'n'dirty method to create my pipelines...for now, anyway

Code:
gst_init(NULL, NULL);

pipeline = gst_parse_launch("v4l2src device=/dev/video[0|1] ! xvimagesink", NULL);

GstIterator* iter = gst_bin_iterate_sinks((GstBin*)pipeline);

GstElement* thisElem;

// Find sink at end of pipeline - there should be only one!
if (gst_iterator_next(iter, (void**)&thisElem) == GST_ITERATOR_OK)
{
  sink = thisElem;
  QApplication::syncX();
  gst_element_set_state(pipeline, GST_STATE_READY);
  gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink), Widget.winID());
  gst_element_set_state(pipeline, GST_STATE_PLAYING);
}
Basically, play with gst_launcher on the cmd-line until you're happy with the results, then paste the arguments into the gst_parse_launch() call.
 

The Following User Says Thank You to Dak For This Useful Post: