Skip to content

Commit e7ec2b9

Browse files
committed
Made scope narrowing.
1 parent 3cfd060 commit e7ec2b9

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

FlashCap.Core/Internal/NativeMethods_AVFoundation.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ private struct NXArchInfo
116116
}
117117
}
118118

119-
public static class LibC
119+
private static class LibC
120120
{
121-
public const string Path = "/usr/lib/libc.dylib";
121+
private const string Path = "/usr/lib/libc.dylib";
122122

123123
[DllImport(Path, EntryPoint = "dispatch_queue_create")]
124124
public static extern IntPtr DispatchQueueCreate(string label, IntPtr attr);
@@ -132,7 +132,7 @@ public static class LibC
132132

133133
public static class LibObjC
134134
{
135-
public const string Path = "/usr/lib/libobjc.A.dylib";
135+
private const string Path = "/usr/lib/libobjc.A.dylib";
136136

137137
public const string InitSelector = "init";
138138
public const string AllocSelector = "alloc";
@@ -424,7 +424,7 @@ public NSError(IntPtr handle, bool retain) :
424424

425425
public static class LibCoreFoundation
426426
{
427-
public const string Path = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
427+
private const string Path = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
428428

429429
public static readonly IntPtr Handle = Dlfcn.OpenLibrary(Path, Dlfcn.Mode.Now);
430430
public static readonly IntPtr kCFTypeArrayCallbacks = Dlfcn.GetSymbol(Handle, "kCFTypeArrayCallBacks");
@@ -634,7 +634,7 @@ public enum CMBlockBufferError : int {
634634

635635
public static class LibCoreMedia
636636
{
637-
public const string Path = "/System/Library/Frameworks/CoreMedia.framework/CoreMedia";
637+
private const string Path = "/System/Library/Frameworks/CoreMedia.framework/CoreMedia";
638638

639639
[DllImport(Path)]
640640
public static extern IntPtr CMSampleBufferGetAttachments(IntPtr sampleBuffer, int makeWritable);
@@ -652,11 +652,9 @@ public enum CMAttachmentMode
652652
ShouldPropagate = 1
653653
}
654654

655-
656655
// Add this constant
657656
public static readonly FourCharCode kCMMediaType_Video = new FourCharCode('v', 'i', 'd', 'e');
658657

659-
660658
[DllImport(Path)]
661659
public static extern CMTime CMTimeMake(long value, int timescale);
662660

@@ -720,8 +718,6 @@ public enum CMPixelFormat : uint
720718
YpCbCr444_10bits = 1983131952,
721719
IndexedGrayWhiteIsZero_8bits = 40,
722720
}
723-
724-
725721

726722
[StructLayout(LayoutKind.Sequential)]
727723
public partial struct CMTime
@@ -765,7 +761,7 @@ public CMFormatDescription(IntPtr handle) :
765761

766762
public static class LibCoreVideo
767763
{
768-
public const string Path = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo";
764+
private const string Path = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo";
769765

770766
private const int RTLD_NOW = 2;
771767
public static readonly IntPtr Handle = Dlfcn.dlopen(Path, RTLD_NOW);

0 commit comments

Comments
 (0)