• Home
  • Raw
  • Download

Lines Matching refs:sink

83   GstTinyalsaSink *sink = GST_TINYALSA_SINK (object);  in gst_tinyalsa_sink_get_property()  local
87 g_value_set_uint (value, sink->card); in gst_tinyalsa_sink_get_property()
91 g_value_set_uint (value, sink->device); in gst_tinyalsa_sink_get_property()
104 GstTinyalsaSink *sink = GST_TINYALSA_SINK (object); in gst_tinyalsa_sink_set_property() local
108 sink->card = g_value_get_uint (value); in gst_tinyalsa_sink_set_property()
112 sink->device = g_value_get_uint (value); in gst_tinyalsa_sink_set_property()
124 GstTinyalsaSink *sink = GST_TINYALSA_SINK (bsink); in gst_tinyalsa_sink_getcaps() local
133 GST_DEBUG_OBJECT (sink, "Querying caps"); in gst_tinyalsa_sink_getcaps()
135 GST_OBJECT_LOCK (sink); in gst_tinyalsa_sink_getcaps()
137 if (sink->cached_caps) { in gst_tinyalsa_sink_getcaps()
138 GST_DEBUG_OBJECT (sink, "Returning cached caps"); in gst_tinyalsa_sink_getcaps()
139 caps = gst_caps_ref (sink->cached_caps); in gst_tinyalsa_sink_getcaps()
143 if (sink->pcm) { in gst_tinyalsa_sink_getcaps()
149 params = pcm_params_get (sink->card, sink->device, PCM_OUT); in gst_tinyalsa_sink_getcaps()
151 GST_ERROR_OBJECT (sink, "Could not get PCM params"); in gst_tinyalsa_sink_getcaps()
159 GST_ERROR_OBJECT (sink, "Could not find any supported format"); in gst_tinyalsa_sink_getcaps()
212 gst_caps_replace (&sink->cached_caps, caps); in gst_tinyalsa_sink_getcaps()
215 GST_OBJECT_UNLOCK (sink); in gst_tinyalsa_sink_getcaps()
217 GST_DEBUG_OBJECT (sink, "Got caps %" GST_PTR_FORMAT, caps); in gst_tinyalsa_sink_getcaps()
283 GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink); in gst_tinyalsa_sink_prepare() local
291 GST_DEBUG_OBJECT (sink, "Requesting %u periods of %u frames", in gst_tinyalsa_sink_prepare()
294 params = pcm_params_get (sink->card, sink->device, PCM_OUT); in gst_tinyalsa_sink_prepare()
296 GST_ERROR_OBJECT (sink, "Could not get PCM params"); in gst_tinyalsa_sink_prepare()
311 GST_OBJECT_LOCK (sink); in gst_tinyalsa_sink_prepare()
313 sink->pcm = pcm_open (sink->card, sink->device, PCM_OUT | PCM_NORESTART, in gst_tinyalsa_sink_prepare()
316 GST_OBJECT_UNLOCK (sink); in gst_tinyalsa_sink_prepare()
318 if (!sink->pcm || !pcm_is_ready (sink->pcm)) { in gst_tinyalsa_sink_prepare()
319 GST_ERROR_OBJECT (sink, "Could not open device: %s", in gst_tinyalsa_sink_prepare()
320 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_prepare()
324 if (pcm_prepare (sink->pcm) < 0) { in gst_tinyalsa_sink_prepare()
325 GST_ERROR_OBJECT (sink, "Could not prepare device: %s", in gst_tinyalsa_sink_prepare()
326 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_prepare()
330 spec->segsize = pcm_frames_to_bytes (sink->pcm, config.period_size); in gst_tinyalsa_sink_prepare()
333 GST_DEBUG_OBJECT (sink, "Configured for %u periods of %u frames", in gst_tinyalsa_sink_prepare()
339 if (sink->pcm) in gst_tinyalsa_sink_prepare()
340 pcm_close (sink->pcm); in gst_tinyalsa_sink_prepare()
348 GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink); in gst_tinyalsa_sink_unprepare() local
350 if (pcm_stop (sink->pcm) < 0) { in gst_tinyalsa_sink_unprepare()
351 GST_ERROR_OBJECT (sink, "Could not stop device: %s", in gst_tinyalsa_sink_unprepare()
352 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_unprepare()
356 GST_OBJECT_LOCK (sink); in gst_tinyalsa_sink_unprepare()
358 if (pcm_close (sink->pcm)) { in gst_tinyalsa_sink_unprepare()
359 GST_ERROR_OBJECT (sink, "Could not close device: %s", in gst_tinyalsa_sink_unprepare()
360 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_unprepare()
364 sink->pcm = NULL; in gst_tinyalsa_sink_unprepare()
366 gst_caps_replace (&sink->cached_caps, NULL); in gst_tinyalsa_sink_unprepare()
368 GST_OBJECT_UNLOCK (sink); in gst_tinyalsa_sink_unprepare()
370 GST_DEBUG_OBJECT (sink, "Device unprepared"); in gst_tinyalsa_sink_unprepare()
385 GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink); in gst_tinyalsa_sink_write() local
389 GST_DEBUG_OBJECT (sink, "Starting write"); in gst_tinyalsa_sink_write()
391 ret = pcm_write (sink->pcm, data, length); in gst_tinyalsa_sink_write()
393 GST_WARNING_OBJECT (sink, "Got an underrun"); in gst_tinyalsa_sink_write()
395 if (pcm_prepare (sink->pcm) < 0) { in gst_tinyalsa_sink_write()
396 GST_ERROR_OBJECT (sink, "Could not prepare device: %s", in gst_tinyalsa_sink_write()
397 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_write()
404 GST_ERROR_OBJECT (sink, "Could not write data to device: %s", in gst_tinyalsa_sink_write()
405 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_write()
409 GST_DEBUG_OBJECT (sink, "Wrote %u bytes", length); in gst_tinyalsa_sink_write()
417 GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink); in gst_tinyalsa_sink_reset() local
419 if (pcm_stop (sink->pcm) < 0) { in gst_tinyalsa_sink_reset()
420 GST_ERROR_OBJECT (sink, "Could not stop device: %s", in gst_tinyalsa_sink_reset()
421 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_reset()
424 if (pcm_prepare (sink->pcm) < 0) { in gst_tinyalsa_sink_reset()
425 GST_ERROR_OBJECT (sink, "Could not prepare device: %s", in gst_tinyalsa_sink_reset()
426 pcm_get_error (sink->pcm)); in gst_tinyalsa_sink_reset()
433 GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink); in gst_tinyalsa_sink_delay() local
436 delay = pcm_get_delay (sink->pcm); in gst_tinyalsa_sink_delay()
440 GST_DEBUG_OBJECT (sink, "Got negative delay"); in gst_tinyalsa_sink_delay()
443 GST_DEBUG_OBJECT (sink, "Got delay of %u", delay); in gst_tinyalsa_sink_delay()
495 gst_tinyalsa_sink_init (GstTinyalsaSink * sink) in gst_tinyalsa_sink_init() argument
497 sink->card = DEFAULT_CARD; in gst_tinyalsa_sink_init()
498 sink->device = DEFAULT_DEVICE; in gst_tinyalsa_sink_init()
500 sink->cached_caps = NULL; in gst_tinyalsa_sink_init()