Re: NSTask argument list
Re: NSTask argument list
- Subject: Re: NSTask argument list
- From: Sandor Szatmari <email@hidden>
- Date: Sun, 26 Jun 2016 02:58:27 -0400
Graham,
> On Jun 26, 2016, at 01:29, Graham Cox <email@hidden> wrote:
>
>
>> On 26 Jun 2016, at 3:22 PM, email@hidden wrote:
>>
>> If it helps, you can think of it as an object oriented wrapped around C system calls that keeps track of PID and all the other bits like stdout and so on.
>> That helps to grok why the args is and array and the tool is separate.
>
>
> Yep, it makes perfect sense, and is a good fit for my needs.
>
> A follow up question, but this may be something that I’ll just have to grok from the ffmpeg documentation - is there a way to get feedback from the ffmpeg tool while it’s running, via NSTask? It writes a log to stderr, and there are settings to control how verbose that is, but it would be necessary to parse the text output to look for specific things. I need to know whether the input stream has finished, or how big the output file has become. The latter I may be able to do by looking at the file itself, not sure about the first bit.
You can either asynchronously monitor the task's output with notifications, or I have read about a new API, but never used it, -setReadabilityHandler:^(NSFileHandle* file)
Sandor
>
> —Graham
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden