• Home
  • Raw
  • Download

Lines Matching refs:preview

42     preview, GstCaps * caps);
231 preview) in gst_camerabin_destroy_preview_pipeline()
233 g_return_if_fail (preview != NULL); in gst_camerabin_destroy_preview_pipeline()
235 g_mutex_clear (&preview->processing_lock); in gst_camerabin_destroy_preview_pipeline()
236 g_cond_clear (&preview->processing_cond); in gst_camerabin_destroy_preview_pipeline()
238 if (preview->pipeline) { in gst_camerabin_destroy_preview_pipeline()
241 gst_element_set_state (preview->pipeline, GST_STATE_NULL); in gst_camerabin_destroy_preview_pipeline()
243 bus = gst_pipeline_get_bus (GST_PIPELINE (preview->pipeline)); in gst_camerabin_destroy_preview_pipeline()
247 gst_object_unref (preview->pipeline); in gst_camerabin_destroy_preview_pipeline()
249 g_free (preview); in gst_camerabin_destroy_preview_pipeline()
263 gst_camerabin_preview_pipeline_post (GstCameraBinPreviewPipelineData * preview, in gst_camerabin_preview_pipeline_post() argument
266 g_return_val_if_fail (preview != NULL, FALSE); in gst_camerabin_preview_pipeline_post()
267 g_return_val_if_fail (preview->pipeline != NULL, FALSE); in gst_camerabin_preview_pipeline_post()
270 g_mutex_lock (&preview->processing_lock); in gst_camerabin_preview_pipeline_post()
271 g_return_val_if_fail (preview->pipeline != NULL, FALSE); in gst_camerabin_preview_pipeline_post()
273 if (preview->pending_preview_caps) { in gst_camerabin_preview_pipeline_post()
274 if (preview->processing > 0) { in gst_camerabin_preview_pipeline_post()
275 g_cond_wait (&preview->processing_cond, &preview->processing_lock); in gst_camerabin_preview_pipeline_post()
277 _gst_camerabin_preview_set_caps (preview, preview->pending_preview_caps); in gst_camerabin_preview_pipeline_post()
278 gst_caps_replace (&preview->pending_preview_caps, NULL); in gst_camerabin_preview_pipeline_post()
281 preview->processing++; in gst_camerabin_preview_pipeline_post()
283 g_object_set (preview->appsrc, "caps", gst_sample_get_caps (sample), NULL); in gst_camerabin_preview_pipeline_post()
284 gst_app_src_push_buffer ((GstAppSrc *) preview->appsrc, in gst_camerabin_preview_pipeline_post()
287 g_mutex_unlock (&preview->processing_lock); in gst_camerabin_preview_pipeline_post()
293 _gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview, in _gst_camerabin_preview_set_caps() argument
299 g_return_if_fail (preview != NULL); in _gst_camerabin_preview_set_caps()
300 g_return_if_fail (preview->pipeline != NULL); in _gst_camerabin_preview_set_caps()
302 ret = gst_element_get_state (preview->pipeline, &state, &pending, 0); in _gst_camerabin_preview_set_caps()
308 gst_element_set_state (preview->pipeline, GST_STATE_NULL); in _gst_camerabin_preview_set_caps()
309 g_object_set (preview->appsink, "caps", caps, NULL); in _gst_camerabin_preview_set_caps()
312 gst_element_set_state (preview->pipeline, state); in _gst_camerabin_preview_set_caps()
324 gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview, in gst_camerabin_preview_set_caps() argument
327 g_return_if_fail (preview != NULL); in gst_camerabin_preview_set_caps()
329 g_mutex_lock (&preview->processing_lock); in gst_camerabin_preview_set_caps()
331 if (preview->processing == 0) { in gst_camerabin_preview_set_caps()
332 _gst_camerabin_preview_set_caps (preview, caps); in gst_camerabin_preview_set_caps()
335 gst_caps_replace (&preview->pending_preview_caps, caps); in gst_camerabin_preview_set_caps()
337 g_mutex_unlock (&preview->processing_lock); in gst_camerabin_preview_set_caps()
350 gst_camerabin_preview_set_filter (GstCameraBinPreviewPipelineData * preview, in gst_camerabin_preview_set_filter() argument
356 g_return_val_if_fail (preview != NULL, FALSE); in gst_camerabin_preview_set_filter()
360 g_mutex_lock (&preview->processing_lock); in gst_camerabin_preview_set_filter()
362 gst_element_get_state (preview->pipeline, &current, NULL, 0); in gst_camerabin_preview_set_filter()
364 if (preview->processing == 0 && current == GST_STATE_NULL) { in gst_camerabin_preview_set_filter()
367 if (preview->filter) { in gst_camerabin_preview_set_filter()
369 gst_element_unlink (preview->appsrc, preview->filter); in gst_camerabin_preview_set_filter()
370 gst_element_unlink (preview->filter, preview->vscale); in gst_camerabin_preview_set_filter()
371 gst_bin_remove (GST_BIN (preview->pipeline), preview->filter); in gst_camerabin_preview_set_filter()
374 gst_element_unlink (preview->appsrc, preview->vscale); in gst_camerabin_preview_set_filter()
379 gst_bin_add (GST_BIN (preview->pipeline), gst_object_ref (filter)); in gst_camerabin_preview_set_filter()
382 GST_PAD_LINK_FAILED (gst_element_link_pads_full (preview->appsrc, in gst_camerabin_preview_set_filter()
387 preview->vscale, "sink", GST_PAD_LINK_CHECK_CAPS)); in gst_camerabin_preview_set_filter()
391 GST_PAD_LINK_FAILED (gst_element_link_pads_full (preview->appsrc, in gst_camerabin_preview_set_filter()
392 "src", preview->vscale, "sink", GST_PAD_LINK_CHECK_NOTHING)); in gst_camerabin_preview_set_filter()
400 preview->filter = filter; in gst_camerabin_preview_set_filter()
406 g_mutex_unlock (&preview->processing_lock); in gst_camerabin_preview_set_filter()