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 587021 - Support for MxPEG codec
Support for MxPEG codec
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 583098
Blocks:
 
 
Reported: 2009-06-26 08:07 UTC by Arnout Vandecappelle
Modified: 2013-08-26 07:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implementation and test of mxpegdec element (47.70 KB, patch)
2009-06-26 08:34 UTC, Arnout Vandecappelle
none Details | Review
Parse MXF header and set timestamps based on it. (5.71 KB, patch)
2009-06-26 08:40 UTC, Arnout Vandecappelle
none Details | Review
Revised implementation and test of mxpegdec element (47.81 KB, patch)
2009-06-26 15:46 UTC, Arnout Vandecappelle
none Details | Review
Parse MXF header and set timestamps based on it. (4.89 KB, patch)
2009-06-26 15:47 UTC, Arnout Vandecappelle
none Details | Review
mxpegdec: unref the incoming buffer (567 bytes, patch)
2009-07-03 09:06 UTC, Arnout Vandecappelle
none Details | Review
Revised implementation and test of mxpegdec element: refresh against last good releases (47.23 KB, patch)
2011-01-06 12:38 UTC, Marc Leeman
needs-work Details | Review
Parse MXF header and set timestamps based on it: refresh against last good releases (4.67 KB, patch)
2011-01-06 12:39 UTC, Marc Leeman
needs-work Details | Review
mxpegdec: unref the incoming buffer: refresh against last good releases (664 bytes, patch)
2011-01-06 12:39 UTC, Marc Leeman
needs-work Details | Review

Description Arnout Vandecappelle 2009-06-26 08:07:54 UTC
I've implemented support for the proprietary, open MxPEG codec from Mobotix: http://developer.mobotix.com/

Patch follows.
Comment 1 Arnout Vandecappelle 2009-06-26 08:34:27 UTC
Created attachment 137406 [details] [review]
Implementation and test of mxpegdec element

This element is based on jpegdec.  It also supports decoding of JPEG. The parsing functionality is stripped from it, since it is in jpegparse. The test only checks for decoding JPEG, since there is no MxPEG encoder element.

The element is registered with rank SECONDARY, to avoid conflict with jpegdec.  However, it could replace jpegdec completely (assuming jpegparse is there...).
Comment 2 Arnout Vandecappelle 2009-06-26 08:36:16 UTC
Since this element doesn't do parsing internally anymore, I guess it depends on jpegparse.
Comment 3 Arnout Vandecappelle 2009-06-26 08:40:17 UTC
Created attachment 137407 [details] [review]
Parse MXF header and set timestamps based on it.

The Mobotix headers also contain a timestamp, which is of course way better than the timestamps provided by the source element.

I put it as a separate patch because I'm not 100% sure about how I subtract the offset from the timestamp (it is actually the absolute time that the image was taken, in microseconds since the Epoch).
Comment 4 Arnout Vandecappelle 2009-06-26 08:42:51 UTC
By the way, you can test it with e.g. 85.15.152.10:

gst-launch souphttpsrc location=http://85.15.152.10/control/faststream.jpg'?stream=MxPEG&fps=4'  ! multipartdemux ! mxpegdec ! xvimagesink
Comment 5 Arnout Vandecappelle 2009-06-26 15:46:38 UTC
Created attachment 137428 [details] [review]
Revised implementation and test of mxpegdec element

Found a bug in QoS handling (dropping buffer caused jpeg decoder to remain in wrong state).  Here's a revised patch.
Comment 6 Arnout Vandecappelle 2009-06-26 15:47:09 UTC
Created attachment 137429 [details] [review]
Parse MXF header and set timestamps based on it.
Comment 7 Arnout Vandecappelle 2009-07-03 09:06:42 UTC
Created attachment 137773 [details] [review]
mxpegdec: unref the incoming buffer

Oops, I forgot to unref the incoming buffer.  There's also an unitialized memory warning that can be avoided.
Comment 8 Arnout Vandecappelle 2010-01-29 10:53:53 UTC
I put this plugin in -good because it uses libjpeg and therefore goes together with jpegenc/jpegdec.  If it is to be applied to -bad, the autotools should also be updated to include libjpeg.

If there is some interest, I'm willing to recreate a patch against the current head, but since I've seen completely no activity on this bug...
Comment 9 Marc Leeman 2010-12-23 16:54:22 UTC
tn Arnout.

I'll have a look at activating this one in early 2011.
Comment 10 Marc Leeman 2011-01-06 12:38:38 UTC
Created attachment 177646 [details] [review]
Revised implementation and test of mxpegdec element: refresh against last good releases
Comment 11 Marc Leeman 2011-01-06 12:39:11 UTC
Created attachment 177647 [details] [review]
Parse MXF header and set timestamps based on it: refresh against last good releases
Comment 12 Marc Leeman 2011-01-06 12:39:40 UTC
Created attachment 177648 [details] [review]
mxpegdec: unref the incoming buffer: refresh against last good releases
Comment 13 Marc Leeman 2011-01-06 16:46:43 UTC
Any reason that the decoder accepts image/jpeg on the sink pad next to video/x-mxpeg?

If it would only to accept video/x-mxpeg; it would not get into conflict with image/jpeg and decodebin would word as usual.

Adding a capssetter to set the falsely detected image/jpeg in uridecodebin to set it to video/x-mxpeg allows the rest of the chain to work as usual; while jpegde chokes on the mobotix stream in any case.
Comment 14 Marc Leeman 2011-01-06 16:53:55 UTC
I am using this to force the correct autoplugging:

$ gst-launch souphttpsrc location=http://10.3.0.42/control/faststream.jpg?stream=MxPEG\&fps=25 ! multipartdemux ! capssetter caps="video/x-mxpeg" replace=1 join=0 ! decodebin2 ! autovideosink
Comment 15 Arnout Vandecappelle 2011-01-07 10:06:40 UTC
(In reply to comment #13)
> Any reason that the decoder accepts image/jpeg on the sink pad next to
> video/x-mxpeg?

Since it's been more than two years ago, I can't be sure anymore.  I _think_ it was because the typefinder doesn't/didn't distinguish between jpeg and mxpeg, and this decoder can anyway decode jpeg as well.

The good solution is of course to support mxpeg in typefind.  I also wrote a typefind extension for mxpeg back then, but I don't remember if I contributed it in the end...
Comment 16 Sebastian Dröge (slomo) 2011-05-20 07:40:53 UTC
I think this should be integrated into jpegdec if MxPEG is only an extension on top of JPEG, which seems to be the case because the MxPEG decoder supports normal JPEG too. This would likely reduce some of the code duplication.

Could you provide a patch for that? And for a typefinder for MxPEG?
Comment 17 Arnout Vandecappelle 2011-05-20 07:50:31 UTC
Integrating it with jpegdec was indeed the purpose.  I made it a separate element to avoid breaking the existing jpeg functionality.  It would also solve the autoplugging problem.

Unfortunately I won't have the time to integrate it back into jpegdec anytime soon.  I'll put it on my todo list.
Comment 18 Sebastian Dröge (slomo) 2013-08-23 10:38:14 UTC
Is someone planning to work on this? Should we keep this bug open?
Comment 19 Arnout Vandecappelle 2013-08-23 14:26:19 UTC
I think the number of users of mxpeg is likely very small. All current Mobotix cameras support H.264 so why would anyone want to decode the MxPEG stream? So dropping it is OK for me.