Commit graph

210 commits

Author SHA1 Message Date
Wim Taymans
f70da0a542 jpeg: beginnings of porting to 0.11 2011-07-06 16:51:36 +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
Mark Nauwelaerts
d59a00aa1c Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
2011-07-04 11:48:13 +02:00
David Schleef
2f94df8032 jpegenc: Don't round up size of encoded buffers
For some reason, in code dating to 2001, encoded jpeg buffers were
rounded up to multiples of 4 bytes.  With the added bonus that the
extra bytes are unwritten, causing valgrind issues.  Oops.  I can't
think of any reason why JPEG buffers need to be multiples of 4 bytes,
so I removed the padding.  There might be some code somewhere that
depends on this behavior, so if this needs to be reverted, please fix
the valgrind issues.
2011-06-29 23:55:33 -07: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
Robert Swain
098cf89e34 jpegenc: pulsesink: raw1394: Address unused but set variables
GCC 4.6.x spits warnings about such usage of variables. The variables in
raw1394 were marked with G_GNUC_UNUSED as this seemed omre appropriate.
The others were removed.
2011-04-16 13:13:04 +01: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
Thiago Santos
dcbba0932d jpegenc: sink pad's getcaps shouldn't use the src pad getcaps
Instead of using get_allowed_caps on the srcpad, the sinkpad getcaps
should use the getcaps of the srcpad's peer. This way the srcpad
can keep using fixed_caps and sinkpad getcaps exposes all caps
that can be negotiated

https://bugzilla.gnome.org/show_bug.cgi?id=637686
2010-12-21 15:23:11 -03: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
Tim-Philipp Müller
100673bf14 jpegenc: free/malloc instead of realloc, avoids memcpy 2010-12-11 17:03: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
Sebastian Dröge
0df55f42e6 jpeg: Explicitely link with libgstbase 2010-06-27 06:39:14 +02: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
Thiago Santos
d7a25fd109 jpegenc: Accept grayscale as input
Adds video/x-raw-grayscale (8 bit) support to jpegenc
2010-06-01 09:05:29 -03:00
Thiago Santos
e0c49a7590 jpegenc: Keep variables in sane state after _reset
When reseting, keep 'row' variables at a sane state after
freeing to avoid it being freed again on _resync realloc
when the element is reused.

Fixes #619943
2010-05-28 10:43:36 -03:00
Tim-Philipp Müller
035aead2d7 jpegenc: fix two leaks
Don't leak othercaps or jpegenc ref.
2010-05-14 17:30:40 +01: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
Stefan Kost
566bd22435 jpegenc: also lift the arbitrary restrictions for width and height
This was already done for jpegdec.
2010-05-06 15:43:53 +03: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
b0ac4a4560 jpegenc: support more colour spaces and some cleanups 2010-04-30 17:49:09 +02:00
Mark Nauwelaerts
c5614dbb40 jpegenc: more generic sink getcaps 2010-04-30 17:49:05 +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
Thiago Santos
b1984b72bb jpegenc: Fix getcaps function
When creating the caps allowed to upstream using downstream
restrictions, use gst_pad_get_allowed_caps as that has the
usable formats and puts into it the width, height and framerate
fields. This avoids getting errors about getcaps returning
non subset caps of its pad template.

This error showed up on the metadata plugin unit test in -bad.
2010-04-05 16:09:58 -03:00
André Dieb Martins
74ac172bc2 jpegenc: should not return caps ANY based on downstream
When downstream has a sink pad with ANY caps, jpegenc should
treat it the same as NULL and return its template caps.

Fixes #614842
2010-04-04 21:30:06 -03:00
Raimo Järvi
10f092dc61 jpegenc: Set correct getcaps/setcaps functions on srcpads and simplify them
This fixes downstream negotiation, upstream negotiation isn't really
supported by jpegenc yet.

Fixes bug #613789.
2010-03-26 13:34:17 +01: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
c76e72a7f5 Add -Wundef to configure flags
and fix the resulting warnings
2010-03-17 21:33:28 +01:00
Benjamin Otte
1055aaa9cb Add -Wredundant-decls warning flag
Also fix compile issues
2010-03-17 19:35:10 +01:00