Commit graph

410 commits

Author SHA1 Message Date
Tim-Philipp Müller
bccb3feebf typefinding: improve wavpack typefinder
Check for second block sync and return different
probabilities depending on what we found (trumping
the AAC loas typefinder's LIKELY probability after
finding a second frame sync in this particular case).

https://bugzilla.gnome.org/show_bug.cgi?id=687674
2012-11-11 20:08:17 +00:00
Tim-Philipp Müller
20c9d2d2cc typefinding: fix block size calculation in wavpack typefinder
The blocksize includes part of the header, just not the sync
marker and the four size bytes.
2012-11-11 19:44:31 +00:00
Thiago Santos
a4cfe8c43c typefind: isml is iso-fragmented video/quicktime
Add isml typefinding to the video/quicktime function
2012-11-07 01:40:18 -03:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Sebastian Dröge
3c1041d5eb Revert "gst: Add better support for static plugins"
This reverts commit d2d79e3bc2,
which was accidentially pushed.
2012-10-24 13:26:26 +02:00
Sebastian Dröge
d2d79e3bc2 gst: Add better support for static plugins 2012-10-24 12:10:44 +02:00
Vincent Penquerc'h
0bd8070ebd typefind: probe for DVD ISO files, to avoid matching H.264
https://bugzilla.gnome.org/show_bug.cgi?id=674069
2012-06-11 11:11:01 +01:00
Tim-Philipp Müller
0e216d1f4c typefinding, ogg: don't bother with annodex media types
They're hardly used, and probably more confusing than anything
else, and it's not clear that anyone would really need to be
able to tell them apart at the media type level.
2012-05-13 18:49:31 +01:00
Tim-Philipp Müller
0bd4e5d1e1 typefinding: more fine-grained matroska/webm typefinding
Typefind to audio/x-matroska, video/x-matroska, audio/webm,
video/webm and video/x-matroska-3d.

http://www.webmproject.org/code/specs/container/#naming
http://matroska.org/technical/specs/notes.html
2012-04-28 15:51:03 +01:00
Tim-Philipp Müller
497d87061d typefinding: more fine-grained ogg typefinding
Typefind to audio/ogg, video/ogg, etc. Also change
application/x-annodex to application/annodex.

See http://wiki.xiph.org/MIME_Types_and_File_Extensions
2012-04-15 22:38:10 +01:00
Sebastian Dröge
ad42b16375 gst: Update for GST_PLUGIN_DEFINE() API change 2012-04-05 15:11:05 +02:00
Sebastian Dröge
65307dd132 gst: Update versioning 2012-04-04 14:55:15 +02:00
Edward Hervey
05a778b1c4 typefind: Use unchecked byte reader methods where possible
The size is checked before, so we can use them.
2012-03-30 12:04:15 +02:00
Wim Taymans
c3478b2da0 Merge branch 'master' into 0.11
Conflicts:
	ext/vorbis/gstvorbisparse.c
	gst-libs/gst/video/video.c
	gst/videoscale/gstvideoscale.c
	sys/v4l/gstv4lxoverlay.c
	sys/v4l/v4l_calls.c
	sys/v4l/v4lsrc_calls.c
	tests/check/libs/video.c
2012-02-10 15:41:06 +01:00
Tim-Philipp Müller
e832929080 typefindfunctions: make h264 typefinder more picky when returning "likely" probability
Only return LIKELY probability if we've seen an SPS, PPS and an
IDR slice nal, i.e. try harder to avoid false positives such
as with certain VC-1 files.

https://bugzilla.gnome.org/show_bug.cgi?id=668565
2012-02-10 10:28:40 +00:00
Tim-Philipp Müller
dc08c01935 typefindfunctions: minor cosmetic change
Don't write < 1 when we mean == 0.
2012-02-08 19:34:57 +00:00
Tim-Philipp Müller
c61f794fc2 typefindfunctions, subparse: fix for gst_type_find_register() API change 2012-02-02 01:35:21 +00:00
Tim-Philipp Müller
b950b930ae Merge remote-tracking branch 'origin/master' into 0.11 2011-12-09 12:08:37 +00:00
Tim-Philipp Müller
debe9caa36 typefindfunctions: only typefind text with a BOM as text/utf16 or text/utf32
We added the utf typefinder because the mp3 typefinder was a tad
overzealous when it came to typefinding things as mp3, and replaced
it with even more overzealous utf16/32 typefinders.

Fixes unit test.
2011-12-09 01:33:58 +00:00
Tim-Philipp Müller
177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik
14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Tim-Philipp Müller
0d87fd7146 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/fft/gstffts16.h
2011-11-28 21:25:11 +00:00
Philippe Normand
ed5279e3c5 typefindfunctions: Fix compiler warning 2011-11-28 20:10:49 +01:00
Alexey Fisher
36434c20eb typefind: fix build error
fix build errors:
gsttypefindfunctions.c:248:25: error: 'low' may be used uninitialized in this function [-Werror=uninitialized]
gsttypefindfunctions.c:239:24: error: 'high' may be used uninitialized in this function [-Werror=uninitialized]

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
2011-11-28 18:10:55 +00:00
Vincent Penquerc'h
e67aa28de9 typefind: typefind UTF-16 and UTF-32
This avoids the MP3 typefinder from getting the highest score
every time it thinks there's something it might possibly be
able to parse.

https://bugzilla.gnome.org/show_bug.cgi?id=607619
2011-11-28 15:58:29 +00:00
Wim Taymans
4f9dea137f Merge branch 'master' into 0.11 2011-10-28 11:34:37 +02:00
Philip Jägenstedt
88491ff2e7 typefind: extract SOF marker in jpeg typefinder
The SOF types are defined by http://www.w3.org/Graphics/JPEG/itu-t81.pdf

This is needed to make sure that we plug a jpeg decoder that
can handle the type of JPEG we have (e.g. lossless JPEG)

https://bugzilla.gnome.org/show_bug.cgi?id=556648
2011-10-28 09:45:02 +01:00
Wim Taymans
06311362e9 fix compilation 2011-10-27 17:26:58 +02:00
Tim-Philipp Müller
09e06add66 typefindfunctions: backport some const-ifications from 0.11 branch
To keep code identical as much as possible between the two branches,
for easier merging.
2011-09-25 15:33:35 +01:00
Tim-Philipp Müller
bfb33e09a9 typefindfunctions: fix indentation 2011-09-25 15:33:35 +01:00
Vincent Penquerc'h
4095551b31 typefind: recognize Asylum modules
Note that there is already a AMF detection for a different
magic, I'm not sure if that's a different format with the
same initials or not. AMF is used for a few different formats
(including video), so...

This fixes playbin2 playing Asylum modules.

https://bugzilla.gnome.org/show_bug.cgi?id=658514
2011-09-09 13:54:45 +02:00
Vincent Penquerc'h
fa3e246866 typefind: bump probability if all frames we found are similar
Similar meaning same layer, same bitrate, and same number of channels

This fixes misdetection of (some MP3 files that have zero padding
between the ID3 tag and the MP3 stream) as H.264 video.

https://bugzilla.gnome.org/show_bug.cgi?id=656018
2011-08-10 11:20:31 +02:00
Piotr Fusik
b27d2469bd typefind: fixed detection of audio/x-sap
Fixes: #654295.

Signed-off-by: David Schleef <ds@schleef.org>
2011-07-09 16:19:48 -07:00
Philip Jägenstedt
f3e65f1c93 typefind: NULL check in degas_type_find
The length check isn't sufficient, an source might
report the correct length, but then still fail to
read the requested number of bytes for some reason.

https://bugzilla.gnome.org/show_bug.cgi?id=652642
2011-06-26 23:31:33 +01:00
Tim-Philipp Müller
d10a7b439b typefinding: add typefinder for WAP WBMP bitmaps
https://bugzilla.gnome.org/show_bug.cgi?id=651294
2011-06-02 14:36:06 +01:00
Tim-Philipp Müller
dd62fdc585 typefindfunctions: fix unused-but-set-variable warning with gcc 4.6
We don't compare the bitrates of consecutive mp3 frames on purpose
here.

https://bugzilla.gnome.org/show_bug.cgi?id=647294
2011-04-13 22:59:03 +01:00
Alessandro Decina
030f639a8e android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the
needed Android.mk files.
Androgenizer can be found here:
http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:23:21 +02:00
Tim-Philipp Müller
143dc4810d typefindfunctions: rename type playlist/m3u8 to application/x-hls
We should keep playlist/m3u8 available for normal m3u8 playlists,
which we we'll likely support some day. Also, we probably don't
want this handled like other playlists, so application/* seems
more appropriate in this case, even if it's really just a playlist.
2011-03-30 15:44:45 +01:00
Sebastian Dröge
34548c16d8 typefind: Fix comment typo and add a link the the HTTP live streaming spec 2011-03-30 09:18:00 +02:00
Sebastian Dröge
70148cdf97 typefind: Use the DataScanCtx for the m3u8 typefinder 2011-03-30 09:12:25 +02:00
Andoni Morales Alastruey
7eb1ded8c1 typefind: add m3u8 playlists 2011-03-30 09:00:54 +02:00
Tim-Philipp Müller
a558af4bbf typefinding: add depth and endianness to DTS caps
https://bugzilla.gnome.org/show_bug.cgi?id=644208
2011-03-14 18:35:27 +00:00
Tim-Philipp Müller
09f15da2f8 typefindfunctions: fix compiler warning on 32-bit systems
Mark 64-bit interger constant as such to avoid warnings such as:
gsttypefindfunctions.c:2152: error: integer constant is too large for ‘long’ type
2011-03-02 15:38:01 +00:00
Parthasarathi Susarla
0ebc34adf9 typefinding: detect raw h.263
https://bugzilla.gnome.org/show_bug.cgi?id=623846
2011-02-22 11:47:53 +00:00
David Schleef
7902e13df5 typefind: Fix mpeg TS detection 2011-02-17 18:29:57 -08:00
Philippe Normand
749f541cc4 typefinding: register H264 typefinder with H264 caps
https://bugzilla.gnome.org/show_bug.cgi?id=640709
2011-01-27 12:21:19 +00:00
Tim-Philipp Müller
11a1acfe88 typefinding: use image/x-icon as media type for ICON files
That's what we've been using so far (e.g. gdkpixbufdec).
2011-01-26 09:06:10 +00:00
Vincent Penquerc'h
2acdbdabaa typefind: add typefinder for DEGAS images
This fixes at least one DEGAS image from being misdetected as DTS audio.

https://bugzilla.gnome.org/show_bug.cgi?id=625129
2011-01-25 13:39:25 +00:00
Vincent Penquerc'h
7caf9e5e81 typefind: add detection for windows icon files to get them out of the way
Some of them can otherwise be misdetected for MPEG audio.

https://bugzilla.gnome.org/show_bug.cgi?id=620364
2011-01-24 19:54:52 +01:00
Tim-Philipp Müller
adb84c6dae typefinding: set framed=false on DTS caps 2011-01-13 13:59:41 +00:00
David Schleef
e3451e5ab8 typefind: Add stream-format to h264 caps 2011-01-02 15:49:42 -08:00
Tim-Philipp Müller
bb786dfb5c typefinding: assume EBML files without doctype are matroska
https://bugzilla.gnome.org/show_bug.cgi?id=638019
2010-12-29 22:36:41 +00:00
David Schleef
525776df79 typefind: Add check for yuv4mpeg 2010-12-14 00:40:58 -08:00
Stefan Kost
7728f3d3a7 typefinders: name "aac" typefinder "audio/aac"
This is in sync how we call the others.
2010-12-13 10:42:02 +02:00
Mark Nauwelaerts
ea7349e4c7 typefinding: improve iso media typefinding
... by also considering compatible brands rather than only aiming at major brand
(of which there are a seemingly ever expanding great many).
2010-12-08 12:55:24 +01:00
René Stadler
1e75501c10 typefind: ignore AC-3 BSIDs 9, 10 and >16
These are reserved for future extensions which will not be backwards
compatible to E-AC-3.
2010-12-07 21:28:20 +02:00
René Stadler
725968c612 typefind: accept consecutive AC-3 frames of different sizes
This is perfectly valid and occurs in particular when there are
(in)dependent substreams present.
2010-12-07 21:28:20 +02:00
René Stadler
0e39c62878 typefind: remove useless masking in (E-)AC-3 typefinders 2010-12-07 21:28:20 +02:00
René Stadler
cc65ba987a typefind: stop scanning after suggesting E-AC-3 caps 2010-12-07 21:28:20 +02:00
René Stadler
886ea051e7 typefind: fix E-AC-3 frame size parsing
Frame size is given in words; it is already multiplied by two where
needed, so the left shift is superfluous. This extra multiplication
caused the code to inspect the third packet instead of the second,
which would fail for files where the second packet has a size
different from the first.
2010-12-07 21:28:20 +02:00
Tim-Philipp Müller
df6bd68b80 typefinding: fix ADTS caps stream-format detail
Field should be "stream-format", not "stream-type".
2010-10-14 16:46:44 +01:00
Andrzej K. Haczewski
6c5cee1d02 typefinding: extend AAC typefinder to detect LOAS streams
Extend AAC typefinder to recognize LOAS stream as specified by
ISO/IEC 14496-3:2009.

https://bugzilla.gnome.org/show_bug.cgi?id=623918
2010-10-14 16:46:41 +01:00
Arun Raghavan
0cf81938a1 pbutils: add AAC profile detection to codec utils
This moves AAC profile detection to pbutils, and uses this in
typefindfunctions. This will also be used in qtdemux.

https://bugzilla.gnome.org/show_bug.cgi?id=617314

API: gst_codec_utils_aac_get_profile()
API: codec_utils_aac_caps_set_level_and_profile()
2010-09-30 13:09:29 +01:00
Arun Raghavan
c77f88cac6 pbutils: add codec-specific utility functions for AAC
This allows us to add generic codec-specific functionality, like
extracting profile/level data from headers, without having to duplicate
code across demuxers and typefindfunctions.

As a starting point, this moves over AAC level extraction code from
typefindfunctions, so it can be reused in qtdemux, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=617314

API: gst_codec_utils_aac_get_sample_rate_from_index()
API: gst_codec_utils_aac_get_level()
2010-09-30 13:09:28 +01:00
Sebastian Dröge
ff45b44e19 typefindfunctions: Add mp3 to the apetag extensions 2010-09-20 11:14:55 +02:00
Thiago Santos
d123ab7bb1 typefind: Detect avc1 ftyp as video/quicktime
Detects avc1 ftyp as video/quicktime (iso variant)
2010-08-01 06:53:28 -03:00
Arun Raghavan
ae03de8ff8 typefindfunctions: export 3gp profile in caps
This reads the 3gp profile from the major/compatible brands and puts
this as a 'profile' field in caps. This can be used by demuxers to
decide whether they can handle this stream or not. Also needed for
DLNA.

https://bugzilla.gnome.org/show_bug.cgi?id=620291
2010-07-24 10:50:45 +01:00
Parthasarathi Susarla
aad661ec77 typefinding: detect enhanced AC-3
https://bugzilla.gnome.org/show_bug.cgi?id=623846
2010-07-24 09:48:41 +01:00
Tim-Philipp Müller
bd0adb11fd typefinding: make mpeg-ts typefinder scan more data
We only look for packets with payload, but it appears there may be packets without,
which makes it harder to find the N packets with payload in a row that we need in
order to typefind this successfully, so scan some more data than necessary in the
optimistic scenario. Alternatively we could change IS_MPEGTS_HEADER().

Fixes #623663.
2010-07-18 11:37:11 +01:00
Philip Jägenstedt
72ca12e4c1 typefind: only associate .webm with WebM
.weba (audio) and .webv (video) were speculation on my part before
the public launch. As of yet no decision has been made on the
file extension for audio-only WebM, and I'm pretty sure there will
never be one for video-only.

Fixes bug #623837.
2010-07-16 17:40:45 +02:00
Arun Raghavan
026e5d3e67 typefinding: Mark ISO 14496-14 files as video/quicktime
These are currently being marked as audio/x-m4a which is incorrect.

https://bugzilla.gnome.org/show_bug.cgi?id=620720
2010-06-24 14:25:38 +01:00
Edward Hervey
7b2584ed68 typefindfunctions: Fix unitialized variables
yay macosx compilers :(
2010-06-14 14:13:32 +02:00
Tim-Philipp Müller
b5a7e96291 typefinding: look for dts frames at non-zero offsets too
Scan a bit into the data when checking for dts frames instead
of expecting the frame sync to be right at the start of the
data. This is needed for some dts-disguised-as-pcm-in-wav files.

See #413942.
2010-06-11 15:59:54 +01:00
Tim-Philipp Müller
9235c91bec typefinding: add typefinder for dts audio 2010-06-11 15:59:53 +01:00
Tim-Philipp Müller
261a1447fa typefinding: fix log function printf format issue 2010-06-06 16:46:55 +01:00
Tim-Philipp Müller
d4269515fa typefinding: stop jpeg typefinding once we found a SOF marker 2010-06-05 18:25:51 +01:00
Tim-Philipp Müller
95b4de4ed7 typefinding: improve jpeg typefinder
Make jpeg typefinder check more than just the first two bytes
plus Exif or JFIF marker. This allows us to report MAXIMUM
probability in cases where there's no Exif or JFIF marker,
making typefinding stop early. Also extract width and height,
because we can.
2010-06-05 18:06:42 +01:00
Tim-Philipp Müller
14d14a9143 typefinding: fix AC-3 typefinding so that it actually checks for a second frame
Fix typo that made the AC-3 typefinder not actually check for a
second frame, but rather compare the sync point found to itself,
which resulted in the AC-3 typefinder reporting an overly optimistic
MAXIMUM or VERY_LIKELY probability when it found a possible frame
sync.
2010-06-05 17:24:31 +01:00
Sebastian Dröge
760ae91ec3 typefindfunctions: Add IVF typefinder 2010-05-22 08:55:51 +02:00
Philip Jägenstedt
3762cfd3d7 typefind: Detect WebM as video/webm
Refactor matroska_type_find into ebml_check_header and a new
matroska_type_find and webm_type_find.
2010-05-19 19:24:35 +02:00
Tim-Philipp Müller
555a3a5d14 typefinding: add channels and rate to ADTS caps if we can 2010-04-12 15:04:31 +01:00
Arun Raghavan
43a04483d9 typefinding: add AAC level to ADTS caps
This adds code to calculate the level for a given AAC stream and export
it in the stream caps. For AAC LC streams, the level is calculated
according to the definition under the AAC Profile. For other streams,
the definition under the Main Profile is used.

HE-AAC support is still to be done, and is dependent on detecting the
presence of SBR and PS in the stream.

Level is added as a field of type string because that's the way it's
done in H.264 caps as well. There are only a few possible levels, so
not using a numerical type is not too painful in this case, and
consistency is nice.

Fixes #613589.
2010-04-12 15:04:31 +01:00
Arun Raghavan
34dcb8458e typefinding: add AAC profile to ADTS caps
This looks at the AAC profile for ADTS streams and adds the profile as a
string in the corresponding caps.

Profile is the actual profile, base-profile denotes the minimum codec
requirements to decode this stream. In this case they're always the
same, but they may differ e.g. in case of certain HE-AAC streams that
can be partially decoded by LC decoders (with loss of quality of course)
if no suitable HE-AAC decoder is available.

Fixes #612312.
2010-04-12 15:04:23 +01:00
Benjamin Otte
3bd4aa26ff Add -Wwrite-strings to configure
Fixes for the code included
2010-03-16 17:41:51 +01:00
David Hoyt
cfa8de336c typefind: use g_ascii_strncasecmp() instead of strncasecmp()
g_ascii_strncasecmp() is more portable and likely more robust as
well (with random binary data as input).

Fixes #612845.
2010-03-15 18:45:13 +00:00
Kaj-Michael Lang
0230f7ed9e typefind: Handle stm module format
Fixes #609314.
2010-02-15 12:50:45 +00:00
Sebastian Dröge
1ae783dafc typefindfunctions: Add typefinder for ISO MP4 files
Fixes bug #607848.
2010-01-24 20:46:58 +01:00
Tim-Philipp Müller
eef885cf86 typefinding: optimise AC-3 typefinder a bit
Make AC-3 typefinder use the DataScanCtx stuff so we don't have to
do gst_type_find_peek() in the inner loop all the time. Also return
when we've suggested AC3 caps, instead of continuing with the loop.
2010-01-23 15:28:02 +00:00
Tim-Philipp Müller
ca7ba91e5b Revert "typefind: Reduce number of calls to gst_type_find_peek."
This reverts commit c661bfaa99.

This breaks AC-3 typefinding for all cases where the first frame
is at an offset > 0.
2010-01-23 15:27:49 +00:00
Stefan Kost
8ebb6be803 typefind: include stdio.h for sscanf 2010-01-22 16:15:54 +02:00
Tim-Philipp Müller
2a84cf0941 typefinding: add PNM typefinder
Add PNM typefinder, so we can remove the one that's in the PNM plugin
in -bad (which btw uses different/wrong media types that don't match
the ones used by gdkpixbufdec) and people don't make fun of us for
loading image decoders when typefinding and playing back audio files.
2010-01-22 02:09:58 +00:00
David Schleef
e432c8ebc2 typefind: rewrite h.264 detection
Make detection simpler: check for NALs, check that they make
sense, and report how certain we are that it's a raw H.264 stream.
Fixes: #583376.
2010-01-19 13:37:12 -08:00
Wim Taymans
8d30d92740 typefind: mp4 video is not parsed 2010-01-13 17:36:05 +01:00
Thiago Santos
148d951fbc typefind: Add aac stream-format to caps
Also add the aac stream-format field on the caps when
detecting it.
2010-01-13 12:49:20 -03:00
Edward Hervey
c661bfaa99 typefind: Reduce number of calls to gst_type_find_peek.
Shaves off a couple percents off typefinding
2009-11-09 19:18:07 +01:00
Tim-Philipp Müller
37f8957181 typefind: fix typo in previous mxf typefinder change 2009-10-21 20:36:23 +01:00
Edward Hervey
d48d47e683 typefind: speed up mxf_type_find over 300 times for worst case scenarios
* memcmp is expensive and was being abused, reduce calling it by checking
  the first byte.
* iterating one byte at at time over 64 kbites introduces a certain overhead,
  therefore we now do it in chunks of 1024 bytes

And I do mean over 300 times. The average instruction call per mxf_type_find
was previously 785685 and it's now down to 2458 :)
2009-10-21 21:04:45 +02:00
David Schleef
1871a6025d typefind: detect 'ftypqt ' as video/quicktime 2009-10-06 12:19:12 -07:00
Tim-Philipp Müller
f051514f69 typefinding: disable typefinder for headerless flac
Disable headerless flac typefinder as long as it happily typefinds anything
including /dev/urandom as flac and as long as it's not particularly useful
given that such streams don't really exist in the wild.

Also fix up some comments so that gtk-doc doesn't complain about them.
2009-09-07 17:13:12 +01:00
Wim Taymans
f1b209f409 typefind: fix midi typefinding
We already have a audio/midi typefinder so don't override it with the midi in
RIFF typefinder or else we fail to detect plain midi files.
2009-09-04 15:48:06 +02:00
Sebastian Dröge
a69ffb5886 typefindfunctions: Add typefinder for Midi inside RIFF
This is a standard Midi file format that should be supported by
all Midi decoders and also has the mimetype audio/mid according to
the Midi specification homepage.

Fixes bug #594094.
2009-09-04 07:36:10 +02:00
Tim-Philipp Müller
4cacc441d8 typefinding: move gio-based xdg mime typefinder from -bad to -base
Its purposes is mainly to avoid false positives (e.g. mp3 typefinder
reporting a 20% probability and somesuch). Won't be registered if
the gio plugin has been disabled via ./configure --disable-gio.
2009-09-03 09:01:47 +01:00
Sebastian Dröge
3c8ff21ba2 typefindfunctions: Detect AVF files as RIFF files too
AVF is valid RIFF but has AVF0 as first fourcc instead of RIFF.

Partially fixes bug #593117.
2009-08-26 09:10:19 +02:00
Sebastian Dröge
3b4c35e319 typefindfunctions: Also detect SVG by the <svg> starting tag
Not all SVG images have the DOCTYPE specified.
2009-08-12 12:11:08 +02:00
Sebastian Dröge
141c3f52cd typefindfunctions: Add typefinders for many game sound console formats supported by gme
These are AY, GBS, GYM, KSS, SAP and VGM. SPC and NSF already had typefinders.
2009-08-07 09:33:34 +02:00
Tim-Philipp Müller
85a08d8dc2 typefinding: fix postscript typefinder probability
Two bytes for a rare format hardly warrants MAXIMUM typefinding
probability, POSSIBLE seems more appropriate.
2009-08-06 09:57:25 +01:00
Sebastian Dröge
76571840ef typefindfunctions: Add SVG typefinder 2009-08-06 06:43:35 +02:00
Sebastian Dröge
5c52513aab typefindfunctions: Add postscript typefinder 2009-08-06 06:43:35 +02:00
Sebastian Dröge
37839ee2b3 typefindfunctions: Use static caps again for MPEG4 typefinding 2009-08-06 06:43:35 +02:00
Arnout Vandecappelle
ce24ac4ed0 typefindfunctions: Implement better & more flexible MPEG4 typefinding
This detects more MPEG4 streams as MPEG4.

Fixes bug #556537.
2009-08-06 06:43:35 +02:00
Benjamin Gaignard
2f4c65bb06 typefindfunctions: Fix typefinding of SDP files
Fixes bug #589574.
2009-08-06 06:43:33 +02:00
Tim-Philipp Müller
e199d7e1cd typefinding: fix detection of fLaC id packet in broken flac-in-ogg
There are flac-in-ogg files without the usual flac packet framing
and these files just have a 4-byte fLaC ID packet as first packet.
We need to recognise the type just from these four bytes if we
want oggdemux to recognise these streams correctly.
2009-08-01 19:01:39 +01:00
Tim-Philipp Müller
2670f23812 typefind: recognise Kate spu subtitles as well
Recognise spu-subtitles, SUB and K-SPU as valid categories for
Kate subtitles as well.
2009-07-24 09:42:05 +01:00
Tim-Philipp Müller
d53e754d42 typefinding: use subtitle/x-kate for Kate subtitle streams and application/x-kate for the rest
Differentiate subtitle streams and lyrics/cracktastic/complex streams via
the category string in the headers. This seems like a useful distinction
to make, and also seems more future-proof. See #525743.
2009-07-13 23:00:04 +01:00
Tim-Philipp Müller
8b94cd3934 typefinding: lower the h264 typefinder's probability
A NEARLY_CERTAIN is absolutely not warranted given the kind
of things it checks for. Even a LIKELY is probably not entirely
appropriate.
2009-06-25 12:09:59 +01:00
Edward Hervey
31e7bf098d typefindfunctions: Fix caps for ogg typefinder. 2009-06-02 09:54:23 +02:00
Arnout Vandecappelle
192a34af40 typefindfunctions: made mp3_type_find less aggressive
mp3_type_find could suggest already when only a single valid header
was found, if it ran out of data before the end of the next frame.
Therefore, ignore the last found frame if it was incomplete.
Fixes bug #579692.
2009-05-12 09:03:22 +02:00
Tim-Philipp Müller
04a860c6f7 typefinding: make flac typefinder return lower probability for frame headers
The flac frame header typefinder overstates the likelihood of a match, leading
to false positives with e.g. aac streams and PDF files. Reduce probabilty
returned from LIKELY to POSSIBLE for the frame header matchin code.
Fixes #574939.
2009-03-15 19:57:36 +00:00
Tim-Philipp Müller
a622ff74b0 typefinding: improve image/bmp typefinder
Detect more variations and also bail out in more cases where the values
don't make sense. Furthermore, add width/height and bpp to the caps,
because we can.
2009-03-15 19:52:46 +00:00
Tim-Philipp Müller
4cbe4d2c72 typefinding: flac typefinder fixes
Use scan context for initial peek as well. Peek 6 bytes in the initial
peek rather than 5 bytes, to match the length of the memcmp we're doing
on that data later. Return immediately when we found caps from looking
at the beginning of the data - no point in continuing to scan the next
64kB for something matching a frame header.
2009-03-11 13:33:33 +00:00
Jonathan Matthew
db7ecda64f typefind: add photoshop typefind functions
Add photoshop typefind functions.
Fixes #574516.
2009-03-09 16:19:40 +01:00
Edward Hervey
9acf7de5a4 typefind: Use the proper data pointer instead of poking random memory. 2009-03-09 09:08:00 +01:00
Stefan Kost
080493ccff typefind: Make the flac check more tight to not mistace some aac files for flac. Fixes #570356.
Add comments about the flac format. Tighten the check to not allow values that
refer to headers.
2009-02-03 15:28:50 +02:00
Michael Smith
81cc88326f Ensure we have sufficient data when using data scan contexts.
Fixes crashes typefinding things that look like they might contain AAC
data (but probably aren't actually AAC).
2009-01-26 18:02:00 -08:00
Sebastian Dröge
5dfcb63252 Rename files and types from speexresample to audioresample
Rename files and types from speexresample to audioresample
to finish the move and to prevent any confusion.
2009-01-23 12:33:41 +01:00
Wim Taymans
cc8b9ae5e8 Add typefind function for gsm
Because core now supports typefindfactories without a typefind function we can
register a factory fo GSM that will --if all else fails-- assume the file is a
GSM file based on the registered extension.
Fixes #566661.
2009-01-23 11:40:26 +01:00
Benjamin Gaignard
336e1346e4 Add typefinder for Mobile XMF. Fixes bug #568707. 2009-01-23 10:19:27 +01:00
Guillaume Emont
d477a37e7e gst/typefind/gsttypefindfunctions.c: Add typefinders for MS Word files and OS X .DS_Store files to prevent them to be...
Original commit message from CVS:
Patch by: Guillaume Emont <guillaume at fluendo dot com>
* gst/typefind/gsttypefindfunctions.c: (plugin_init):
Add typefinders for MS Word files and OS X .DS_Store files to
prevent them to be recognized as MPEG files. Fixes bug #564098.
2008-12-11 12:32:03 +00:00
Luis Menina
a4493595a6 gst/: Include glib.h instead of a specific GLib header. Including single
Original commit message from CVS:
Patch by: Luis Menina <liberforce at freeside dot fr>
* gst-libs/gst/floatcast/floatcast.h:
* gst/typefind/gsttypefindfunctions.c:
Include glib.h instead of a specific GLib header. Including single
GLib headers is deprecated. Fixes bug #563904.
2008-12-10 08:19:13 +00:00
Jan Schmidt
ca161e799f gst/audioresample/gstaudioresample.c: Guard against a NULL dereference I somehow encountered - with a FLUSH_STOP arri...
Original commit message from CVS:
* gst/audioresample/gstaudioresample.c:
Guard against a NULL dereference I somehow encountered -
with a FLUSH_STOP arriving either before basetransform _start(),
or after _stop().
* gst/typefind/gsttypefindfunctions.c:
Make sure we never jump backwards when typefinding corrupt mov files.
2008-11-14 21:44:33 +00:00
Mark Nauwelaerts
23f10c5403 gst/typefind/gsttypefindfunctions.c: Improve typefinding of ISO JPEG2000 mime types.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (jp2_type_find),
(plugin_init):
Improve typefinding of ISO JPEG2000 mime types.
2008-11-13 21:11:13 +00:00
Sebastian Dröge
e4e86b0bad gst/typefind/gsttypefindfunctions.c: Improve MXF typefinding a bit by searching for a header partition pack instead o...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (mxf_type_find):
Improve MXF typefinding a bit by searching for a header partition
pack instead of just a general partition pack and checking more
bytes for valid values.
2008-10-20 14:08:52 +00:00
Stefan Kost
2cd4c7e2b9 Don't install static libs for plugins. Fixes #550851 for base.
Original commit message from CVS:
* ext/alsa/Makefile.am:
* ext/cdparanoia/Makefile.am:
* ext/gio/Makefile.am:
* ext/gnomevfs/Makefile.am:
* ext/libvisual/Makefile.am:
* ext/ogg/Makefile.am:
* ext/pango/Makefile.am:
* ext/theora/Makefile.am:
* ext/vorbis/Makefile.am:
* gst/adder/Makefile.am:
* gst/audioconvert/Makefile.am:
* gst/audiorate/Makefile.am:
* gst/audioresample/Makefile.am:
* gst/audiotestsrc/Makefile.am:
* gst/ffmpegcolorspace/Makefile.am:
* gst/gdp/Makefile.am:
* gst/playback/Makefile.am:
* gst/subparse/Makefile.am:
* gst/tcp/Makefile.am:
* gst/typefind/Makefile.am:
* gst/videorate/Makefile.am:
* gst/videoscale/Makefile.am:
* gst/videotestsrc/Makefile.am:
* gst/volume/Makefile.am:
* sys/v4l/Makefile.am:
* sys/ximage/Makefile.am:
* sys/xvimage/Makefile.am:
Don't install static libs for plugins. Fixes #550851 for base.
2008-10-16 15:07:00 +00:00
Edward Hervey
e68dbb884d gst/typefind/gsttypefindfunctions.c: Don't forget to advance the offset of what we're matching against, else we end u...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (flac_type_find):
Don't forget to advance the offset of what we're matching against, else
we end up in a forever loop.
2008-10-15 14:25:50 +00:00
Sebastian Dröge
d0d588ff6f gst/typefind/gsttypefindfunctions.c: For looking at the 4th byte we have to get 4 bytes of course and not 3.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (flac_type_find):
For looking at the 4th byte we have to get 4 bytes of course
and not 3.
2008-10-13 08:00:55 +00:00
Sebastian Dröge
862fd1d50f gst/typefind/gsttypefindfunctions.c: Improve FLAC-without-headers typefinding by looking at most of the frame header ...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (flac_type_find):
Improve FLAC-without-headers typefinding by looking at most of the
frame header and checking if invalid values are used. Should prevent
quite some false positives compared to the old version which only
check if the first 14 bits are set.
2008-10-13 07:52:41 +00:00
Sebastian Dröge
44143f1dcc gst/typefind/gsttypefindfunctions.c: Add typefinder for MXF.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (mxf_type_find),
(plugin_init):
Add typefinder for MXF.
2008-10-05 08:11:53 +00:00
Sebastian Dröge
d3edbe7745 gst/typefind/gsttypefindfunctions.c: Add typefinder for MXF.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (mxf_type_find),
(plugin_init):
Add typefinder for MXF.
2008-10-05 08:10:09 +00:00
Tim-Philipp Müller
029f05635d gst/: Recognise Kate subtitle streams (#550582).
Original commit message from CVS:
* gst-libs/gst/pbutils/descriptions.c:
* gst/typefind/gsttypefindfunctions.c:
Recognise Kate subtitle streams (#550582).
2008-09-15 15:11:18 +00:00
Mark Nauwelaerts
ec6afbd321 gst/typefind/gsttypefindfunctions.c: Typefind video/mj2 and image/jp2 ISO JPEG2000 mime types.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (plugin_init):
Typefind video/mj2 and image/jp2 ISO JPEG2000 mime types.
Fixes #550638.
2008-09-03 12:23:44 +00:00
Jonathan Matthew
686a893a0f gst/typefind/gsttypefindfunctions.c: Add typefinder for PDF documents (which is nice to have, since it's a common for...
Original commit message from CVS:
Patch by: Jonathan Matthew  <notverysmart gmail com>
* gst/typefind/gsttypefindfunctions.c: (plugin_init):
Add typefinder for PDF documents (which is nice to have, since it's a
common format, but also helps prevent false positives). Fixes #549814.
2008-08-30 15:55:06 +00:00
David Schleef
7cce52603e gst/typefind/gsttypefindfunctions.c: DV typefinding. Remove check for a bit that is 0 in IEC 61384, but not SMPTE 314M.
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: DV typefinding.  Remove
check for a bit that is 0 in IEC 61384, but not SMPTE 314M.
Fixes #548065.
2008-08-16 20:57:27 +00:00
Sebastian Dröge
63b89f5625 gst/typefind/gsttypefindfunctions.c: Add simple typefinder for the CELT codec (www.celt-codec.org).
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (celt_type_find),
(plugin_init):
Add simple typefinder for the CELT codec (www.celt-codec.org).
2008-07-28 12:47:06 +00:00
Tim-Philipp Müller
93db55c074 gst/typefind/gsttypefindfunctions.c: Bunch of small clean-ups: use gst_type_find_suggest_simple(); don't copy caps fo...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (aac_type_find),
(mp3_type_find), (musepack_type_find), (MULTIPART_MAX_HEADER_SIZE),
(mpeg_sys_type_find), (mpeg_ts_type_find), (mpeg4_video_type_find),
(h264_video_type_find), (mpeg_video_stream_type_find),
(dv_type_find), (mmsh_type_find):
Bunch of small clean-ups: use gst_type_find_suggest_simple(); don't
copy caps for no good reason (this may be desirable to make it easier
to detect leaks, but then it should probably be done for all caps
in the typefinder somewhere).
2008-06-04 17:12:40 +00:00
Julien Moutte
0f80e462d9 gst/tcp/gstmultifdsink.c: Use IPPROTO_IP instead of SOL_IP, works on more platforms.
Original commit message from CVS:
2008-05-21  Julien Moutte  <julien@fluendo.com>

* gst/tcp/gstmultifdsink.c: (setup_dscp_client): Use IPPROTO_IP
instead of SOL_IP, works on more platforms.
* gst/typefind/gsttypefindfunctions.c: (aac_type_find): Fix printf
arguments.
2008-05-21 16:47:58 +00:00
Tim-Philipp Müller
7cb1276dac gst/typefind/gsttypefindfunctions.c: Use data scan helper in aac typefinder and stop scanning for headers when we've ...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (aac_type_find):
Use data scan helper in aac typefinder and stop scanning
for headers when we've found a type. Also fix potential invalid
memory access when calculating the frame length.
2008-05-19 15:59:40 +00:00
Tim-Philipp Müller
cfc8f3c0d7 gst/typefind/gsttypefindfunctions.c: Don't modify scan context when we return FALSE in ensure_data, so it's possible ...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (data_scan_ctx_ensure_data),
(mpeg_sys_is_valid_pack):
Don't modify scan context when we return FALSE in ensure_data, so
it's possible to continue scanning, and we don't end up with a NULL
data pointer and a positive size, which might bite us the next time
we're called. Small constification.
2008-05-19 14:09:08 +00:00
Tim-Philipp Müller
fed34307db gst/typefind/gsttypefindfunctions.c: Don't do lots of 4-byte peeks, but use the 'new' data scan helper for this inste...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (h264_video_type_find):
Don't do lots of 4-byte peeks, but use the 'new' data scan helper
for this instead; don't check if we've found enough markers after
each and every step, it's enough to do that only if we've actually
found a new marker.
Embed a G_UNLIKELY into the IS_MPEG_HEADER macro.
2008-05-10 20:16:21 +00:00
Tim-Philipp Müller
104fed4d66 gst/typefind/gsttypefindfunctions.c: Move scan helper thingy to the beginning of the file so we can use it in other t...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c:
(DATA_SCAN_CTX_CHUNK_SIZE), (DataScanCtx), (data_scan_ctx_advance),
(data_scan_ctx_ensure_data), (GST_MPEGVID_TYPEFIND_TRY_SYNC),
(mpeg_video_stream_type_find):
Move scan helper thingy to the beginning of the file so we can use
it in other typefind functions. Rename it to something more
generic. Also improve handling of things towards the end of the
typefind data: peek as much as we can if we know the size of the
data, rather than just min_size.
2008-05-10 18:19:17 +00:00
Edward Hervey
9fa3d7a294 gst/typefind/gsttypefindfunctions.c: Abort the h264 typefinding as soon as _peek() doesn't return anything, which hap...
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (h264_video_type_find):
Abort the h264 typefinding as soon as _peek() doesn't return anything,
which happens for example with files smaller than 128kb.
2008-05-08 17:35:44 +00:00