Commit graph

513 commits

Author SHA1 Message Date
Jan Schmidt
d178f7626a id3v2: Add missing overrun check for frame sizes
When frames claim to have a footer, ensure they
are large enough to contain one to avoid an invalid
read overrun.

Spotted by Joshua Yabut
2016-12-09 18:06:35 +11:00
Sebastian Dröge
7c1a32e28b tagdemux: Fix crash when shutting down element during getrange()
Ensure that nothing is in any of the streaming thread functions
anymore when going from PAUSED to READY. While the parent's state change
function has deactivated all pads, there is nothing preventing
downstream from activating our srcpad again and calling the getrange()
function. Although we're in READY!

https://bugzilla.gnome.org/show_bug.cgi?id=775687
2016-12-06 16:29:23 +02:00
Scott D Phillips
c2dd0149c9 tag: fix some warnings in mklicensestables
https://bugzilla.gnome.org/show_bug.cgi?id=774878
2016-11-23 10:20:04 +02:00
Thibault Saunier
6917cb629e meson: Generate girs
https://bugzilla.gnome.org/show_bug.cgi?id=773944
2016-11-09 18:06:19 -03:00
Thibault Saunier
558172d418 meson: Make use of new environment object and set plugin path to builddir
Workaround source_root being the root directory of all projects
in the subproject case.
Remove now unneeded getpluginsdir and define c++ tests in the same loop.

Bump meson requirement to 0.35
2016-10-14 17:37:16 +02:00
Thibault Saunier
bc6aae6ca7 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:24 -03:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Tim-Philipp Müller
a2c050a4be tagdemux: fix handling of very short files in push mode
By default we'll wait for a certain amount of data before
attempting typefinding. However, if the stream is fairly
short, we might get EOS before we ever attempted any
typefinding, so at this point we should force typefinding
and output any pending data if we manage to detect the
type.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:07 +01:00
Tim-Philipp Müller
130e78dbd8 tagdemux: fix erroring out if we reach EOS without detecting type
In 0.10 the source pad was a dynamic pad that was only added once
the type had been detected, but in 1.x it's an always source pad,
so checking whether it's still NULL won't work to detect if the
type has been detected.

Makes tagdemux error out when we get EOS but haven't managed to
identify the format of the data after the tag.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:02 +01:00
Michael Olbrich
72879c3639 tagdemux: preserve duration when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the duration if it doesn't start
with the first byte. We just skip the tag here, so the duration is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767791
2016-06-21 10:43:50 +03:00
Paulo Neves
5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Michael Olbrich
ac56c1c3a7 tagdemux: preserve timestamp when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the timestamp if it doesn't start
with the first byte. We just skip the tag here, so the timestamp is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767173
2016-06-04 12:40:24 +01:00
Tim-Philipp Müller
d52a74f32e g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:44:21 +01:00
Aurélien Zanelli
928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Aurélien Zanelli
c5a4a83828 tag: add GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
It is the 35 mm equivalent focal length of the lens, mainly used in
photography. Tag value is stored in a double value to be consistent with
GST_TAG_CAPTURING_FOCAL_LENGTH.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Adam Miartus
2bab28f494 tag: id3v2: read conductor tag
ID3v2 features the TPE3 info frame, which contains information
about the conductor.

https://bugzilla.gnome.org/show_bug.cgi?id=762451
2016-02-22 21:16:54 +00:00
Xavier Claessens
429860e51f base: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:39:43 -05:00
Reynaldo H. Verdejo Pinochet
4ed7b0a0e6 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 20:19:43 -08:00
Ravi Kiran K N
df5725e683 id3v2frames: Handle private frames
Handle PRIV ID3 tag having owner information (string)
and binary data, add to tag messages list.

https://bugzilla.gnome.org/show_bug.cgi?id=730926
2015-11-20 20:20:18 +00:00
Tim-Philipp Müller
93a92d7f70 tags: id3: make sure to register private-id3v2-frame tag before using it 2015-11-20 19:15:22 +00:00
Vineeth TM
8e5f7f27f5 gstreamer: base: Fix memory leaks when context parse fails.
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753852
2015-10-02 17:26:27 +03:00
Nicolas Dufresne
c101452a4a gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:04:57 -04:00
Sebastian Dröge
8803ea2d8b id3v2frames: Fix compiler warnings
id3v2frames.c:951:20: error: unused variable 'utf16enc' [-Werror,-Wunused-const-variable]
static const gchar utf16enc[] = "UTF-16";
                   ^
id3v2frames.c:952:20: error: unused variable 'utf16leenc' [-Werror,-Wunused-const-variable]
static const gchar utf16leenc[] = "UTF-16LE";
                   ^
id3v2frames.c:953:20: error: unused variable 'utf16beenc' [-Werror,-Wunused-const-variable]
static const gchar utf16beenc[] = "UTF-16BE";
                   ^
2015-05-30 08:12:03 +02:00
Tim-Philipp Müller
ea5d912b9f tag: id3v2: fix parsing of UTF-16 text on systems with crippled iconv
Use g_utf16_to_utf8() instead of the more generic g_convert(), so
that we can extract text in UTF-16 format even on embedded systems
with crippled iconv support.

This code path is exercised by the id3demux test_unsync_v23
check in gst-plugins-good.

https://bugzilla.gnome.org/show_bug.cgi?id=741144
2015-05-25 22:40:17 +01: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
Guillaume Desmottes
2b0b08b74c xmptag: fix invalid reads in GST_DEBUG statement
Don't try to print a string that is not NUL-terminated. This
log line does not really seem useful so let's just drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=748413
2015-04-24 17:32:51 +01:00
Tim-Philipp Müller
99929b7ffa tag: exiftag: don't try to convert utf-8 to latin1 if string is ASCII already
Bypass g_convert/iconv if there's nothing to convert. That way,
conversion won't fail on systems where iconv doesn't support
converting utf-8 to latin1 and there's nothing to convert.

https://bugzilla.gnome.org/show_bug.cgi?id=723252
2015-04-03 21:03:50 +01:00
Edward Hervey
3eb35c77cc introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:21:43 +02:00
Vincent Penquerc'h
e2a9f0ef4e id3v2: ignore RVA2 tags with more than 64 peak bits
The spec for this does not say nor imply how this should be
interpreted.  The previous code would try to shift by 64 bits,
which is undefined.

Coverity 1195119

https://bugzilla.gnome.org/show_bug.cgi?id=727955
2015-03-30 12:33:06 +01:00
Thiago Santos
cd07101420 tagdemux: ensure tags have been fetched before pulling data
Otherwise upstream can get confused about offsets as there will
be a jump once the tags have been parsed due to the stripped area.

If upstream pulls from 0 to 100, and then tagdemux does the
tag reading and finds out that the first 200 bytes are the tag, the
next pull from upstream will have an offset of 200 bytes. So
upstream will get the following data:

0 - 100, 300 - (EOS), as it will continue requesting from where
it has last stopped, but tagdemux will add an offset to skip the
tags.

This patch makes sure that the tags have been parsed and skipped
since the first pull range call.

https://bugzilla.gnome.org/show_bug.cgi?id=744580
2015-02-18 21:00:50 -03:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Tim-Philipp Müller
19d2a5255c tagmux: fix criticals when there are no tags at all 2014-11-28 13:18:38 +00:00
Sebastian Dröge
1e64667fe0 libs: There is no G_TYPE_CHECK_INTERFACE_TYPE and G_TYPE_CHECK_INTERFACE_CAST
Remove the macros that used them, nobody could've used them anyway.
2014-06-26 16:18:46 +02:00
Tim-Philipp Müller
3f68f522ee tag: xmp: fix leaks in error code paths
CID 1212133
2014-05-09 15:32:18 +01:00
Thiago Santos
03ba34f3a8 tag: exif: avoid adding empty strings
Fixes assertion with some jpeg files
2014-04-22 00:21:45 -03:00
Vincent Penquerc'h
22e12979ee exiftag: catch buffer mapping failure
Might be what caused:

Coverity 1139734
2014-04-16 11:43:40 +01:00
Eric Trousset
2ca256acdb tagdemux: Forward TIME seeks upstream too, maybe upstream can handle that
https://bugzilla.gnome.org/show_bug.cgi?id=723597
2014-02-04 13:56:29 +01:00
Sebastian Dröge
5a48fb7cdb vorbistag: Read image-type from the GstSample info struct
But for backwards compatibility keep reading it from the caps and only
use the info struct if the caps don't contain the image-type.
2013-12-16 11:35:12 +01:00
Wim Taymans
b55de48843 tagdemux: accumulate buffers in adapter
Accumulate buffers in an adapter instead of appending them because append causes
a lot of memcpys.
Keep track of the last tagsize and accumulate enough data before attempting to
parse more data.

This patch implements a minimal amount of changes in order to not change the
behaviour. We should really rewrite the tag handling and trimming using
the adapter API instead of merging and trimming into a buffer.
2013-11-06 16:27:21 +01:00
Matthieu Bouron
7b3ca538fd tag: id3: encapsulate ID3V2 blob frames in GstSample
id3mux and id3v2mux expect GST_TAG_ID3V2_FRAME type to be stored in a
GstSample and not a buffer, which is also needed because we can't
attach extradata/caps to buffers any more. These are private tags
no one should be poking at, and also the extra info is missing.

https://bugzilla.gnome.org/show_bug.cgi?id=707765
2013-09-09 23:49:14 +01:00
Matthieu Bouron
45edbacd23 tag: id3: handle publisher, interpreted-by and musical-key tags
https://bugzilla.gnome.org/show_bug.cgi?id=705999
2013-08-20 14:44:55 +02:00
Matthieu Bouron
541c061ee8 tag: add musical-key tag
https://bugzilla.gnome.org/show_bug.cgi?id=705999
2013-08-20 14:44:27 +02:00
Sebastian Dröge
bb870b8b7b tagdemux: Properly implement seeking if tagdemux is driving the pipeline
https://bugzilla.gnome.org/show_bug.cgi?id=705062
2013-07-29 11:40:57 +02:00
Sebastian Dröge
b4365551d0 tagdemux: Add support for group-id in the stream-start event 2013-07-22 15:24:50 +02:00
Edward Hervey
0bb5065b62 id3: Use debug category and show FIXMEs
Allows spotting faster un-parsed tags
2013-07-18 07:45:47 +02:00
Olivier Crête
b550764da8 tagdemux: Put the modified time back in the time part of the segment
https://bugzilla.gnome.org/show_bug.cgi?id=704301
2013-07-16 14:02:40 -04:00
Marcin Lewandowski
cd00206059 tag: ignore malformed ID3v2 TDAT frames
Just skip them, don't cause criticals.

https://bugzilla.gnome.org/show_bug.cgi?id=703283
2013-07-05 00:47:08 +01:00
Edward Hervey
b81ca93de2 xmptag: Add a debug category
Instead of using the default category
2013-06-28 07:09:34 +02:00
Edward Hervey
420dacb2d5 xmptag: More efficient GSList usage
Instead of constantly appending (which gets more and more expensive), just
prepend to the list (O(1)) and reverse the list before usage.

https://bugzilla.gnome.org/show_bug.cgi?id=702545
2013-06-19 12:01:44 +02:00