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 503616 - Let metadataparse extract image dimensions
Let metadataparse extract image dimensions
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-14 15:29 UTC by Wouter Cloetens
Modified: 2009-07-29 14:26 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to extract JPEG size. (preliminary) (5.74 KB, patch)
2007-12-14 15:31 UTC, Wouter Cloetens
none Details | Review
Patch to extract JPEG size. (7.72 KB, patch)
2007-12-14 17:13 UTC, Wouter Cloetens
none Details | Review
Patch to extract JPEG size. (8.45 KB, patch)
2008-01-04 13:43 UTC, Wouter Cloetens
none Details | Review
Patch to extract JPEG size. (7.96 KB, patch)
2008-01-04 13:49 UTC, Wouter Cloetens
needs-work Details | Review

Description Wouter Cloetens 2007-12-14 15:29:54 UTC
bug 486659 comment 17:
Apart from emitting tags, it would also be useful to let an image metadata
parser change the caps. Specifically, width and height are always present.

A use case for this is multiplexing of motion JPEG. The source of the JPEG data
may not provide width and height properties in the caps, but multiplexers like
avimux and matroskamux demand these properties on their source pads:
souphttpsrc location="http://webcam/mjpeg" do-timestamp=true ! multipartdemux !
metadataparse ! matroskamux ! filesink location="webcam.mkv"
Comment 1 Wouter Cloetens 2007-12-14 15:31:33 UTC
Created attachment 100960 [details] [review]
Patch to extract JPEG size. (preliminary)

Extract dimensions from JPEG image and add them to source caps.
Comment 2 Wouter Cloetens 2007-12-14 15:33:19 UTC
One would probably want this done a bit cleaner and more generic, with PNG support, but this is a working prototype.
Comment 3 Wouter Cloetens 2007-12-14 17:13:01 UTC
Created attachment 100963 [details] [review]
Patch to extract JPEG size.

Extract dimensions from JPEG image and add them to source caps.


This is a bit cleaner and actually reconfigures the src caps, and only when they've changed.
Comment 4 Wouter Cloetens 2008-01-04 13:43:57 UTC
Created attachment 102114 [details] [review]
Patch to extract JPEG size.

Extract dimensions from JPEG image and add them to source pad caps.


I must have screwed something up when cleaning up the previous patch, as it doesn't actually compile.
The patch is now updated to the current CVS HEAD, after the parse->demux change.
Comment 5 Wouter Cloetens 2008-01-04 13:49:48 UTC
Created attachment 102115 [details] [review]
Patch to extract JPEG size.

Extract dimensions from JPEG image and add them to source pad caps.


Remove already fixed compiler warning fix.
Comment 6 Sebastian Dröge (slomo) 2008-05-06 10:12:49 UTC
Some comments on this:
- doesn't apply to latest CVS anymore, for example caps setting is done in metadatademux
- seems to be very JPEG-centric. Might need some refactoring to be easily applicable to other formats too without making META_DATA_IMG_HEIGHT implement different logic for each format.
Comment 7 Sebastian Dröge (slomo) 2009-07-29 13:42:19 UTC
Wouter, are you going to update the patch?
Comment 8 Wouter Cloetens 2009-07-29 14:16:24 UTC
(In reply to comment #7)
> Wouter, are you going to update the patch?

No.

Perhaps this problem has been adequately addressed by the new jpegparse element, see bug 583098?
Comment 9 Sebastian Dröge (slomo) 2009-07-29 14:26:02 UTC
No but it could and that would probably be a better place :) Good point