GNOME Bugzilla – Bug 153684
[osxvideosrc] Mac users needs an osxvideosrc
Last modified: 2012-05-09 23:46:10 UTC
A src/sink set of plugins for macintosh video would enable all kinds of gnomeish software to be ported much more easily. Perhaps quicktime is the answer for the sink, as I'm pretty sure it is for the src. This could also potentially allow for a src compatible video implementation for windows as windows has quicktime as well.
There is already an osxvideosink, however no osxvideosrc has been done yet. Feel free to help in that :)
Confirming. Would be nice to have this but someone needs to hack it.
There's one here: http://projects.collabora.co.uk/~oleavr/osxvideosrc/ see http://article.gmane.org/gmane.comp.video.gstreamer.devel/17745
I reworked a bit oleavr's videosrc, fixed the 100% cpu usage, reverted to using SequenceGrabber, for now the size, colorspace and framerate are still hardcoded, and the device selection is not implemented yet. Please find attached a patch to apply to the current osxvideo plugin, that adds the osxvideosrc.
Created attachment 89623 [details] [review] osxvideosrc.patch
Would it be possible to get it included in -bad before the Freeze ?
Created attachment 90324 [details] [review] Updated patch
Created attachment 125877 [details] [review] complete plugin here's a patch that must be applied after Ali's, to finish out the plugin. it is cleaned up, uses the sequence grabber properly, and supports dynamic resolution, device selection, and property probing. the framerate is hard-coded to 30fps. we should probably do something about this eventually, but i don't consider it a blocker.
I tried code from Ali with Justin's patch, and it works for me on 10.4.
Why isn't this in -bad?
Mostly because noone's done it? :) Seems like it should go in -bad and then get a bit more love (to make the framerate negotiable)
The patch is against osxvideo, which is in -good. Maybe it would make sense to split the src/sink into separate plugins, so that sink can stay in -good and src can go in -bad (though, it's arguable if the sink should even be in -good...).
it works on Mac OS X 10.5.6 however OS X marks gst-launch as unresponsive for some reason. gst-launch osxvideosrc ! queue ! osxvideosink
Miano, could you attach a compressed debug log ? $ GST_DEBUG=3,*ERR*:5,osx*:5 gst-launch osxvideosrc ! queue ! osxvideosink > log 2>&1 $ bzip2 log
gst-launch being unresponsive is a problem with osxvideosink, which I didn't touch. You can confirm the same spinning-beachball behavior with videotestsrc ! queue ! osxvideosink. Talk to Michael Smith about any osxvideosink issues, as he is maintaining it lately.
I reproduced the spinning-beachball behaviour with videotestsrc ! queue ! osxvideosink as well so the problem may not be in osxvideosrc. However I tried osxvideosrc ! ffmpegcolorspace ! ximagesink, got an data flow error. Log attached.
Created attachment 130690 [details] osxvideosrc not working with ximagesink
Created attachment 132035 [details] [review] Ali's osxvideosrc patch corrected for gst-plugins-good-0.10.14
Created attachment 132037 [details] [review] Justin's patches for osxvideosrc corrected to work with gst-plugins-good-0.10.14
I just uploaded updated versions of Ali and Justin's patches for osxvideo, so they can be applied on the latest gst-plugins-good module (0.10.14 at the time of this writing). However, after recompiling and installing (using macports) gst-plugins-good, osxvideosrc is not listed by gst-inspect. What other files should be modified in the gst-plugins-good-0.10.14 source package in order to have osxvideosrc enabled?
And I also created a standalone source package of osxvideosrc, including Ali and Justin's patches. Attached below.
Created attachment 132038 [details] Updated stand-alone gstosxvideosrc source package
I went ahead and committed ali + justin's patch to bad. It compiles on 10.5, but I haven't tested it -- please open a new bug if things are not working for you.