mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 15:24:07 +00:00
mac-virtualcam: Mark parameters as unused
Marks function parameters as unused, removing compiler warnings
This commit is contained in:
parent
627aaeddb4
commit
20c41dba8a
|
@ -83,6 +83,9 @@ OSStatus CMSampleBufferCreateFromData(NSSize size,
|
|||
|
||||
static void releaseNSData(void *o, void *block, size_t size)
|
||||
{
|
||||
UNUSED_PARAMETER(block);
|
||||
UNUSED_PARAMETER(size);
|
||||
|
||||
NSData *data = (__bridge_transfer NSData *)o;
|
||||
data = nil; // Assuming ARC is enabled
|
||||
}
|
||||
|
|
|
@ -29,4 +29,6 @@
|
|||
#define VLogFunc(fmt, ...)
|
||||
#define ELog(fmt, ...) DLog(fmt, ##__VA_ARGS__)
|
||||
|
||||
#define UNUSED_PARAMETER(param) (void)param
|
||||
|
||||
#endif /* Logging_h */
|
||||
|
|
|
@ -34,6 +34,8 @@ static UInt32 sRefCount = 0;
|
|||
|
||||
ULONG HardwarePlugIn_AddRef(CMIOHardwarePlugInRef self)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
|
||||
sRefCount += 1;
|
||||
DLogFunc(@"sRefCount now = %d", sRefCount);
|
||||
return sRefCount;
|
||||
|
@ -41,6 +43,8 @@ ULONG HardwarePlugIn_AddRef(CMIOHardwarePlugInRef self)
|
|||
|
||||
ULONG HardwarePlugIn_Release(CMIOHardwarePlugInRef self)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
|
||||
sRefCount -= 1;
|
||||
DLogFunc(@"sRefCount now = %d", sRefCount);
|
||||
return sRefCount;
|
||||
|
@ -49,6 +53,7 @@ ULONG HardwarePlugIn_Release(CMIOHardwarePlugInRef self)
|
|||
HRESULT HardwarePlugIn_QueryInterface(CMIOHardwarePlugInRef self, REFIID uuid,
|
||||
LPVOID *interface)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
DLogFunc(@"");
|
||||
|
||||
if (!interface) {
|
||||
|
@ -161,6 +166,7 @@ OSStatus HardwarePlugIn_Teardown(CMIOHardwarePlugInRef self)
|
|||
void HardwarePlugIn_ObjectShow(CMIOHardwarePlugInRef self,
|
||||
CMIOObjectID objectID)
|
||||
{
|
||||
UNUSED_PARAMETER(objectID);
|
||||
DLogFunc(@"self=%p", self);
|
||||
}
|
||||
|
||||
|
@ -169,6 +175,7 @@ HardwarePlugIn_ObjectHasProperty(CMIOHardwarePlugInRef self,
|
|||
CMIOObjectID objectID,
|
||||
const CMIOObjectPropertyAddress *address)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
|
||||
NSObject<CMIOObject> *object =
|
||||
[OBSDALObjectStore GetObjectWithId:objectID];
|
||||
|
@ -215,6 +222,7 @@ OSStatus HardwarePlugIn_ObjectGetPropertyDataSize(
|
|||
const CMIOObjectPropertyAddress *address, UInt32 qualifierDataSize,
|
||||
const void *qualifierData, UInt32 *dataSize)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
|
||||
NSObject<CMIOObject> *object =
|
||||
[OBSDALObjectStore GetObjectWithId:objectID];
|
||||
|
@ -240,6 +248,7 @@ OSStatus HardwarePlugIn_ObjectGetPropertyData(
|
|||
const void *qualifierData, UInt32 dataSize, UInt32 *dataUsed,
|
||||
void *data)
|
||||
{
|
||||
UNUSED_PARAMETER(self);
|
||||
|
||||
NSObject<CMIOObject> *object =
|
||||
[OBSDALObjectStore GetObjectWithId:objectID];
|
||||
|
@ -345,6 +354,8 @@ OSStatus HardwarePlugIn_DeviceStartStream(CMIOHardwarePlugInRef self,
|
|||
OSStatus HardwarePlugIn_DeviceSuspend(CMIOHardwarePlugInRef self,
|
||||
CMIODeviceID deviceID)
|
||||
{
|
||||
UNUSED_PARAMETER(deviceID);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareNoError;
|
||||
}
|
||||
|
@ -352,6 +363,8 @@ OSStatus HardwarePlugIn_DeviceSuspend(CMIOHardwarePlugInRef self,
|
|||
OSStatus HardwarePlugIn_DeviceResume(CMIOHardwarePlugInRef self,
|
||||
CMIODeviceID deviceID)
|
||||
{
|
||||
UNUSED_PARAMETER(deviceID);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareNoError;
|
||||
}
|
||||
|
@ -380,6 +393,9 @@ HardwarePlugIn_DeviceProcessAVCCommand(CMIOHardwarePlugInRef self,
|
|||
CMIODeviceID deviceID,
|
||||
CMIODeviceAVCCommand *ioAVCCommand)
|
||||
{
|
||||
UNUSED_PARAMETER(deviceID);
|
||||
UNUSED_PARAMETER(ioAVCCommand);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareNoError;
|
||||
}
|
||||
|
@ -389,6 +405,9 @@ HardwarePlugIn_DeviceProcessRS422Command(CMIOHardwarePlugInRef self,
|
|||
CMIODeviceID deviceID,
|
||||
CMIODeviceRS422Command *ioRS422Command)
|
||||
{
|
||||
UNUSED_PARAMETER(deviceID);
|
||||
UNUSED_PARAMETER(ioRS422Command);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareNoError;
|
||||
}
|
||||
|
@ -396,6 +415,8 @@ HardwarePlugIn_DeviceProcessRS422Command(CMIOHardwarePlugInRef self,
|
|||
OSStatus HardwarePlugIn_StreamDeckPlay(CMIOHardwarePlugInRef self,
|
||||
CMIOStreamID streamID)
|
||||
{
|
||||
UNUSED_PARAMETER(streamID);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareIllegalOperationError;
|
||||
}
|
||||
|
@ -403,6 +424,8 @@ OSStatus HardwarePlugIn_StreamDeckPlay(CMIOHardwarePlugInRef self,
|
|||
OSStatus HardwarePlugIn_StreamDeckStop(CMIOHardwarePlugInRef self,
|
||||
CMIOStreamID streamID)
|
||||
{
|
||||
UNUSED_PARAMETER(streamID);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareIllegalOperationError;
|
||||
}
|
||||
|
@ -410,6 +433,9 @@ OSStatus HardwarePlugIn_StreamDeckStop(CMIOHardwarePlugInRef self,
|
|||
OSStatus HardwarePlugIn_StreamDeckJog(CMIOHardwarePlugInRef self,
|
||||
CMIOStreamID streamID, SInt32 speed)
|
||||
{
|
||||
UNUSED_PARAMETER(streamID);
|
||||
UNUSED_PARAMETER(speed);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareIllegalOperationError;
|
||||
}
|
||||
|
@ -419,6 +445,10 @@ OSStatus HardwarePlugIn_StreamDeckCueTo(CMIOHardwarePlugInRef self,
|
|||
Float64 requestedTimecode,
|
||||
Boolean playOnCue)
|
||||
{
|
||||
UNUSED_PARAMETER(streamID);
|
||||
UNUSED_PARAMETER(requestedTimecode);
|
||||
UNUSED_PARAMETER(playOnCue);
|
||||
|
||||
DLogFunc(@"self=%p", self);
|
||||
return kCMIOHardwareIllegalOperationError;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
extern "C" {
|
||||
void *PlugInMain(CFAllocatorRef allocator, CFUUIDRef requestedTypeUUID)
|
||||
{
|
||||
UNUSED_PARAMETER(allocator);
|
||||
|
||||
DLogFunc(@"version=%@", PLUGIN_VERSION);
|
||||
if (!CFEqual(requestedTypeUUID, kCMIOHardwarePlugInTypeID)) {
|
||||
return 0;
|
||||
|
|
|
@ -117,6 +117,8 @@ static void *data = &data;
|
|||
static void *virtualcam_output_create(obs_data_t *settings,
|
||||
obs_output_t *output)
|
||||
{
|
||||
UNUSED_PARAMETER(settings);
|
||||
|
||||
outputRef = output;
|
||||
|
||||
blog(LOG_DEBUG, "output_create");
|
||||
|
@ -126,12 +128,15 @@ static void *virtualcam_output_create(obs_data_t *settings,
|
|||
|
||||
static void virtualcam_output_destroy(void *data)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
blog(LOG_DEBUG, "output_destroy");
|
||||
sMachServer = nil;
|
||||
}
|
||||
|
||||
static bool virtualcam_output_start(void *data)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
|
||||
bool hasDalPlugin = check_dal_plugin();
|
||||
|
||||
if (!hasDalPlugin) {
|
||||
|
@ -158,6 +163,9 @@ static bool virtualcam_output_start(void *data)
|
|||
|
||||
static void virtualcam_output_stop(void *data, uint64_t ts)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
UNUSED_PARAMETER(ts);
|
||||
|
||||
blog(LOG_DEBUG, "output_stop");
|
||||
obs_output_end_data_capture(outputRef);
|
||||
[sMachServer stop];
|
||||
|
@ -165,6 +173,8 @@ static void virtualcam_output_stop(void *data, uint64_t ts)
|
|||
|
||||
static void virtualcam_output_raw_video(void *data, struct video_data *frame)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
|
||||
uint8_t *outData = frame->data[0];
|
||||
if (frame->linesize[0] != (videoInfo.output_width * 2)) {
|
||||
blog(LOG_ERROR,
|
||||
|
|
Loading…
Reference in a new issue