Commit graph

205 commits

Author SHA1 Message Date
Edward Hervey
9c4e195e79 jpegdec: When dropping frames on EOS, flush out data
Cleaner way of handling stray data
2012-05-18 11:05:17 +02:00
Edward Hervey
d243fb9178 jpegdec: Remove unused variable
Conflicts:

	ext/jpeg/gstjpegdec.c
2012-05-18 11:05:02 +02:00
Edward Hervey
d811797186 jpegdec: Only parse for SOI when we didn't see it before 2012-05-18 11:04:39 +02:00
Edward Hervey
c6c4906770 jpegdec: Remember if we saw SOI and handle stray data on EOS 2012-05-18 11:04:32 +02:00
Sebastian Dröge
62580b14f6 jpeg: Port to 0.11 again 2012-05-14 14:39:34 +02:00
Edward Hervey
8e9eb77816 jpeg: Port jpegdec/jpegenc to base video classes
Conflicts:

	ext/jpeg/gstjpegdec.c
	ext/jpeg/gstjpegdec.h
	ext/jpeg/gstjpegenc.c
	ext/jpeg/gstjpegenc.h

Reverted to 0.10 versions for now, next port again.
2012-05-14 13:01:48 +02:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Wim Taymans
ced47580b7 update for bufferpool changes 2012-03-15 22:11:17 +01:00
Wim Taymans
f3a770a20c update for allocation query changes 2012-03-15 20:37:56 +01:00
Wim Taymans
751fcf035b take padding into account 2012-03-14 19:56:56 +01:00
Wim Taymans
075cd54019 fix for caps _normalize changes 2012-03-12 12:23:15 +01:00
Wim Taymans
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +01:00
Wim Taymans
756948262c fix template caps refcount 2012-03-10 10:52:01 +01:00
Wim Taymans
9365f12d6e GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:43:30 +01:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Wim Taymans
5fd2b7abe3 GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2012-01-03 15:26:21 +01:00
Nicola Murino
7202d37c9d jpegdec: fix peer_caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=666688
2011-12-26 15:34:47 -03:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller
736a484129 More printf format warning fixes 2011-11-22 01:40:39 +00:00
Wim Taymans
105650127e add parent to pad functions 2011-11-17 15:02:55 +01:00
Wim Taymans
6190312214 add parent to query function 2011-11-16 17:27:13 +01:00
Wim Taymans
b2d508ac40 update for _get_caps() -> _query_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
75dc9634eb change getcaps to query
Chain up event function in payloaders.
2011-11-15 18:04:44 +01:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Wim Taymans
d40e915449 Merge branch 'master' into 0.11 2011-10-28 16:52:08 +02:00
Tim-Philipp Müller
ff40deb139 jpegdec: add sof-marker to template caps, so we don't get plugged for lossless jpeg
jpegdec (using libjpeg 6.2/8) can't decode some lossless types of JPEG.

https://bugzilla.gnome.org/show_bug.cgi?id=556648
2011-10-28 12:10:34 +01:00
Wim Taymans
16649b2508 fix compile 2011-10-13 09:02:47 +02:00
Wim Taymans
a5cc912140 Merge branch 'master' into 0.11
Conflicts:
	ext/jpeg/gstjpegdec.c
	gst/rtp/gstrtpvrawpay.c
2011-10-13 08:58:06 +02:00
Sjoerd Simons
95db648516 jpegdec: Implement upstream negotiation
Add upstream negotiation for jpegdec. Fixes #660275
2011-10-10 21:37:10 +01:00
Tim-Philipp Müller
e0d994c9e1 flac, jpeg: fix compiler warning 2011-09-28 17:39:06 +01:00
Wim Taymans
be4f60b062 jpeg: port to 0.11
Also disable smoke for now.
2011-08-17 15:39:27 +02:00
Wim Taymans
3fd1106b7e Merge branch 'master' into 0.11 2011-07-06 12:05:12 +02:00
Mark Nauwelaerts
0c25863253 jpegdec: avoid crashing on invalid input without components 2011-07-04 14:32:27 +02:00
Wim Taymans
992e3f7c55 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/rtp/gstrtpgstpay.c
2011-04-29 15:49:41 +02:00
Philip Jägenstedt
660987c6d7 jpegdec: documentation typo "jpegddec"
https://bugzilla.gnome.org/show_bug.cgi?id=648589
2011-04-25 21:36:28 +01:00
Wim Taymans
7555d0949f Merge branch 'master' into 0.11
Conflicts:
	android/apetag.mk
	android/avi.mk
	android/flv.mk
	android/icydemux.mk
	android/id3demux.mk
	android/qtdemux.mk
	android/rtp.mk
	android/rtpmanager.mk
	android/rtsp.mk
	android/soup.mk
	android/udp.mk
	android/wavenc.mk
	android/wavparse.mk
	configure.ac
2011-04-18 10:23:45 +02:00
Sebastian Dröge
b784173e4a jpegdec: Unref event if the parent element disappeared 2011-04-08 15:22:47 +02:00
Havard Graff
9386448649 jpegdec: Make upstream events MT-safe 2011-04-08 15:21:52 +02:00
Wim Taymans
c899229c48 jpegdec: add duration when extimating QoS time
When we need to decide on the next QoS time, take into account the duration of
the buffers.
2011-02-28 11:58:48 +01:00
Tim-Philipp Müller
addbc3c4ca jpegdec: add "max-errors" property to ignore decoding errors
Add property to ignore decoding errors. Default is to ignore a few
decoding errors if the input is packetized, but error out immediately
if the input is not packetized.

Ignoring errors for packetized input most likely doesn't work
properly yet, so don't do that for now.

https://bugzilla.gnome.org/show_bug.cgi?id=623063
2010-12-11 20:36:45 +00:00
Mark Nauwelaerts
9ee2e9ede5 jpegdec: add debug to notify when skipping to jpeg header 2010-12-06 19:14:52 +01:00
Mark Nauwelaerts
04fae48d1d jpegdec: discard incomplete image
... as determined when finding SOI next image before an EOI.

Based on patch by David Hoyt <david.hoyt@llnl.gov>

Fixes #635734.
2010-12-06 19:14:52 +01:00
Mark Nauwelaerts
c50695c14b jpegdec: avoid infinite loop when resyncing
Fixes #635734 (partly).
2010-12-06 19:14:41 +01:00
Stefan Kost
45f6707784 various (ext): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 17:39:36 +03:00
Tim-Philipp Müller
66a783fd01 jpegdec: don't post an error message if buffer alloc fails with NOT_LINKED flow
This is not fatal, let upstream handle it.
2010-09-12 14:54:20 +01:00
Wim Taymans
2b81f913a4 jpegdec: avoid invalid adapter flush on QoS
First store the available data in the adapter in the rem_img_len instance field
before trying to flush the adapter with that value on QoS.
2010-09-07 16:49:16 +02:00
Sebastian Dröge
b606ab06e5 jpegdec: Don't use GST_FLOW_IS_FATAL()
And don't post an error message if buffer allocation failed because
of UNEXPECTED, which only means that downstream wants us to EOS now.
2010-09-04 14:52:10 +02:00
Thiago Santos
95d1b932ab jpegdec: Prevent crash when reading image with problems
Check if we have data on the adapter and fail if not.

Fixes #627413
2010-08-19 18:30:05 -03:00
Thiago Santos
da1c816358 jpegdec: Fix regression on markers parsing
Fixes a regression introduced when fixing bug #583047 in
commit a391bf52cc

Skip the data when libjpeg asks it to be skipped on
one of its callbacks.
2010-07-19 15:21:04 -03:00
Mark Nauwelaerts
6f84bbe34e jpegdec: fix skipping extra 0xff markers
Fixes #623585.
2010-07-05 13:20:08 +02:00
Tim-Philipp Müller
7cbfe3eae1 jpegdec: fix memory leak
Don't leak result of gst_adapter_take(). There are most likely
smarter things we can do, but let's keep things simple for the
release.

Fixes #623172.
2010-07-02 15:10:24 +01:00
Mark Nauwelaerts
a391bf52cc jpegdec: use libjpeg scatter-gather operation to avoid data copying
Fixes #583047 (more).
2010-06-14 15:17:16 +02:00
Mark Nauwelaerts
58fbcf01e5 jpegdec: optimize buffer handling when parsing
Use an adapter to collect incoming data, and use adapter API to scan and peek.

Fixes #583047.
2010-06-14 15:17:16 +02:00
Mark Nauwelaerts
fb3a8cd47f jpegdec: fix variable init 2010-06-01 15:56:41 +02:00
Thiago Santos
bca4ca631f jpegdec: Adds 8bit grayscale support
Adds decoding support for jpeg images in 8 bit grayscale format.
2010-06-01 09:06:04 -03:00
Wim Taymans
3cfd7968b4 jpegdec: increase acceptable output sizes
We can perfectly decode 1x1 images so lower the min width and height to 1.

Fixes #618392
2010-05-13 12:16:59 +02:00
Mark Nauwelaerts
52c71352e0 jpegdec: optimise buffer scanning
Specifically, when needing more data, do not rescan from start next time
around, but resume from last position.

See also #583047.
2010-04-30 17:49:24 +02:00
Mark Nauwelaerts
761b883f2c jpegdec: disregard superfluous lines when indirect decoding 2010-04-30 17:49:15 +02:00
Mark Nauwelaerts
78a2b22ed5 jpegdec: add support for RGB and grayscale color space
Also refactor src caps negotiation and setting.
2010-04-30 17:49:11 +02:00
Mark Nauwelaerts
cec48383b1 jpegdec: more sanity checks on input
Specifically, verify input components / colour space is as code
subsequently expects, thereby avoiding crashes or otherwise bogus output.
Presently, that means 3 components YCbCr colour space, and somewhat
limited sampling factors.

Fixes #600553.
2010-04-30 17:49:03 +02:00
Tim-Philipp Müller
6b2a0c7c46 jpegdec: don't crash if jpeg image contains more than three components
Our code currently only handles a maximum of 3 components, so error
out for now if the image has more components than that.

Fixes #604106.
2010-04-25 23:15:42 +01:00
Stefan Kost
7e5d4b0fa9 jpegdec: move macro to c source
One less semi public symbol without namespace prefix in the headers.
2010-04-08 13:40:36 +03:00
Benjamin Otte
cccfeaa59c gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 14:32:00 +01:00
Benjamin Otte
1055aaa9cb Add -Wredundant-decls warning flag
Also fix compile issues
2010-03-17 19:35:10 +01:00
Benjamin Otte
3342b1679e Add -Wmissing-declarations -Wmissing-prototypes warning flags
And fix all the warnings.
2010-03-17 18:23:28 +01:00
David Hoyt
ad05705afb jpegdec: Fix invalid memory access by first checking and then reading
Fixes bug #610483.
2010-02-22 20:55:29 +01:00
Stefan Kost
a9f5bbe1ff jpeg: don't directly access message, some message have args
This caused bogus messages, such as reported in bug #607471.
2010-02-02 17:23:49 +02:00
Wim Taymans
384c4a2495 jpegdec: reset segment info after flush
Reset the segment info after a flush. We use the segment for handling QoS and if
we don't reset the segment, QoS is basically disabled after a flushing seek.
2009-12-01 19:25:04 +01:00
Tim-Philipp Müller
7af7d93b27 jpegdec: free temporary buffer when changing state to NULL
Free temporary allocations in the state change function and not
only when the object is finalised.
2009-11-09 15:20:00 +00:00
Tim-Philipp Müller
26e7fe27d7 jpegdec: only allocate as much temporary memory as needed for indirect decoding
When we can't decode directly into the output buffer, make our temp buffers
only as big as needed instead of allocating for the worst case scenario (well,
we still alloc more than strictly needed for some cases, but significantly
less than before).
2009-11-09 15:18:58 +00:00
Stefan Kost
e3e910e971 jpegdec: don't allocate big arrays on the stack
Add the arrays to the instance data and allocate on first use.
2009-11-03 17:49:24 +02:00
Tim-Philipp Müller
c83ea23a03 jpegdec: fix branch hints
Remove inappropriate branching hints and add some new ones.
2009-10-16 13:41:45 +01:00
Tim-Philipp Müller
4fb3f2519c jpegdec: fix regression in indirect decode path
Revert variable name back to what it was before the G_LIKELY was
added (in commit 69c24fb9). The code works better that way.
2009-10-16 13:36:42 +01:00
Tim-Philipp Müller
0c92e70f6c jpegdec: fix regression with certain formats
Fix regression introduced by previous commit (#598517).
2009-10-16 13:00:12 +01:00
Tim-Philipp Müller
30cb82da96 jpegdec: don't use decompress structure members we shouldn't be using 2009-10-16 13:00:12 +01:00
Tim-Philipp Müller
87bd79f4ba jpegdec: fix bogus warning about discont flag on first buffer
The very first buffer should always have the DISCONT flag set, no
need to warn about that. Only warn if we get a DISCONT buffer in
non-packetised mode and we already have some data.
2009-10-13 01:10:59 +01:00
Tim-Philipp Müller
6ae6af9dab jpegdec: fix crash for unusual vertical chroma subsampling factors
Fixes #597351.
2009-10-13 01:10:59 +01:00
Josep Torra
c581e6f205 jpegdec: fixes warning building in snow leopard 2009-10-10 00:37:08 +02:00
Stefan Kost
86b8935b07 jpegdec: comment/logging cleanups and more branch guides 2009-10-06 17:46:49 +03:00
Stefan Kost
b1feeee166 jpegdec: don't leak output buffers on decoding errors
The setjmp handles libjpeg error. Free the outputbffer if we don't need it.
2009-09-30 09:19:48 +03:00
Tim-Philipp Müller
477cb58640 jpegdec: fix 'unused variable' compiler warning when compiling with GST_DISABLE_GST_DEBUG 2009-09-29 00:01:59 +01:00
Stefan Kost
69c24fb991 jpeg: handle more libjpeg return values, add some more branch hints
Also remove unused size variable in _chain().
2009-09-28 17:25:35 +03:00
Alessandro Decina
195883b30a Fix compile warnings with gcc 4.0.1. 2009-09-22 15:04:36 +02:00
Stefan Kost
253f43203d jpegdec: add a G_UNLIKELY and put perf-cat log to code path that copies 2009-09-21 16:07:50 +03:00
Edward Hervey
65d90baf84 jpegdec: Avoid unnecessary processing until we have a full picture.
This is for non-packetized mode, when we know the upstream size in bytes.
2009-09-03 17:40:20 +02:00
Stefan Kost
a07a575209 jpeg: use longer macro names to not clash with some stupid windows defines
libjpeg headers pull some windows system inlcudes (on windows) that contain a
define for DEFAULT_QUALITY.
2009-07-30 17:57:53 +03:00
Mark Nauwelaerts
7a89fb0468 jpegdec: when scanning for 0xff marker ends, ensure desired result
Otherwise, any non 0xff byte at end of data would be mistaken for
a tag byte, and in case of a frame_len 0 tag subsequently lead to an
infinite loop.
2009-07-28 16:18:38 +02:00
Stefan Kost
11c93fc1df jpeg: code cleanups for encoder
Remove some disabled code in encoder. Try #if 0'ed code and add comments about
why it is disabled. Move idct-method enum to jpeg.c and use in both encoder and
decoder. Add idct-method property to encoder.
2009-07-21 10:04:36 +03:00
Philippe Normand
a0de8567ca jpegdec: bump max size to 65535x65535
Remove artificial jpeg image limits.
Fixes #583048.
2009-05-21 23:39:13 +02:00
Arnout Vandecappelle
99efbfcf4d jpegdec: refactored gst_jpeg_dec_parse_image_data
Fixes #579808
2009-05-06 13:22:51 +02:00
Arnout Vandecappelle
788986e269 jpegdec: support additional 0xff before end marker.
JPEG markers may be preceded by additional 0xff.  jpegdec should
skip over these, even before the end marker.
See #579808
2009-05-06 13:11:53 +02:00
Tim-Philipp Müller
8d8e9af0a8 jpegdec: fix warning for still images by not trying to divide by 0
Don't pass a 0 divisor to gst_util_uint64_scale(), or it will complain
in the single image case where fps=0/1 (are we supposed to differentiate
between no fps=still image and fps=0/1=variable rate here btw?)
2009-04-20 19:42:13 +01:00
Tim-Philipp Müller
e14bae6637 jpegdec: use slightly more adaptive formula for QoS
Should work at least a tad better if the decoder can't keep up, and
should also spread dropped frames a bit more evenly over time.
2009-04-09 11:34:19 +01:00
Tim-Philipp Müller
f1fb1f80fa jpegdec: demote some log message from DEBUG to LOG
And log decoder object.
2009-04-02 00:05:14 +01:00
Tim-Philipp Müller
00c4b0b17a jpegdec: implement basic QoS
Don't decode frames that are going to be too late anyway.
2009-04-01 21:15:02 +01:00
Tim-Philipp Müller
ab1bbcd58d jpegdec: put GstSegment inside the element struct instead of allocating it separately 2009-03-25 10:36:49 +00:00
Stefan Kost
eb89143219 Add examples for the jpeg elements. 2009-01-29 10:12:43 +02:00
Mark Nauwelaerts
173741c10c ext/jpeg/gstjpegdec.c: Align documentation with reality.
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c:
Align documentation with reality.
2008-07-14 16:28:25 +00:00
Edward Hervey
badcd298cc ext/jpeg/gstjpegdec.c: Actually drop the buffers which are outside the currently configured segment instead of just e...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
Actually drop the buffers which are outside the currently configured
segment instead of just emitting a WARNING.
2007-12-16 23:43:46 +00:00
Stefan Kost
73ec6b7a1d More docs. More logs in pngdec.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/inspect/plugin-jpeg.xml:
* docs/plugins/inspect/plugin-png.xml:
* ext/jpeg/gstjpegdec.c:
* ext/libpng/gstpngdec.c: (gst_pngdec_task),
(gst_pngdec_sink_setcaps):
More docs. More logs in pngdec.
2007-07-18 09:21:23 +00:00