Skip to content

Commit

Permalink
vmpserverd: Add RecordingManager stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Mar 10, 2024
1 parent e0d8430 commit 9158899
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions Daemons/vmpserverd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ source = [
'src/VMPProfileManager.m',
'src/VMPUdevClient.m',
'src/VMPPipelineManager.m',
'src/VMPRecordingManager.m',
'src/VMPErrors.m',
'src/VMPJournal.m',
'src/NSString+substituteVariables.m',
Expand Down
48 changes: 48 additions & 0 deletions Daemons/vmpserverd/src/VMPRecordingManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* vmpserverd - A virtual multimedia processor
* Copyright (C) 2024 Hugo Melder
*
* SPDX-License-Identifier: MIT
*/

#import "VMPPipelineManager.h"

/// The encoding bitrate
extern NSString *const kVMPRecordingBitrate;

/**
* @brief Recording Manager
*
* A subclass of th pipeline manager that
* has extensions for recording to a
* file.
*/
@interface VMPRecordingManager : VMPPipelineManager


/**
* Absolute destination path of recording.
*/
@property (nonatomic, readonly) NSURL *path;

/**
* Additional recording and encoding options.
*/
@property (nonatomic, readonly) NSDictionary *options;

+ (instancetype)recorderWithChannel: (NSString *)channel
path: (NSURL *)path
recordUntil: (NSDate *) date
options: (NSDictionary *)options
delegate: (id<VMPPipelineManagerDelegate>)delegate;

- (instancetype)initWithChannel: (NSString *)channel
path: (NSURL *)path
recordUntil: (NSDate *) date
options: (NSDictionary *)options
delegate: (id<VMPPipelineManagerDelegate>)delegate NS_DESIGNATED_INITIALIZER;

- (BOOL) changeDeadline: (NSDate *)date;

- (NSDate *) deadline;

@end
42 changes: 42 additions & 0 deletions Daemons/vmpserverd/src/VMPRecordingManager.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* vmpserverd - A virtual multimedia processor
* Copyright (C) 2024 Hugo Melder
*
* SPDX-License-Identifier: MIT
*/

#import "VMPRecordingManager.h"

NSString *const kVMPRecordingBitrate = @"recordingBitrate";

@implementation VMPRecordingManager
{
NSDate *_deadline;
}

+ (instancetype)recorderWithChannel: (NSString *)channel
path: (NSURL *)path
recordUntil: (NSDate *) date
options: (NSDictionary *)options
delegate: (id<VMPPipelineManagerDelegate>)delegate {
return nil;
}

- (instancetype)initWithChannel: (NSString *)channel
path: (NSURL *)path
recordUntil: (NSDate *) date
options: (NSDictionary *)options
delegate: (id<VMPPipelineManagerDelegate>)delegate {
self = [super initWithLaunchArgs: @"" channel: channel delegate: delegate];
return self;

}

- (BOOL) changeDeadline: (NSDate *)date {
return NO;
}

- (NSDate *) deadline {
return nil;
}

@end

0 comments on commit 9158899

Please sign in to comment.