Lines Matching defs:stream

56 static pa_stream *stream = NULL;
61 * We can only write audio to the PA stream in multiples of the stream's
70 * in the next stream write iteration. Rinse and repeat.
134 pa_log(_("Failed to drain stream: %s"), pa_strerror(pa_context_errno(context)));
139 pa_log(_("Playback stream drained."));
141 pa_stream_disconnect(stream);
142 pa_stream_unref(stream);
143 stream = NULL;
157 if (stream) {
160 pa_stream_set_write_callback(stream, NULL, NULL);
162 if (!(o = pa_stream_drain(stream, stream_drain_complete, NULL))) {
173 /* This is called whenever new data may be written to the stream */
251 /* If there is a hole in the stream, we generate silence, except
252 * if it's a passthrough stream in which case we skip the hole. */
309 /* This routine is called whenever the stream state changes */
415 pa_log(_("Cork request stack is empty: corking stream"));
421 pa_log(_("Cork request stack is empty: uncorking stream"));
447 pa_assert(!stream);
452 if (!(stream = pa_stream_new_with_proplist(c, NULL, &sample_spec, &channel_map, proplist))) {
457 pa_stream_set_state_callback(stream, stream_state_callback, NULL);
458 pa_stream_set_write_callback(stream, stream_write_callback, NULL);
459 pa_stream_set_read_callback(stream, stream_read_callback, NULL);
460 pa_stream_set_suspended_callback(stream, stream_suspended_callback, NULL);
461 pa_stream_set_moved_callback(stream, stream_moved_callback, NULL);
462 pa_stream_set_underflow_callback(stream, stream_underflow_callback, NULL);
463 pa_stream_set_overflow_callback(stream, stream_overflow_callback, NULL);
464 pa_stream_set_started_callback(stream, stream_started_callback, NULL);
465 pa_stream_set_event_callback(stream, stream_event_callback, NULL);
466 pa_stream_set_buffer_attr_callback(stream, stream_buffer_attr_callback, NULL);
490 if (pa_stream_connect_playback(stream, device, &buffer_attr, flags, volume_is_set ? pa_cvolume_set(&cv, sample_spec.channels, volume) : NULL, NULL) < 0) {
496 if (monitor_stream != PA_INVALID_INDEX && (pa_stream_set_monitor_stream(stream, monitor_stream) < 0)) {
497 pa_log(_("Failed to set monitor stream: %s"), pa_strerror(pa_context_errno(c)));
500 if (pa_stream_connect_record(stream, device, &buffer_attr, flags) < 0) {
535 if (!stream || pa_stream_get_state(stream) != PA_STREAM_READY ||
536 !(writable = pa_stream_writable_size(stream))) {
542 if (pa_stream_begin_write(stream, (void **)&buf, &writable) < 0) {
580 if (pa_stream_write(stream, buf, towrite, NULL, 0, PA_SEEK_RELATIVE) < 0) {
586 pa_stream_cancel_write(stream);
655 if (!stream)
658 pa_operation_unref(pa_stream_update_timing_info(stream, stream_update_timing_callback, NULL));
663 if (stream && pa_stream_get_state(stream) == PA_STREAM_READY) {
665 if (!(o = pa_stream_update_timing_info(stream, stream_update_timing_callback, NULL)))
686 " --stream-name=NAME How to call this stream on the server\n"
695 " --fix-format Take the sample format from the sink/source the stream is\n"
697 " --fix-rate Take the sampling rate from the sink/source the stream is\n"
700 " from the sink/source the stream is being connected to.\n"
712 " --monitor-stream=INDEX Record from the sink input with index INDEX.\n")
756 {"stream-name", 1, NULL, ARG_STREAM_NAME},
779 {"monitor-stream", 1, NULL, ARG_MONITOR_STREAM},
867 pa_log(_("Invalid stream name '%s'"), t ? t : optarg);
1000 pa_log(_("Failed to parse the argument for --monitor-stream"));
1137 pa_log(_("Opening a %s stream with sample specification '%s' and channel map '%s'."),
1228 if (stream)
1229 pa_stream_unref(stream);