Skip to content

Commit

Permalink
Fixed issue with Save Screenshot method.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinodo committed Apr 11, 2024
1 parent dce7269 commit f2bbce5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion OBSClient/Messages/RequestResponseMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class RequestResponseMessage : IMessage, IJsonOnDeserialized
// Sources Requests
{RequestType.GetSourceActive, typeof(SourceActiveResponse) },
{RequestType.GetSourceScreenshot, typeof(ImageDataResponse) },
{RequestType.SaveSourceScreenshot, typeof(ImageDataResponse) },

// Scenes Requests
{RequestType.GetSceneList, typeof(SceneListResponse) },
Expand Down
2 changes: 1 addition & 1 deletion OBSClient/OBSClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RepositoryType>git</RepositoryType>
<PackageTags>obs</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion OBSClient/ObsClient_SourcesRequests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public async Task<string> GetSourceScreenshot(string sourceName, string imageFor
/// <param name="imageWidth">Width to scale the screenshot to (between 8 and 4096)</param>
/// <param name="imageHeight">Height to scale the screenshot to (between 8 and 4096)</param>
/// <param name="imageCompressionQuality">Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use "default" (whatever that means, idk) (between -1 and 100)</param>
/// <returns>Base64-encoded screenshot</returns>
/// <remarks>
/// The imageWidth and imageHeight parameters are treated as "scale to inner", meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept. If imageWidth and imageHeight are not specified, the compressed image will use the full resolution of the source.
/// Compatible with inputs and scenes.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Our intent is to create a <ins>complete</ins> and <ins>easy to use</ins> client

## Installation
Install from the [NuGet Gallery](https://www.nuget.org/packages/OBSClient)
Or through the NuGet CLI: `NuGet\Install-Package OBSClient -Version 2.1.0`
From the command line: `dotnet add package OBSClient --version 2.1.0`
Or through the NuGet CLI: `NuGet\Install-Package OBSClient -Version 2.1.1`
From the command line: `dotnet add package OBSClient --version 2.1.1`

## Sample usage

Expand Down
5 changes: 3 additions & 2 deletions SampleWindowsAppliation/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Form1()
_client.VirtualcamStateChanged += VirtualcamStateChanged;

_client.PropertyChanged += PropertyChanged;

_client.RequestTimeout = 5000;
_meticsTimer = new System.Threading.Timer(new TimerCallback(MetricsTimerCallback), null, 1000, 1000);
this.UpdateTitle();
}
Expand Down Expand Up @@ -515,7 +515,8 @@ private void Button3_Click(object sender, EventArgs e)

private async void BtnStartStudioMode_Click(object sender, EventArgs e)
{
await _client.SetStudioModeEnabled(true);
await _client.SaveSourceScreenshot("TEST", "png", "C:\\Temp\\Screenshots\\{DateTime.Now.Ticks}}.png");
//await _client.SetStudioModeEnabled(true);
}

private async void BtnStopStudioMode_Click(object sender, EventArgs e)
Expand Down

0 comments on commit f2bbce5

Please sign in to comment.