Skip to content

Commit f6b5c22

Browse files
committed
Adjust copyright header
1 parent 9eaa51f commit f6b5c22

28 files changed

+82
-71
lines changed

Daemons/vmpserverd/src/NSRunLoop+blockExecution.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2024 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/NSRunLoop+blockExecution.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2024 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/NSString+substituteVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/NSString+substituteVariables.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPErrors.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPErrors.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPJournal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPJournal.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPPipelineManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPPropertyListProtocol.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPServerMain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/VMPServerMain.m

+33-35
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT
@@ -13,19 +13,19 @@
1313
#import "VMPRTSPServer.h"
1414
#import "VMPServerMain.h"
1515

16-
#include <graphviz/gvc.h>
1716
#include <graphviz/cgraph.h>
17+
#include <graphviz/gvc.h>
1818

1919
#include "config.h"
2020

2121
// Convert a DOT graph to SVG
2222
static NSData *convertDOTtoSVG(NSData *dotData, NSError **error) {
2323
NSData *svgData;
24-
GVC_t *gvc;
24+
GVC_t *gvc;
2525
Agraph_t *g;
26-
char *rendered;
27-
unsigned int length;
28-
26+
char *rendered;
27+
unsigned int length;
28+
2929
// Initialize Graphviz context
3030
gvc = gvContext();
3131
if (!gvc) {
@@ -34,7 +34,7 @@
3434
}
3535

3636
// Create a graph from the DOT data
37-
g = agmemread((char *)[dotData bytes]);
37+
g = agmemread((char *) [dotData bytes]);
3838
if (!g) {
3939
VMP_FAST_ERROR(error, VMPErrorCodeGraphvizError, @"Failed to create graph from DOT data");
4040
gvFreeContext(gvc);
@@ -58,11 +58,11 @@
5858

5959
svgData = [NSData dataWithBytes:rendered length:length];
6060

61-
// Clean up
62-
gvFreeRenderData(rendered);
63-
gvFreeLayout(gvc, g);
64-
agclose(g);
65-
gvFreeContext(gvc);
61+
// Clean up
62+
gvFreeRenderData(rendered);
63+
gvFreeLayout(gvc, g);
64+
agclose(g);
65+
gvFreeContext(gvc);
6666

6767
return svgData;
6868
}
@@ -433,8 +433,8 @@ - (HKHandlerBlock)_recordingCreateV1 {
433433
}
434434

435435
decodedBody = [NSJSONSerialization JSONObjectWithData:[request HTTPBody]
436-
options:0
437-
error:NULL];
436+
options:0
437+
error:NULL];
438438
if (!decodedBody) {
439439
NSDictionary *response = @{
440440
@"error" : @"Failed to decode JSON body",
@@ -465,7 +465,7 @@ - (HKHandlerBlock)_recordingCreateV1 {
465465
NSDateFormatter *isoFormatter = [[NSDateFormatter alloc] init];
466466
NSDate *stopAtDate;
467467

468-
[isoFormatter setDateFormat: @"yyyy-MM-dd'T'HH:mm:ssZ"];
468+
[isoFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
469469

470470
stopAtDate = [isoFormatter dateFromString:stopAt];
471471
if (!stopAtDate) {
@@ -474,7 +474,7 @@ - (HKHandlerBlock)_recordingCreateV1 {
474474
};
475475
return [HKHTTPJSONResponse responseWithJSONObject:response status:400 error:NULL];
476476
}
477-
477+
478478
// Check if stop date is reasonable (not more then 8 hours in the future)
479479
// TODO: Add option to define this in configuration
480480
if ([stopAtDate timeIntervalSinceNow] > 8 * 60 * 60) {
@@ -483,7 +483,7 @@ - (HKHandlerBlock)_recordingCreateV1 {
483483
};
484484
return [HKHTTPJSONResponse responseWithJSONObject:response status:400 error:NULL];
485485
}
486-
486+
487487
// Create a new recording with default options
488488
// TODO: Allow for user to specify options
489489
[recordingOptions addEntriesFromDictionary:@{
@@ -500,37 +500,36 @@ - (HKHandlerBlock)_recordingCreateV1 {
500500
now = [NSDate date];
501501
url = [NSURL fileURLWithPathComponents:@[
502502
[_configuration scratchDirectory],
503-
[NSString stringWithFormat:@"recording_%@.mkv", [isoFormatter stringFromDate: now]]
503+
[NSString stringWithFormat:@"recording_%@.mkv", [isoFormatter stringFromDate:now]]
504504
]];
505505

506506
recording = [_rtspServer defaultRecordingWithOptions:recordingOptions
507-
path:url
508-
deadline:stopAtDate
509-
error:&error];
507+
path:url
508+
deadline:stopAtDate
509+
error:&error];
510510
if (!recording) {
511511
NSString *desc;
512512

513-
desc = [NSString stringWithFormat:@"Failed to create recording: %@", [error localizedDescription]];
514-
NSDictionary *response = @{
515-
@"error" : desc
516-
};
513+
desc = [NSString
514+
stringWithFormat:@"Failed to create recording: %@", [error localizedDescription]];
515+
NSDictionary *response = @{@"error" : desc};
517516
return [HKHTTPJSONResponse responseWithJSONObject:response status:500 error:NULL];
518517
}
519518

520-
if (![_rtspServer scheduleRecording: recording]) {
521-
NSDictionary *response = @{
522-
@"error" : @"Failed to schedule recording"
523-
};
519+
if (![_rtspServer scheduleRecording:recording]) {
520+
NSDictionary *response = @{@"error" : @"Failed to schedule recording"};
524521
return [HKHTTPJSONResponse responseWithJSONObject:response status:500 error:NULL];
525522
}
526523

527524
return [HKHTTPJSONResponse responseWithJSONObject:@{
528525
@"status" : @"ok",
529526
@"path" : [url path],
530-
@"startAt": [isoFormatter stringFromDate:now],
527+
@"startAt" : [isoFormatter stringFromDate:now],
531528
@"stopAt" : [isoFormatter stringFromDate:stopAtDate],
532-
@"numberOfSeconds": @([stopAtDate timeIntervalSinceDate:now])
533-
} status:200 error:NULL];
529+
@"numberOfSeconds" : @([stopAtDate timeIntervalSinceDate:now])
530+
}
531+
status:200
532+
error:NULL];
534533
};
535534
}
536535

@@ -574,9 +573,8 @@ - (void)setupHTTPHandlers {
574573
handler:[self _mountpointGraphHandlerV1]];
575574
// POST /api/v1/recording/create
576575
recordingCreateRoute = [HKRoute routeWithPath:@"/api/v1/recording/create"
577-
method:HKHTTPMethodPOST
578-
handler:[self _recordingCreateV1]];
579-
576+
method:HKHTTPMethodPOST
577+
handler:[self _recordingCreateV1]];
580578

581579
[router registerRoute:statusRoute withCORSHandler:CORSHandler];
582580
[router registerRoute:configRoute withCORSHandler:CORSHandler];

Daemons/vmpserverd/src/VMPUdevClient.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT
@@ -56,7 +56,8 @@
5656
5757
@return The initialized udev client for the given subsystems
5858
*/
59-
+ (instancetype)clientWithSubsystems:(NSArray<NSString *> *)subsystems Delegate:(id<VMPUdevClientDelegate>)delegate;
59+
+ (instancetype)clientWithSubsystems:(NSArray<NSString *> *)subsystems
60+
Delegate:(id<VMPUdevClientDelegate>)delegate;
6061

6162
/**
6263
@brief Creates and returns a new udev client object
@@ -66,7 +67,8 @@
6667
6768
@return A new udev client for the given subsystems
6869
*/
69-
- (instancetype)initWithSubsystems:(NSArray<NSString *> *)subsystems Delegate:(id<VMPUdevClientDelegate>)delegate;
70+
- (instancetype)initWithSubsystems:(NSArray<NSString *> *)subsystems
71+
Delegate:(id<VMPUdevClientDelegate>)delegate;
7072

7173
/**
7274
@brief Starts monitoring udev events

Daemons/vmpserverd/src/VMPUdevClient.m

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT
@@ -19,11 +19,13 @@ @interface VMPUdevClient ()
1919

2020
@implementation VMPUdevClient
2121

22-
+ (instancetype)clientWithSubsystems:(NSArray<NSString *> *)subsystems Delegate:(id<VMPUdevClientDelegate>)delegate {
22+
+ (instancetype)clientWithSubsystems:(NSArray<NSString *> *)subsystems
23+
Delegate:(id<VMPUdevClientDelegate>)delegate {
2324
return [[VMPUdevClient alloc] initWithSubsystems:subsystems Delegate:delegate];
2425
}
2526

26-
- (instancetype)initWithSubsystems:(NSArray<NSString *> *)subsystems Delegate:(id<VMPUdevClientDelegate>)delegate {
27+
- (instancetype)initWithSubsystems:(NSArray<NSString *> *)subsystems
28+
Delegate:(id<VMPUdevClientDelegate>)delegate {
2729
self = [super init];
2830
if (self) {
2931
_delegate = delegate;
@@ -46,7 +48,9 @@ - (BOOL)startMonitorWithError:(NSError **)error {
4648
if (!_udev) {
4749
VMPError(@"Failed to create udev context");
4850
if (error) {
49-
*error = [NSError errorWithDomain:VMPErrorDomain code:VMPErrorCodeUdevError userInfo:nil];
51+
*error = [NSError errorWithDomain:VMPErrorDomain
52+
code:VMPErrorCodeUdevError
53+
userInfo:nil];
5054
}
5155
return NO;
5256
}
@@ -56,16 +60,21 @@ - (BOOL)startMonitorWithError:(NSError **)error {
5660
if (!_monitor) {
5761
VMPError(@"Failed to create udev monitor");
5862
if (error) {
59-
*error = [NSError errorWithDomain:VMPErrorDomain code:VMPErrorCodeUdevMonitorError userInfo:nil];
63+
*error = [NSError errorWithDomain:VMPErrorDomain
64+
code:VMPErrorCodeUdevMonitorError
65+
userInfo:nil];
6066
}
6167
return NO;
6268
}
6369

6470
// Register subsystems to udev monitor filter
6571
for (NSString *subsystem in _subsystems) {
66-
if (udev_monitor_filter_add_match_subsystem_devtype(_monitor, [subsystem UTF8String], NULL) < 0) {
72+
if (udev_monitor_filter_add_match_subsystem_devtype(_monitor, [subsystem UTF8String], NULL)
73+
< 0) {
6774
if (error) {
68-
*error = [NSError errorWithDomain:VMPErrorDomain code:VMPErrorCodeUdevMonitorError userInfo:nil];
75+
*error = [NSError errorWithDomain:VMPErrorDomain
76+
code:VMPErrorCodeUdevMonitorError
77+
userInfo:nil];
6978
}
7079
return NO;
7180
}
@@ -75,7 +84,9 @@ - (BOOL)startMonitorWithError:(NSError **)error {
7584
if (udev_monitor_enable_receiving(_monitor) < 0) {
7685
VMPError(@"Failed to enable udev monitor");
7786
if (error) {
78-
*error = [NSError errorWithDomain:VMPErrorDomain code:VMPErrorCodeUdevMonitorError userInfo:nil];
87+
*error = [NSError errorWithDomain:VMPErrorDomain
88+
code:VMPErrorCodeUdevMonitorError
89+
userInfo:nil];
7990
}
8091
return NO;
8192
}

Daemons/vmpserverd/src/main.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigChannelModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigChannelModel.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigModel.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigMountpointModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPConfigMountpointModel.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPElementModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPElementModel.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPModelCommon.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPPadModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPPadModel.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

Daemons/vmpserverd/src/models/VMPProfileModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* vmp-server - A virtual multimedia processor
1+
/* vmpserverd - A virtual multimedia processor
22
* Copyright (C) 2023 Hugo Melder
33
*
44
* SPDX-License-Identifier: MIT

0 commit comments

Comments
 (0)