Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add startStream Functionality to Linux Implementation #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mauricelos
Copy link

This merge request adds support for the startStream method to the Linux implementation of the record Flutter package. This enhancement enables applications running on Linux to capture audio data as a stream, aligning the Linux plugin's capabilities with those of other platforms.

Summary of Changes

  • Added: Implementation of the startStream method for Linux.
  • Added: Helper method _callFMediaStream to manage the fmedia process for streaming.
  • Updated: Handling of audio encoders and configurations to support streaming.

@mauricelos mauricelos force-pushed the feat-add-record-streaming-linux branch from 467f1c1 to 6a9e49a Compare December 4, 2024 13:52
Copy link
Owner

@llfbandit llfbandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

throw Exception('${config.encoder} is not supported.');
}

String numChannels;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract this to dedicated method to avoid duplicated code.

final streamController = StreamController<List<int>>();
var fileExtension = '';

switch (config.encoder) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAVE can't be streamed with headers. Please remove it.
But maybe we can enable PCM recording this way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants