I'd like to have the output of AVAssetWriter dump to a named pipe so that I can do further downstream processing of it using third-party tools. Everything looks like it should work but it doesn't.
First, I generate an NSURL and set the file resource type as a named pipe
let url = NSURL(fileURLWithPath: path)
do {
try url.setResourceValue(NSURLFileResourceTypeNamedPipe, forKey:NSURLFileResourceTypeKey)
} catch {
print("failed to create the named pipe")
return
}
Next, I create an instance of AVAssetWriter using this url and start it up. However, AVAssetWriter seems to ignore the resource designation and just creates a regular file. I can see this when I dump the status of the url object.
print(try! url.resourceValuesForKeys([NSURLFileResourceTypeKey]))
["NSURLFileResourceTypeKey": NSURLFileResourceTypeRegular]
Is there any way to make this work? Alternative suggestions?