After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661348 - qtkitvideosrc: implement the property probe interface [PATCH]
qtkitvideosrc: implement the property probe interface [PATCH]
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Mac OS
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 678402
Blocks:
 
 
Reported: 2011-10-10 03:23 UTC by Andres Colubri
Modified: 2018-05-04 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
property probe patch, .m file (9.22 KB, patch)
2012-05-31 16:18 UTC, Andres Colubri
needs-work Details | Review
property probe patch, .h file (298 bytes, patch)
2012-05-31 16:19 UTC, Andres Colubri
needs-work Details | Review
property probe patch, .h file (298 bytes, patch)
2012-05-31 16:19 UTC, Andres Colubri
needs-work Details | Review
property probe patch, makefile (317 bytes, patch)
2012-05-31 16:21 UTC, Andres Colubri
needs-work Details | Review
static caps using ranges for width, height, fps (4.40 KB, application/zip)
2012-08-27 18:15 UTC, Andres Colubri
  Details
caps contain list of supported resolutions, queried by pre-rolling devices (6.09 KB, application/zip)
2012-08-27 18:16 UTC, Andres Colubri
  Details
Pad range fixated to native resolution (5.82 KB, application/zip)
2012-08-29 00:04 UTC, Andres Colubri
  Details

Description Andres Colubri 2011-10-10 03:23:46 UTC
Hello, I'm committing patches that add this functionality to the qtkitvideosrc plugin.
Comment 1 Tim-Philipp Müller 2012-05-24 15:28:35 UTC
The property probe interface has been removed in 0.11/1.0 (without a replacement so far), so closing this bug, since I don't see it being added to 0.10 any more at this point.
Comment 2 Andres Colubri 2012-05-26 15:00:01 UTC
So, this means that getting the list of supported resolutions for a video capture device has to be done somehow outside of gstreamer, right?
Comment 3 Tim-Philipp Müller 2012-05-26 15:30:22 UTC
Well, the GstPropertyProbe interface didn't provide this either, it just gave you a list of devices, and then you had to go and open them and query whatever you're interested in "manually". You can still do that. The only thing you need to get outside of GStreamer is the list of devices (for now, until the interface is replaced with something better).

I noticed that you said "I'm committing patches that add this functionality" when you filed this bug - do you have patches for this, but just forgot to attach them to the bug report? I'm happy to commit them if they exist.
Comment 4 Andres Colubri 2012-05-31 16:18:35 UTC
Created attachment 215342 [details] [review]
property probe patch, .m file
Comment 5 Andres Colubri 2012-05-31 16:19:14 UTC
Created attachment 215343 [details] [review]
property probe patch, .h file
Comment 6 Andres Colubri 2012-05-31 16:19:41 UTC
Created attachment 215344 [details] [review]
property probe patch, .h file
Comment 7 Andres Colubri 2012-05-31 16:21:46 UTC
Created attachment 215345 [details] [review]
property probe patch, makefile

the additional code needs the OBJCFLAGS variable in the makefile
Comment 8 Andres Colubri 2012-05-31 16:24:55 UTC
Hi, yes it seems that I forgot to add the attachement files the last time. Here they are now, although I'm not sure how useful they will be now given the removal of the property prove API.

BTW, I noticed this other bug https://bugzilla.gnome.org/show_bug.cgi?id=645567, where the author contributed a patch to add DV camera support to the plugin. It would be probably a good idea to merge it as well.
Comment 9 Andres Colubri 2012-08-27 18:13:13 UTC
I've been doing some additional work with qtkitvideosrc which resulted in two sets of patches, both against  the version included in gst-plugins-bad 0.10.23:

1) In the first set, the hard-coded resolutions in the src_template were replaced by ranges:

GST_STATIC_CAPS (
  "video/x-raw-yuv, "
  "format = (fourcc) " DEVICE_YUV_FOURCC ", "
  "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ], "
  "framerate = [0/1, 100/1]") 

which allows to create capture streams at arbitrary resolutions, this work because:

"QTKit will automatically adjust the camera resolution to best accommodate the requirements of all the outputs connected to a particular session. For example, if you set the compression options of a movie file output or the pixel buffer attributes of a decompressed video output, you can cause the camera resolution to be adjusted for optimal performance. In general, if you are interested in configuring the camera because you want your output video to be at a specific resolution, it makes more sense to configure your outputs directly and not worry about the camera settings, which is the functionality currently provided by QTKit."

(from http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/QTKitApplicationProgrammingGuide/UsingQTKit/UsingQTKit.html, in the "Configuring Cameras for Capture" section towards the end)

2) In this second set, I implemented a pre-roll check, based on the technique described by Philip Lamb:
(http://lists.apple.com/archives/quicktime-api/2011/Jan/msg00014.html) that queries each capture device for its native (maximum) resolution. QTKit doesn't include any functionality to properly get and/or set the device's capabilities programmatically:

http://lists.apple.com/archives/quicktime-api/2008/Feb/msg00074.html

So what I do in this patch is to populate the caps with a list of "supported" resolutions by taking the native values and dividing them repeatedly by 2 until they go below a certain threshold. This list is kind of arbitrary since QTKit will allow you to generate capture streams from any device at arbitrary resolutions. But I need this list for an application where we want the users to select resolutions from a predefined list. 

Both patches incorporate the modifications from https://bugzilla.gnome.org/show_bug.cgi?id=645567 to support Firewire/DV cameras, although I didn't have the chance to test them.
Comment 10 Andres Colubri 2012-08-27 18:15:32 UTC
Created attachment 222570 [details]
static caps using ranges for width, height, fps
Comment 11 Andres Colubri 2012-08-27 18:16:27 UTC
Created attachment 222571 [details]
caps contain list of supported resolutions, queried by pre-rolling devices
Comment 12 Andres Colubri 2012-08-29 00:04:27 UTC
Created attachment 222692 [details]
Pad range fixated to native resolution
Comment 13 Andres Colubri 2012-08-29 22:03:11 UTC
I added a new patch that properly does caps fixation using the native resolutions obtained from pre-rolling the capture devices. Same as before, generated against the code of the applemedia plugin included in gst-plugins-bad 0.10.23. It queries for devices of type QTMediaTypeVideo (regular webcams) and QTMediaTypeMuxed (DV cameras), although the latest is not tested.
Comment 14 Sebastian Dröge (slomo) 2013-08-23 11:22:50 UTC
Needs updating to 1.0 and the new interface discussed in bug #678402
Comment 15 Sebastian Dröge (slomo) 2018-05-04 09:47:38 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 16 Sebastian Dröge (slomo) 2018-05-04 09:48:08 UTC
The element was also removed in the meantime