Skip to content

Commit

Permalink
Moar cscore
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Feb 7, 2024
1 parent 94631fe commit 45447f5
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 140 deletions.
44 changes: 22 additions & 22 deletions src/cscore/Natives/CsNative.Shim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public static PropertyKind GetPropertyKind(CsProperty property, out StatusValue
status = StatusValue.Ok;
return GetPropertyKindRefShim(property, ref status);
}
public static string? GetPropertyName(CsProperty property, out StatusValue status)
public static void GetPropertyName(CsProperty property, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetPropertyNameRefShim(property, ref status);
GetPropertyNameRefShim(property, out value, ref status);
}
public static int GetProperty(CsProperty property, out StatusValue status)
{
Expand All @@ -42,10 +42,10 @@ public static int GetPropertyDefault(CsProperty property, out StatusValue status
status = StatusValue.Ok;
return GetPropertyDefaultRefShim(property, ref status);
}
public static string GetStringProperty(CsProperty property, out StatusValue status)
public static void GetStringProperty(CsProperty property, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetStringPropertyRefShim(property, ref status);
GetStringPropertyRefShim(property, out value, ref status);
}
public static void SetStringProperty(CsProperty property, [MarshalUsing(typeof(Utf8StringMarshaller))] string value, out StatusValue status)
{
Expand Down Expand Up @@ -87,15 +87,15 @@ public static SourceKind GetSourceKind(CsSource source, out StatusValue status)
status = StatusValue.Ok;
return GetSourceKindRefShim(source, ref status);
}
public static string GetSourceName(CsSource source, out StatusValue status)
public static void GetSourceName(CsSource source, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSourceNameRefShim(source, ref status);
GetSourceNameRefShim(source, out value, ref status);
}
public static string GetSourceDescription(CsSource source, out StatusValue status)
public static void GetSourceDescription(CsSource source, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSourceDescriptionRefShim(source, ref status);
GetSourceDescriptionRefShim(source, out value, ref status);
}
public static ulong GetSourceLastFrameTime(CsSource source, out StatusValue status)
{
Expand Down Expand Up @@ -162,10 +162,10 @@ public static bool SetSourceConfigJson(CsSource source, string config, out Statu
status = StatusValue.Ok;
return SetSourceConfigJsonRefShim(source, config, ref status);
}
public static string? GetSourceConfigJson(CsSource source, out StatusValue status)
public static void GetSourceConfigJson(CsSource source, out string config, out StatusValue status)
{
status = StatusValue.Ok;
return GetSourceConfigJsonRefShim(source, ref status);
GetSourceConfigJsonRefShim(source, out config, ref status);
}
public static VideoMode[] EnumerateSourceVideoModes(CsSource source, out int count, out StatusValue status)
{
Expand Down Expand Up @@ -232,10 +232,10 @@ public static void SetUsbCameraPath(CsSource source, string path, out StatusValu
status = StatusValue.Ok;
SetUsbCameraPathRefShim(source, path, ref status);
}
public static string? GetUsbCameraPath(CsSource source, out StatusValue status)
public static void GetUsbCameraPath(CsSource source, out string path, out StatusValue status)
{
status = StatusValue.Ok;
return GetUsbCameraPathRefShim(source, ref status);
GetUsbCameraPathRefShim(source, out path, ref status);
}
public static UsbCameraInfo GetUsbCameraInfo(CsSource source, out StatusValue status)
{
Expand Down Expand Up @@ -302,15 +302,15 @@ public static SinkKind GetSinkKind(CsSink sink, out StatusValue status)
status = StatusValue.Ok;
return GetSinkKindRefShim(sink, ref status);
}
public static string GetSinkName(CsSink sink, out StatusValue status)
public static void GetSinkName(CsSink sink, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSinkNameRefShim(sink, ref status);
GetSinkNameRefShim(sink, out value, ref status);
}
public static string GetSinkDescription(CsSink sink, out StatusValue status)
public static void GetSinkDescription(CsSink sink, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSinkDescriptionRefShim(sink, ref status);
GetSinkDescriptionRefShim(sink, out value, ref status);
}
public static CsProperty GetSinkProperty(CsSink sink, string name, out StatusValue status)
{
Expand All @@ -337,10 +337,10 @@ public static bool SetSinkConfigJson(CsSink sink, string config, out StatusValue
status = StatusValue.Ok;
return SetSinkConfigJsonRefShim(sink, config, ref status);
}
public static string? GetSinkConfigJson(CsSink sink, out StatusValue status)
public static void GetSinkConfigJson(CsSink sink, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSinkConfigJsonRefShim(sink, ref status);
GetSinkConfigJsonRefShim(sink, out value, ref status);
}
public static CsSink CopySink(CsSink sink, out StatusValue status)
{
Expand All @@ -352,10 +352,10 @@ public static CsSink ReleaseSink(CsSink sink, out StatusValue status)
status = StatusValue.Ok;
return ReleaseSinkRefShim(sink, ref status);
}
public static string? GetMjpegServerListenAddress(CsSink sink, out StatusValue status)
public static void GetMjpegServerListenAddress(CsSink sink, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetMjpegServerListenAddressRefShim(sink, ref status);
GetMjpegServerListenAddressRefShim(sink, out value, ref status);
}
public static int GetMjpegServerPort(CsSink sink, out StatusValue status)
{
Expand All @@ -367,10 +367,10 @@ public static void SetSinkDescription(CsSink sink, string description, out Statu
status = StatusValue.Ok;
SetSinkDescriptionRefShim(sink, description, ref status);
}
public static string? GetSinkError(CsSink sink, out StatusValue status)
public static void GetSinkError(CsSink sink, out string value, out StatusValue status)
{
status = StatusValue.Ok;
return GetSinkErrorRefShim(sink, ref status);
GetSinkErrorRefShim(sink, out value, ref status);
}
public static int SetSinkEnabled(CsSink sink, bool enabled, out StatusValue status)
{
Expand Down
Loading

0 comments on commit 45447f5

Please sign in to comment.