Commit graph

10589 commits

Author SHA1 Message Date
Tim-Philipp Müller
e50267593e tests: add basic unit test for gst_pad_proxy_getcaps()
https://bugzilla.gnome.org/show_bug.cgi?id=624203
2010-08-05 01:14:18 +01:00
Olivier Crête
37e2fb1054 gstutils: Make gst_pad_proxy_getcaps() return empty caps if it's what the other side has
gst_pad_proxy_getcaps() would return the pad template caps if the other side
returned empty caps or if the intersection of all the caps on the other side
was empty.

https://bugzilla.gnome.org/show_bug.cgi?id=624203
2010-08-05 01:14:18 +01:00
Sebastian Dröge
3fc35ac763 configure: Check if the compiler supports ISO C89 or C99 and which parameters are required
This first checks what is required for ISO C99 support and sets the relevant
compiler parameters and if no C99 compiler is found, it checks for a
C89 compiler. This enables us to check for and use C89/C99 functions
that gcc hides from us without the correct compiler parameters.
2010-08-04 19:23:28 +02:00
Thiago Santos
1b99e2e2dc bytereader: Fix docs
Fix typo in docs for the unsigned peek functions
2010-08-04 13:47:23 -03:00
Wim Taymans
aa68b600f5 gst: remove \n from debug statements 2010-08-04 10:28:32 +02:00
Tim-Philipp Müller
31ec8282b5 docs: fix build with gtk-doc from git
For some reason the static inline function GST_CAT_LEVEL_LOG_valist is
now picked up, which then breaks the build because it's not documented,
so add it to the sections file.

Based on patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com>.

Fixes #625862.
2010-08-03 11:42:59 +01:00
Stefan Kost
5486683cb7 typefind: add comment and more logging 2010-08-02 11:45:28 +03:00
Mark Nauwelaerts
2057cf6d79 queue2: download mode; prevent range corruption due to race
Current range was being updated in the thread performing seek, but as
no locks were kept for a short section, data flow could resume before
current range updated, so data for the new range would be accepted as
from the previous range.

Rather, range should be updated in serialized manner based on
newsegment event.
2010-07-29 17:29:00 +02:00
Rob Clark
29289ee79e basetransform fix for upstream caps-renegotiation
If initially pass-through caps are negotiated between a transform element's
sink and src pads, but then the downstream element returns different caps
on a buffer from pad_alloc(), basetransform gets stuck with proxy_alloc=TRUE
even though the upstream peer doesn't accept the caps, causing
gst_pad_peer_accept_caps() to be called on each buffer in _buffer_alloc():

    if (!gst_caps_is_equal (newcaps, caps)) {
      GST_DEBUG_OBJECT (trans, "caps are new");
      /* we have new caps, see if we can proxy downstream */
>>    if (gst_pad_peer_accept_caps (pad, newcaps)) {
        /* peer accepts the caps, return a buffer in this format */
        GST_DEBUG_OBJECT (trans, "peer accepted new caps");

which is taking ~40ms/frame.

This patch does two things.  (1) if the buffer returned from pad_alloc() has
new caps, trigger the decision whether to proxy the buffer-alloc to be
revisited, and (2) disable proxy if peer does not accept new caps.  (The first
part may not be strictly needed, but seemed like a good idea.)

Note that this issue would not arise except in case of downstream elements
who have on their template-caps, some that would be suitable for pass-through,
but at runtime pick more restrictive caps (for ex, after querying a driver for
what formats it actually supports).
2010-07-27 17:34:49 +02:00
Tim-Philipp Müller
6f0da67002 info: fix compilation on windows
Fix mismatched brackets (#625295).
2010-07-27 14:32:31 +02:00
Thiago Santos
fda35f7ac7 gstdatetime: Fix localtime usage
localtime only takes one parameter and returns a statically
allocated tm struct. Use it correctly.

Fixes #625368
2010-07-27 07:21:19 -03:00
Thiago Santos
574e6ab423 basetransform: Try suggesting caps on bad caps pad_alloc
When basetransform received an unsupported caps on pad_alloc
it just returned not-negotiated. This patch makes it query
the allowed caps between his sinkpad and upstream's srcpad
to find a caps to suggest.

This happens when dinamically switching pipeline elements
and upstream pad_allocs with the previous caps that was
being used.

Fixes #614296
2010-07-26 14:49:14 -03:00
Tim-Philipp Müller
4cecd73c93 info: flush again after every line of debug output
g_printerr() used to do this for us. Also use libc's fprintf() functions,
to make sure the stderr pointer we use is actually compatible with the
libc linked against by GStreamer (which apparently may not always be the
same as what GLib is linked against on windows), and we don't need the
functionality ensured by g_fprintf().

Fixes #625295.
2010-07-26 19:14:51 +02:00
Tim-Philipp Müller
1f4ab2065c po: update for new strings 2010-07-26 18:53:35 +02:00
Thiago Santos
d407764110 gstvalue: Adds tests for datetime
Adds tests for datetime fields in gstvalue tests

Fixes #594504
2010-07-26 11:57:52 -03:00
Thiago Santos
f2c18c6c98 gststructure: Adds datetime getter function
Adds gst_structure_get_date_time function

API: gst_structure_get_date_time

Fixes #594504
2010-07-26 11:57:52 -03:00
Thiago Santos
137d19d621 tag: Adds GST_TAG_DATE_TIME tag
Adds a new tag that represents a date and time a media was
created

API: GST_TAG_DATE_TIME

Fixes #594504
2010-07-26 11:57:51 -03:00
Thiago Santos
3449bfc30e taglist: Add datetime get functions
Adds _date_time_get and _date_time_get_index functions to
taglist.

API: gst_tag_list_get_date_time
API: gst_tag_list_get_date_time_index

Fixes #594504
2010-07-26 11:57:51 -03:00
Thiago Santos
b4870282cb gstvalue: Adds datetime functions
Adds a datetime functions to gstvalue

Fixes #594504
2010-07-26 11:57:50 -03:00
Thiago Santos
6425bde6ec gstdatetime: Adds GstDateTime
Adds GstDateTime to represent dates + time + timezone
information.

Tests included.

API: GstDateTime
API: gst_date_time_get_day
API: gst_date_time_get_month
API: gst_date_time_get_year
API: gst_date_time_get_hour
API: gst_date_time_get_microsecond
API: gst_date_time_get_minute
API: gst_date_time_get_second
API: gst_date_time_get_time_zone_offset
API: gst_date_time_new
API: gst_date_time_new_local_time
API: gst_date_time_new_from_unix_epoch
API: gst_date_time_new_now_local_time
API: gst_date_time_new_now_utc
API: gst_date_time_ref
API: gst_date_time_unref

Fixes #594504
2010-07-26 11:57:49 -03:00
Sebastian Dröge
c8b06272bc gst: Fix usage of glib_check_version()
It returns NULL if the installed GLib version is as least as
new as the required version and some explanatory string otherwise.
2010-07-26 14:59:51 +02:00
Tim-Philipp Müller
708bc7dc97 tools: make gst-inspect print the release date time stamp 2010-07-23 20:46:10 +01:00
Tim-Philipp Müller
bf3582b9c4 configure: use new AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO macro 2010-07-23 20:45:52 +01:00
Tim-Philipp Müller
042e056776 binaryregistry: save and load release date time in GstPluginDesc
https://bugzilla.gnome.org/show_bug.cgi?id=623040
2010-07-23 17:03:42 +01:00
Tim-Philipp Müller
8c72758ec2 plugin: add release datetime field to GstPluginDesc and set it if GST_PACKAGE_RELEASE_DATETIME is defined
This is a string describing a date and/or date/time in a simple subset of
the ISO-8601 format, namely either "YYYY-MM-DD" or "YYYY-MM-DDTHH:MMZ" (with
'T' the date/time separator and the 'Z' indicating UTC).

The main purpose of this field is to keep track of plugin and element versions
on an absolute timeline, so it's possible to determine which one is newer when
comparing two date time numbers. This will allow us to express 'replaces'-type
relationships betweeen plugins and element factories in future, even across
different modules and plugin merges or splits (source module version numbers
aren't particularly useful here, since they can only meaningfully be compared
within the same module). It also allows applications and libraries to reliably
check that a plugin is recent enough without making assumptions about modules
or module versions.

We use a string here to keep things simple and clear, esp. on the build system
side of things.

https://bugzilla.gnome.org/show_bug.cgi?id=623040
2010-07-23 17:00:56 +01:00
Shixin Zeng
f6b0200026 tests: make *_get_type() in tests thread safe
Even if it shouldn't be needed here. See #623491.
2010-07-21 21:08:32 +01:00
Tim-Philipp Müller
9d4caf8d8c info: write debugging output to file if GST_DEBUG_FILE environment variable is set
This changes behaviour slightly in that we no longer output things
via g_printerr(), so any non-standard glib printerr handlers are no
longer called when GST_DEBUG is enabled. However, this seems not
really desirable in most cases anyway, and the GLib docs also say
that libraries should not use g_printerr() for logging.

Other stderr output (e.g. warnings, or application messages) will
of course not be captured in the log file this way.

GST_DEBUG_FILE=- will redirect debug output to stdout.
2010-07-21 15:54:07 +01:00
Edward Hervey
21c8edca2a gstpad: Assume pads are compatible if we don't have templates
This is the same behaviour as if we had a pad template caps of
GST_CAPS_ANY on any of the pads (i.e. the actual check will be done
during caps negotiation).
2010-07-20 20:52:35 +02:00
Sebastian Dröge
29a35e70e1 basetransform: Allow the subclass to add new fields to caps when getting new caps from downstream
This was already done in all other cases where new caps are handled
except upstream negotiation.
2010-07-17 21:30:18 +02:00
Michael Bunk
a646c9b2ca docs: fix some typos and add some missing links in the app dev manual
Fixes #624164.
2010-07-16 18:37:24 +01:00
Michael Bunk
6df8250d01 docs: fix typo on gst-inspect man page
See #624164.
2010-07-16 18:20:57 +01:00
Tim-Philipp Müller
da289fd8e9 gstcheck: fix some silly list iteration code
g_list_length() is not the best way to check if a list is empty or not.
2010-07-16 18:20:57 +01:00
Tim-Philipp Müller
b987febf09 registry: use GStatBuf unconditionally and add typedef for backwards compatibility
No need to clutter the code with #if #else #endif.

See #623875.
2010-07-16 17:55:07 +01:00
Sebastian Dröge
88ec06f433 structure: Use a const GstStructure * as parameter for some more gst_structure_get variants 2010-07-16 17:33:38 +02:00
Sebastian Dröge
be77e8d6e1 Revert "-launch: disable CLOCK_LOST message handling"
This reverts commit 1f8eba611a.

This should be fixed now (and if not should be fixed) and the
clock-lost handling is now needed for playbin2 gapless playback.

See bug #579127.
2010-07-16 17:27:56 +02:00
David Hoyt
c53457976e registrybinary: Fix compatibility with GLib 2.25 when using MSVC
Newer GLib uses a new type for g_stat() and friends to improve
Windows compatibility. On POSIX this is a typedef to struct stat.

Fixes bug #623875.
2010-07-16 17:27:54 +02:00
Sebastian Dröge
9d0e2e7252 pipeline: If the currently used clock gets lost update it the next time when going from PAUSED to playing
Fixes bug #623806.
2010-07-16 17:27:04 +02:00
Sebastian Dröge
55986b9a10 basesrc: Return values in stream time for the POSITION query
Fixes bug #623622.
2010-07-16 17:26:54 +02:00
Sebastian Dröge
249c4c18d0 basesink: Implement GstElement::get_query_types() 2010-07-16 17:26:50 +02:00
Sebastian Dröge
b2e7c4bd45 basesink: Only answer the SEGMENT query in pull mode
Otherwise the element handling the seeks should answer this query.

Fixes bug #623622.
2010-07-16 17:26:31 +02:00
Sebastian Dröge
e2db318921 basetransform: Implement POSITION query
Fixes bug #623541.
2010-07-16 17:26:22 +02:00
Edward Hervey
7fa58dbebd GstPad: Do not call gst_pad_accept_caps() when caps change
Instead just check that the caps intersect with the pad template.
The elements should properly accept/refuse the caps in setcaps().

Shaves off calling the default implementation of acceptcaps which does
an expensive gst_pad_get_caps() (so if you have 50 of those elements in
a row, you'd be doing factorial(50) gst_pad_get_caps...).

Does not break any module unit test and most apps work fine.

https://bugzilla.gnome.org/show_bug.cgi?id=622740
2010-07-16 15:30:55 +02:00
Edward Hervey
5b40ebbceb utils: Add more details about gst_element_get_compatible_pad 2010-07-16 15:30:22 +02:00
Tim-Philipp Müller
068e1a6384 Back to development. 2010-07-16 11:16:15 +01:00
Tim-Philipp Müller
5ca0726648 Release 0.10.30 2010-07-15 10:18:12 +01:00
Tim-Philipp Müller
feba79aeca po: update translations 2010-07-15 10:18:11 +01:00
Stefan Kost
9d2292acaa pad: remove comma at the end of the last enum value
Fixes the build for c++.
2010-07-15 12:03:04 +03:00
Tim-Philipp Müller
c082281d28 checks: add unit test for recent taglist merge_strings_with_comma fix
See #624113.
2010-07-11 19:00:54 +01:00
Eduardo Dobay
e86cfe1a19 taglist: fix merge_strings_with_comma() for more than two strings
Fixes #624113.
2010-07-11 18:59:53 +01:00
Tim-Philipp Müller
8836a3fd03 .gitignore: ignore new basesink unit test binary 2010-07-08 13:46:56 +01:00