Skip to content

Commit

Permalink
Add audio to encoder 🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
NiiightmareXD committed Aug 8, 2024
1 parent cc49892 commit 6853d4f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "windows-capture"
version = "1.3.2"
version = "1.3.5"
authors = ["NiiightmareXD"]
edition = "2021"
description = "Fastest Windows Screen Capture Library For Rust 🔥"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Add this library to your `Cargo.toml`:

```toml
[dependencies]
windows-capture = "1.3.2"
windows-capture = "1.3.5"
```
or run this command

Expand All @@ -44,7 +44,7 @@ use std::{

use windows_capture::{
capture::GraphicsCaptureApiHandler,
encoder::{AudioSettingBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
encoder::{AudioSettingsBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
frame::Frame,
graphics_capture_api::InternalCaptureControl,
monitor::Monitor,
Expand Down Expand Up @@ -72,7 +72,7 @@ impl GraphicsCaptureApiHandler for Capture {

let encoder = VideoEncoder::new(
VideoSettingsBuilder::new(1920, 1080),
AudioSettingBuilder::default().disabled(true),
AudioSettingsBuilder::default().disabled(true),
ContainerSettingsBuilder::default(),
"video.mp4",
)?;
Expand Down
4 changes: 2 additions & 2 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{

use windows_capture::{
capture::GraphicsCaptureApiHandler,
encoder::{AudioSettingBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
encoder::{AudioSettingsBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
frame::Frame,
graphics_capture_api::InternalCaptureControl,
monitor::Monitor,
Expand Down Expand Up @@ -33,7 +33,7 @@ impl GraphicsCaptureApiHandler for Capture {

let encoder = VideoEncoder::new(
VideoSettingsBuilder::new(1920, 1080),
AudioSettingBuilder::default().disabled(true),
AudioSettingsBuilder::default().disabled(true),
ContainerSettingsBuilder::default(),
"video.mp4",
)?;
Expand Down
10 changes: 5 additions & 5 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl VideoSettingsBuilder {
}

/// The `AudioSettingsSubType` enum represents the settings for the audio encoder.
pub struct AudioSettingBuilder {
pub struct AudioSettingsBuilder {
bitrate: u32,
channel_count: u32,
sample_rate: u32,
Expand All @@ -263,7 +263,7 @@ pub struct AudioSettingBuilder {
disabled: bool,
}

impl AudioSettingBuilder {
impl AudioSettingsBuilder {
pub const fn new() -> Self {
Self {
bitrate: 192000,
Expand Down Expand Up @@ -316,7 +316,7 @@ impl AudioSettingBuilder {
}
}

impl Default for AudioSettingBuilder {
impl Default for AudioSettingsBuilder {
fn default() -> Self {
Self::new()
}
Expand Down Expand Up @@ -534,7 +534,7 @@ impl VideoEncoder {
#[inline]
pub fn new<P: AsRef<Path>>(
video_settings: VideoSettingsBuilder,
audio_settings: AudioSettingBuilder,
audio_settings: AudioSettingsBuilder,
container_settings: ContainerSettingsBuilder,
path: P,
) -> Result<Self, VideoEncoderError> {
Expand Down Expand Up @@ -762,7 +762,7 @@ impl VideoEncoder {
#[inline]
pub fn new_from_stream<P: AsRef<Path>>(
video_settings: VideoSettingsBuilder,
audio_settings: AudioSettingBuilder,
audio_settings: AudioSettingsBuilder,
container_settings: ContainerSettingsBuilder,
stream: IRandomAccessStream,
) -> Result<Self, VideoEncoderError> {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//!
//! ```toml
//! [dependencies]
//! windows-capture = "1.3.2"
//! windows-capture = "1.3.5"
//! ```
//! or run this command
//!
Expand All @@ -40,7 +40,7 @@
//!
//! use windows_capture::{
//! capture::GraphicsCaptureApiHandler,
//! encoder::{AudioSettingBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
//! encoder::{AudioSettingsBuilder, ContainerSettingsBuilder, VideoEncoder, VideoSettingsBuilder},
//! frame::Frame,
//! graphics_capture_api::InternalCaptureControl,
//! monitor::Monitor,
Expand Down Expand Up @@ -68,7 +68,7 @@
//!
//! let encoder = VideoEncoder::new(
//! VideoSettingsBuilder::new(1920, 1080),
//! AudioSettingBuilder::default().disabled(true),
//! AudioSettingsBuilder::default().disabled(true),
//! ContainerSettingsBuilder::default(),
//! "video.mp4",
//! )?;
Expand Down
2 changes: 1 addition & 1 deletion windows-capture-python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "windows-capture-python"
version = "1.3.2"
version = "1.3.5"
authors = ["NiiightmareXD"]
edition = "2021"
description = "Fastest Windows Screen Capture Library For Python 🔥"
Expand Down
2 changes: 1 addition & 1 deletion windows-capture-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "windows-capture"
version = "1.3.2"
version = "1.3.5"
description = "Fastest Windows Screen Capture Library For Python 🔥"
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit 6853d4f

Please sign in to comment.