Commit graph

367 commits

Author SHA1 Message Date
Jan Schmidt
ecb8d2e023 typefind: Add a typefinder for WebVTT files 2016-03-25 00:58:41 +11:00
Jan Schmidt
468111ee49 typefind: Reduce URI typefinder from MAX to LIKELY
Don't claim maximum likelihood for anything that starts
with text that looks like a uri, it's too broad.
2016-03-25 00:58:41 +11:00
Tim-Philipp Müller
ddfe7a2808 win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-20 10:05:17 +00:00
Reynaldo H. Verdejo Pinochet
9cf5645860 typefind: strengthen check for valid H.263 picture layer
Avoids some false positives leading to miss identification:

* Prevent picture start code emulation for the first 2 bytes read
* Add check for valid "picture coding type" and "PB-frames mode" combination

Additionally, change name on confusingly named TR var to what
it is, the layer's PTYPE.

https://bugzilla.gnome.org/show_bug.cgi?id=693263
2016-02-17 11:26:25 -08:00
Sebastian Dröge
0416f121f2 typefindfunctions: Make sure that enough data is available in AAC/ADTS typefinder
We would otherwise read beyond the array bounds and crash every now and then.
This was introduced with 5640ba17c8.

https://bugzilla.gnome.org/show_bug.cgi?id=759910
2015-12-28 13:51:02 +02:00
Tim-Philipp Müller
fb30c04145 typefinding: minor clean-up
Remove unnecessary brackets from IS_MPEGTS_HEADER macro.
2015-10-01 12:49:59 +01:00
Pankaj Darak
eaf4ce01d3 typefinding: mpeg-ts detection improvement
Allow AFC to be 0 for null pid packets.

https://bugzilla.gnome.org/show_bug.cgi?id=726117
2015-10-01 12:32:33 +01:00
Sebastian Dröge
8a736f6e98 typefindfunctions: Add typefinder for TTML+XML
Used in DASH among other things, as SMPTE Timed Text.
2015-08-18 12:56:33 +03:00
Jan Schmidt
f188a023c7 typefind: Make the H.264 typefind a tiny bit more lenient.
When we see prefix NALs before a Subset SPS has been spotted,
it might just be because the stream was truncated at the
start, so don't count those as either 'bad' or 'good' packets.
2015-08-15 12:14:56 +10:00
Ville Skyttä
04e3fc3f33 typefind: Treat *.umx (Unreal Music Package) as audio/x-mod
https://bugzilla.gnome.org//show_bug.cgi?id=752436
2015-07-22 12:59:03 +01:00
Tim-Philipp Müller
39576545b7 typefindfunctions: add DASH MPD typefinder
Moved from dashdemux plugin in -bad.
2015-07-16 21:26:30 +01:00
Thiago Santos
822b1d4511 typefind: also check moof to recognize video/quicktime
Helps recognizing fragmented files with the right type
2015-07-06 10:07:38 -03:00
Tim-Philipp Müller
f5ad17871c typefinding: check for full UTF-8 BOM in MSS typefinder
https://bugzilla.gnome.org/show_bug.cgi?id=750802
2015-06-11 23:33:30 +01:00
Philippe Normand
d182e66bce typefindfunctions: UTF-8 MSS Manifest detection support
Check if the first bytes of data contain an UTF-8 BOM.

https://bugzilla.gnome.org/show_bug.cgi?id=750802
2015-06-11 19:46:02 +02:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Tim-Philipp Müller
1638859627 typefinding: don't read more data than needed in MSS typefinder 2015-04-26 14:45:44 +01:00
Tim-Philipp Müller
9ef16721ed typefinding: detect MSS manifests without using g_convert()
Embedded systems often have limited charset conversion
functionality, so don't rely on g_convert() (i.e. iconv)
for UTF-16 to UTF-8 conversions, we can easily enough do
that ourselves by converting to native endianness and
then using GLib's helper functions.
2015-04-26 14:41:30 +01:00
Tim-Philipp Müller
76199fddb6 typefindfunctions: detect mp4 common file format variant
Used e.g. by UltraViolet.
2014-11-26 16:54:39 +00:00
Tim-Philipp Müller
ef23ac5f52 typefind: improve 'audible' audio typefinder a little
Don't return NEARLY_CERTAIN just based on 4 bytes.
Also change media type to audio/x-audible.

https://bugzilla.gnome.org/show_bug.cgi?id=715050
2014-11-25 09:04:37 +00:00
Jonathan Matthew
ddda5866c5 typefindfunctions: add audio/audible typefinder
https://bugzilla.gnome.org/show_bug.cgi?id=715050
2014-11-25 00:55:50 +00:00
Peter G. Baum
16c8856b42 typefind: recognize Apple Core Audio Format
(CAF) Specification 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=739840
2014-11-09 14:42:40 +00:00
Vincent Penquerc'h
5d1376cefa typefind: remove unneeded test
We've already bailed out if we have less than 5 bytes.

Coverity 1226441
2014-10-30 11:42:02 +00:00
Stefan Sauer
7c247ab166 typefind: use gslice for typefine data
Also use our free function in the failure case.
2014-10-17 12:47:50 +02:00
Danny Song
bb6ea450e8 typefindfunctions: Remove leftover #define from 0.10
https://bugzilla.gnome.org/show_bug.cgi?id=738018
2014-10-07 14:54:01 +03:00
Ravi Kiran K N
cf98138c7e typefind: correct the condition for irap flag
https://bugzilla.gnome.org/show_bug.cgi?id=736779
2014-09-17 09:41:36 +03:00
Tim-Philipp Müller
f14494f425 typefinding: tighten checks for 'freeform mp3' a little
Freeform mp3s typically have bitrates higher than the
otherwise max allowed rate. Prevents misdetection of
some truetype font files as mp3.

https://bugzilla.gnome.org/show_bug.cgi?id=732923
2014-08-25 11:18:21 +01:00
Jan Schmidt
4d076b060a typefind: Bump iso mp4 typefinder to PRIMARY. Add mp4 extension hint.
Fixes a problem with at least one file being detected incorrectly as
DTS because there's DTS packets early enough in the file.
2014-06-26 13:57:33 +10:00
Vincent Penquerc'h
577ec29245 typefind: remove pointless checks for data being NULL
It was already checked in an early out, and as it's only
incremented for at most the size of the passed buffer, it
can only become NULL in an address wraparound.

While there, don't cast away const on a pointer.

Coverity 1139845
2014-04-10 15:16:03 +01:00
Tim-Philipp Müller
61fa4c7bb2 typefindfunctions: lower H.263 typefinder max probability
The typefinder returns LIKELY for as little as one possible
sync and no bad sync (not even taking into account how much
data was looked at for that). It's generally just not fit
for purpose, so should just not return anything like LIKELY
at all ever, even more so since it only recognises one out
of ten H263 files, and likes to mis-detect mp3s as H263.

https://bugzilla.gnome.org/show_bug.cgi?id=700770
https://bugzilla.gnome.org/show_bug.cgi?id=725644
2014-03-05 00:41:20 +00:00
Stefan Sauer
86e6f10781 typefind: add support of BWF RF64 a 64bit wav variant
Detect and describe the RF64 Broadcast Wave Format.
Fixes #519220
2014-01-05 23:35:52 +01:00
Stefan Sauer
51038d70aa pbutils: add typefinder and descriptions for audio/x-xi
xi files can be read by libsndfile.
2013-12-17 18:06:12 +01:00
Sebastian Dröge
eb7cae8033 typefind: Add typefinder for OpenEXR 2013-11-23 20:15:09 +01:00
Reynaldo H. Verdejo Pinochet
8d9dc05245 typefind: Fix identification of some MPEG files
Make sure we begin by peeking at MPEG2_MAX_PROBE_LENGTH
bytes.

Fixes:

https://bugzilla.gnome.org/show_bug.cgi?id=678011
2013-11-14 23:46:12 -03:00
Sreerenj Balachandran
ebaa714c9f typefind: Add typefind function for H265
https://bugzilla.gnome.org/show_bug.cgi?id=708680
2013-10-01 23:14:33 +02:00
Alex Ashley
7240e2e38c typefind: Added "dash" and "avc3" fourCC codes to qt_type_find.
This commit adds detection of the "dash" and "avc3" compatible brands
in qt_type_find.

Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new
structure for fragmented MP4 called "avc3". The principal difference
between AVC1 and AVC3 is the location of the codec initialisation
data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV
box (moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in
the first sample of every fragment (i.e. the first sample in each mdat
box).  The principal reason for avc3 is to make it easier for client
implementations, because it removes the requirement to insert the
SPS+PPS in to the decoder pipeline every time there is a representation
change.

https://bugzilla.gnome.org/show_bug.cgi?id=702004
2013-09-04 13:33:59 +02:00
Sebastian Dröge
ec9b17479d typefind: Add typefinder for video/x-pva
https://bugzilla.gnome.org/show_bug.cgi?id=158719
2013-08-22 14:23:43 +02:00
Carlos Rafael Giani
e8e8fa22f3 typefind: improved and extended typefinder for module music formats
introduced new caps: audio/x-mod, modtype : { xm, okt, mod, ptm, ... }

https://bugzilla.gnome.org/show_bug.cgi?id=706061
2013-08-19 10:32:26 +02:00
Sebastian Dröge
802d734a27 Revert "typefind: improved and extended typefinder for module music formats"
This reverts commit 4c79f35c7a.

It causes some MP4 files to be detected as mod files.
2013-08-16 12:12:05 +02:00
Carlos Rafael Giani
4c79f35c7a typefind: improved and extended typefinder for module music formats
introduced new caps: audio/x-mod, modtype : { xm, okt, mod, ptm, ... }

https://bugzilla.gnome.org/show_bug.cgi?id=706061
2013-08-16 09:34:48 +02:00
Jie Yang
5640ba17c8 typefind: ADTS/AAC, find more aac sync to select correctly
https://bugzilla.gnome.org/show_bug.cgi?id=691462
2013-08-15 13:26:38 +02:00
Sreerenj Balachandran
81782144d9 typefind: Add typefind function for WebP image format
https://bugzilla.gnome.org/show_bug.cgi?id=705826
2013-08-12 14:41:00 +01:00
Tim-Philipp Müller
ef5c6d351f typefinding: don't detect mp3 based on just a few bits
Remove dodgy code that detects mp3 with as little as
a valid frame sync at the beginning. This was only used
in some unit tests in -good where there were only a few
bytes after the id3 tag. We now require at least two
frame headers.

Fixes mis-dection of text files with UTF-16 LE BOM as mp3.

https://bugzilla.gnome.org/show_bug.cgi?id=681368
2013-07-25 13:20:11 +01:00
Vincent Penquerc'h
5a064ca423 typefind: avoid too low mpeg/ts probability on small amount of data
With the current test, we get into problems when we try to typefind
a MPEG stream from a small amount of data, which can happen when
we get data pushed from a HTTP source. We thus make a second test
to give higher probability if all the potential headers were either
pack or pes headers (ie, no potential header was unrecognized).

This fixes an issue with a MPEG1/MP2 stream being properly discovered
as video/mpeg from a file, but as audio/mpeg from souphttpsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=703256
2013-07-01 11:08:24 +02:00
Sebastian Dröge
92af499eb7 typefind: Ensure we have enough data when reading the sync marker in the AAC/LOAS typefinder 2013-05-24 17:43:53 +02:00
Sebastian Dröge
f4952a9baf typefind: Add variant=itu to the h263 typefinder caps
https://bugzilla.gnome.org/show_bug.cgi?id=700770
2013-05-22 10:58:10 +02:00
Andoni Morales Alastruey
3ad2dec005 typefind: fix detection of HLS playlists with alternative renditions
https://bugzilla.gnome.org/show_bug.cgi?id=699923
2013-05-08 13:23:52 +02:00
Tim-Philipp Müller
04a70ea835 typefindfunctions: minor SSA typefinder clean-up
Remove code that doesn't make sense as it is. If there's
a 2-byte UTF-16 BOM or a 4-byte UTF-32 BOM, the following
text won't be 8-bit ASCII.
2013-04-28 18:56:28 +01:00
Tim-Philipp Müller
88acbd60cd typefindfunctions: fix crash in new MSS typefinder
Fixes icydemux test_first_buf_offset_when_merged_for_typefinding
unit test segfaulting on a NULL pointer.
2013-04-24 00:08:15 +01:00
Thiago Santos
ce20bc1dc0 typefind: add smoothstreaming manifest typefinding
Checks if the received XML is a smoothstreaming manifest
in both UTF8 and UTF16 formats. The check is made for a
SmoothStreamingMedia top level element.

Conflicts:
	gst/typefind/gsttypefindfunctions.c
2013-04-23 10:32:19 -03:00
Sebastian Dröge
948a4a3632 gst: Add better support for static plugins 2013-04-15 15:52:58 +02:00