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

New readme #597

Merged
merged 13 commits into from Sep 26, 2023
Merged

New readme #597

merged 13 commits into from Sep 26, 2023

Conversation

mat-hek
Copy link
Member

@mat-hek mat-hek commented Sep 15, 2023

Todo:

  • add a GH action for generating the packages list

@mat-hek mat-hek added the no-changelog This label has to be added if changes from the PR are not meant to be placed in the CHANGELOG.md label Sep 15, 2023
@mat-hek mat-hek force-pushed the readme branch 3 times, most recently from 47fae5d to 6321989 Compare September 15, 2023 09:38
@mat-hek mat-hek marked this pull request as ready for review September 15, 2023 11:49
@mat-hek mat-hek changed the title Readme New readme Sep 15, 2023
Process.sleep(gh_req_timeout)

Req.get!(
"https://api.github.com/orgs/#{org}/repos?per_page=100",
Copy link
Member

Choose a reason for hiding this comment

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

Why per_page=100? IMO it would be safer to put here bigger number

Copy link
Member Author

@mat-hek mat-hek Sep 19, 2023

Choose a reason for hiding this comment

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

That's the maximum that github allows :/ if we want more, we need to paginate, I'll see how hard it is

# find repos from the membraneframework organization that aren't in the list

package_names =
packages |> Enum.filter(&(&1.type == :package)) |> Enum.map(& &1.name) |> MapSet.new()
Copy link
Member

Choose a reason for hiding this comment

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

lacking_repos =
repos
|> Map.values()
|> Enum.filter(&(&1.owner.login == "membraneframework"))
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason of this Enum.filter? What values, different than "membraneframework", may occur in this place?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the organisation, it can be membraneframework-labs, jellyfish-dev or some third party. This is needed to print a warn whenever a repo from membraneframework is not in the list

end

hex = Req.get!("https://hex.pm/api/packages/#{name}", decode_json: [keys: :atoms])
hex_present = hex.status == 200
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
hex_present = hex.status == 200
hex_present? = hex.status == 200


packages_md =
packages
|> Enum.map_reduce(%{header_present: false}, fn
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
|> Enum.map_reduce(%{header_present: false}, fn
|> Enum.map_reduce(%{header_present?: false}, fn

Comment on lines +58 to +63
This is an [Elixir](elixir-lang.org) snippet, that streams an mp3 via HTTP and plays it on your speaker. Here's how to run it:
- Install [libmad](https://github.com/markjeee/libmad) and [portaudio](https://github.com/PortAudio/portaudio). Membrane uses these libs to decode the mp3 and to access your speaker, respectively. You can use these commands:
- On Mac OS: `brew install libmad portaudio pkg-config`
- On Debian: `apt install libmad0-dev portaudio19-dev`
Copy link
Member

Choose a reason for hiding this comment

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

I guess, that since introducing precompiled dependencies in Bundlex, it won't be needed - as far as I know, it should be merged soon

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'll remove that once we merge it and the required libraries support it


## Learning

The best place to learn Membrane is the [membrane.stream/learn](https://membrane.stream/learn) website and the [membrane_demo](https://github.com/membraneframework/membrane_demo) repository. Try them out, then hack something exciting!
Copy link
Member

Choose a reason for hiding this comment

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

Don't we want to have guide/tutorials here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Guide is being moved to tutorials, and tutorials are deployed to membrane.stream/learn

README.md Outdated
Comment on lines 81 to 93
The most basic media processing entities of Membrane are `Element`s. An element might be able, for example, to mux incoming audio and video streams into MP4, or play raw audio using your sound card. You can create elements yourself, or choose from the ones provided by the framework.

Elements can be organized into a pipeline - a sequence of linked elements that perform a specific task. For example, a pipeline might receive an incoming RTSP stream from a webcam and convert it to an HLS stream, or act as a selective forwarding unit (SFU) to implement your own videoconferencing room. The [Quick start](#quick-start) section above shows how to create a simple pipeline.

### Membrane packages

To embrace modularity, Membrane is delivered to you in multiple packages, including plugins, formats, core and standalone libraries. The complete list of all the Membrane packages maintained by the Membrane team is available [here](https://github.com/membraneframework/membrane_core/Membrane-packages).

**Plugins**

Plugins provide elements that you can use in your pipeline. Each plugin lives in a `membrane_X_plugin` repository, where X can be a protocol, codec, container or functionality, for example [mebrane_opus_plugin](https://github.com/membraneframework/membrane_opus_plugin). Plugins wrapping a tool or library are named `membrane_X_LIBRARYNAME_plugin` or just `membrane_LIBRARYNAME_plugin`, like [membrane_mp3_mad_plugin](https://github.com/membraneframework/membrane_mp3_mad_plugin). Plugins are published on [hex.pm](https://hex.pm), for example [hex.pm/packages/membrane_opus_plugin](https://hex.pm/pakcages/membrane_opus_plugin) and docs are at [hexdocs](https://hexdocs.pm), like [hexdocs.pm/membrane_opus_plugin](https://hexdocs.pm/membrane_opus_plugin). Some plugins require native libraries installed in your OS. Those requirements, along with usage examples are outlined in each plugin's readme.
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about changing Element on Component here? I understand, that introducing concept of bin might make this section unnecessary complicated, but using word Component instead of Element won't cause that

Copy link
Member Author

@mat-hek mat-hek Sep 20, 2023

Choose a reason for hiding this comment

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

I thought about it, but it would require explaining what components are, so we'd have to mention bins anyway. I'd rather avoid using any Membrane-specific term without describing what it means. It makes me wonder if defining the bin as a special type of element would be better, as it would be easier to explain step by step.

README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 132 to 134
- Create learning materials. We try our best but can cover only a limited number of Membrane use cases.
- Improve docs. We know it's not the most exciting part, but if you had a hard time understanding the docs, you're the best person to fix them ;)
- Contribute code - plugins, features and bug fixes. It's best to contact us before, so we can provide our help & assistance, and agree on important matters. For details see the [contribution guide](CONTRIBUTING.md)
Copy link
Member

Choose a reason for hiding this comment

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

Add dot at the end of the last line or remove it from the end of the line with Create learning materials ...

Comment on lines +7 to +8
### []() Let's meet on 13th October at [RTC.ON](https://rtcon.live) - the first conference about Membrane & multimedia!
### []() Learn more at [rtcon.live](https://rtcon.live)
Copy link
Member

Choose a reason for hiding this comment

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

[]() <- Is this intetional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, github sometimes behaves weirdly if there's a link in a header. Adding an empty link at the beginning seems to fix it.

elixir update_packages_list.exs
git config user.name 'Membrane Bot'
git config user.email 'bot@membrane.stream'
git checkout -b auto-update-packages-list
Copy link
Member

Choose a reason for hiding this comment

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

This line will fail, if branch auto-update-packages-list already exists

git config user.email 'bot@membrane.stream'
git checkout -b auto-update-packages-list
git add README.md
git commit -m"auto update packages list in readme" --allow-empty
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
git commit -m"auto update packages list in readme" --allow-empty
git commit -m "auto update packages list in readme" --allow-empty

~r/<!-- packages-list-start -->(.|\n)*<!-- packages-list-end -->/m,
packages_md
)
|> then(&File.write(readme_path, &1))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
|> then(&File.write(readme_path, &1))
|> then(&File.write!(readme_path, &1))

@mat-hek mat-hek merged commit 53598cc into master Sep 26, 2023
7 checks passed
@mat-hek mat-hek deleted the readme branch September 26, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This label has to be added if changes from the PR are not meant to be placed in the CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants