• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Intercepting console in an app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercepting console in an app


  • Subject: Re: Intercepting console in an app
  • From: Greg Guerin <email@hidden>
  • Date: Wed, 8 Jul 2009 08:55:27 -0700

Angelo Chen wrote:

I use NSTask to run a command line program(ffmpeg in this case), NSPipe can't get the output from the program, but I can see those messages from the Console during runtime, is there a way to grab the Console output from a running cocoa app? Thanks,


Run the ffmpeg command in Terminal, and redirect stdout to a file. If the output appears in the file, then a pipe should be able to capture the output in NSTask. If not, then ffmpeg is explicitly opening and writing to the console device (probably /dev/console). You'd need source to fix that.

Also remember to run ffmpeg twice, once with redirected stdout, and again with redirected stderr.

  -- GG
_______________________________________________

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


  • Prev by Date: Re: iPhone camera control like RedLaser
  • Next by Date: Re: TableView displaying a zillion empty rows
  • Previous by thread: Re: Intercepting console in an app
  • Next by thread: Matrix of NSImageCells, selection and dragging
  • Index(es):
    • Date
    • Thread