Commit graph

2070 commits

Author SHA1 Message Date
Thiago Santos 7c5f7173c8 tracers: stats: add message structure to output
The name of the message is not enough. For example, state-change
is not enough to know the transition.

https://bugzilla.gnome.org/show_bug.cgi?id=754496
2015-10-05 19:06:41 -03:00
Thiago Santos 0913f699e2 tracer: gststats: add thread-id to log line 2015-10-05 20:59:39 +02:00
Thiago Santos 567865c81c tracer: add pad query hooks 2015-10-05 20:59:39 +02:00
Mathieu Duponchelle a9aab3c6c7 tracer: Use GST_TIME_ARGS when printing with GST_TIME_FORMAT. 2015-10-05 20:59:39 +02:00
Stefan Sauer e5eb05741b stats: TIMESTAMP -> PTS 2015-10-05 20:59:39 +02:00
Stefan Sauer 660049bb38 tracing: rename the global api to gst_tracing
This makes it more obvious what is the api for tracer elements and what is api
for the global state.
2015-10-05 20:59:39 +02:00
Stefan Sauer 5e2770566f tracers: eliminate var_args
Register tracer hooks as GCallback. Use macros for hook dispatch and cast the
hook functions back to the appropriate type.
2015-10-05 20:59:39 +02:00
Stefan Sauer b10b10cf1e tracers: code cleanups
Move static variables to instance variables. Add finalize methods. Remove code
that is commented out. Cleanup locking code.
2015-10-05 20:59:39 +02:00
Stefan Sauer 4881d1c16c tracer: use GQuark or strings for the hook id
This way one can define new tracing probes without changing the core. We are
using our own quark table, as 1) we only want to initialize them if we're
tracing, 2) we want to share them with the tracers.
2015-10-05 20:59:39 +02:00
Stefan Sauer 1a3e218b89 tracer: simplify hook api
Instead of a single invoke() function and a 'mask', register to individual
hooks. This avoids one level of indirection and allows us to remove the
hook enums. The message enms are now renamed to hook enums.
2015-10-05 20:59:39 +02:00
Stefan Sauer 7b24d76260 tracer: drop the HookId hid from the invoke method
The MessageId is more detailed and anyway needed to interpret the varargs.
2015-10-05 20:59:39 +02:00
Stefan Sauer 4ab1e6e3f7 stats: fixup doc name and remove commented code 2015-10-05 20:59:39 +02:00
Stefan Sauer 4f6f8cb811 tracers: add metadata for the logged values 2015-10-05 20:59:39 +02:00
Stefan Sauer 3baaa4ba6f rusage: improve cpu load meassurements
Get the number of cpus and scale process cpu-load accordingly. Switch the
cpuload to be per-mille to get smoother graphs. Add a bit more logging and use
the _OBJECT variant.
2015-10-05 20:59:39 +02:00
Stefan Sauer dbb1897e9b rusage: implement windowing of cpuload
Add a local help to the rusage plugin that supports windowing of values. We want
to generalize this for use in other plugins.
2015-10-05 20:59:39 +02:00
Stefan Sauer 018858980b rusage: announce the data format
Rusage will now announce what is meassures and how it is logged. Use the new format in stats.
Cleanup the the code and naming.
2015-10-05 20:59:39 +02:00
Stefan Sauer c13ee1f2e9 stats: improve cpu load meassurements
Rename variables for clarity. Handle the initial disparity between debug time
and the time already spent in the proc and main thread.
2015-10-05 20:59:39 +02:00
Stefan Sauer 46ea9729df tracer: split into tracer and tracerutils
Keep tracer base class in tracer and move core support into the utils module.
Add a unstable-api guard to the tracer.h so that external modules would need to
acknowledge the status by setting GST_USE_UNSTABLE_API.
2015-10-05 20:59:39 +02:00
Stefan Sauer 6ea2b41364 docs: add gtk-doc blobs 2015-10-05 20:59:39 +02:00
Stefan Sauer 757d3400cd latency: take stop time when buffer is handled
Now we meassure time from 'before buffer transfer on src' to when the 'buffer is processed on sink'.
2015-10-05 20:59:39 +02:00
Stefan Sauer 7dfc0a8ead tracers: add a logging helper to remove identical copies from the tracers 2015-10-05 20:59:39 +02:00
Stefan Sauer 635a4b5c00 tracers: tweak the get_real_pad_parent()
By using the we ended up on the actual element, not the parent.
2015-10-05 20:59:39 +02:00
Stefan Sauer 111b18115a tracers: add a new latency tracer
Add a new tracer with pushes extra events to meassure src-to-sink processing latency.
2015-10-05 20:59:39 +02:00
Stefan Sauer fc9392c10f rusage: add a new rusage tracer
The tracer hooks up to all probes and logs resource usage figures.
2015-10-05 20:59:39 +02:00
Stefan Sauer 0c26387e62 stats: improve the handling of parentage
Log new object after we did the check for parents.
2015-10-05 20:59:39 +02:00
Stefan Sauer b8eef6ba2c stats: add a stats frontend
Parse the log and collect data from tracer messages.
2015-10-05 20:59:39 +02:00
Stefan Sauer ac92e5674e log: add query log category 2015-10-05 20:59:39 +02:00
Stefan Sauer ce7ce2d866 tracer: add more hooks and handle it in the plugins 2015-10-05 20:59:39 +02:00
Stefan Sauer 37721fdc9d stats: handle buffer lists 2015-10-05 20:59:39 +02:00
Stefan Sauer 75fb1f1a73 log: make the log tracer more verbose again
Define log formats per message type and print details.
2015-10-05 20:59:39 +02:00
Stefan Sauer 11d6e13d73 tracer: use a macros for the enabled check
Avoid a function call and check the variables from the macro.
2015-10-05 20:59:39 +02:00
Stefan Sauer 9d3975b5da tracer: pass the timestamp directly
Avoid the structure mashalling (and weird field naming).
2015-10-05 20:59:39 +02:00
Stefan Sauer d663b78612 stats: add a tracer that collects pipeline statistics
This is more or less equiv to the the statistics in gst-tracelib.
2015-10-05 20:59:39 +02:00
Stefan Sauer 2c6672435f log: add cast macro 2015-10-05 20:59:39 +02:00
Stefan Sauer c2d5b35332 tracer: pass the instance to the vmethod 2015-10-05 20:59:39 +02:00
Stefan Sauer 8a8f16863b design: more planning 2015-10-05 20:59:39 +02:00
Stefan Sauer 68b1473846 tracer: add the hook-id to the invoke signature
Tracers that subscribe to multiple hooks can know what hook was used.
2015-10-05 20:59:39 +02:00
Stefan Sauer 4e5d586c7d tracer: initial prototype for the tracing subsystem 2015-10-05 20:59:39 +02:00
Thiago Santos 7f5f1df59b capsfilter: remove proxying of accept-caps downstream
The design is to only do a local check
2015-09-26 07:13:45 -03:00
Stian Selnes 2c60b7eb1f funnel: Fix racy state change
Iterator may need to be resynced, for instance if pads are released
during state change.

got_eos should be protected by the object lock of the element, not of
the pad, as is the case throughout the rest of the funnel code.

https://bugzilla.gnome.org/show_bug.cgi?id=755343
2015-09-24 12:14:57 +02:00
Eunhae Choi ebd2748cd0 inputselector: Fix buffer leak in sync_streams & cache_buffers mode
After doing gst_pad_push() in case of sync_streams and cache_buffers,
if the buffer can not be kept in cache, it should be unreffed to avoid
memory leackage.

https://bugzilla.gnome.org/show_bug.cgi?id=755141
2015-09-21 10:33:55 +02:00
Vineeth TM fcdfcbd618 downloadbuffer, benchmarks: fix error leaks in failure code paths
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:58 +01:00
Tim-Philipp Müller c55bfecc55 Revert "queue2: Process SEEKING query"
This caused problems with oggdemux when queue2 was
operating in queue mode and the souphttpsrc upstream
is not seekable because the server doesn't support
range requests. It would then still claim seekability
and then things go wrong from there.

This reverts commit 7b0b93dafe.

https://bugzilla.gnome.org/show_bug.cgi?id=753887
2015-08-31 12:07:10 +01:00
Eunhae Choi ed7e0e744f queue2: not update upstream size with negative value
upstream_size can be negative but queue->upstream_size is unsigned type.
to get a chance to update queue->upstream_size in gst_queue2_get_range()
it should keep the default value.

https://bugzilla.gnome.org/show_bug.cgi?id=753011
2015-08-04 07:03:24 -03:00
Stefan Sauer 3ee4d608c2 filesink: use GST_INFO_OBJECT for more detail
Helps to distiguish multiple filesinks.
2015-08-04 00:12:57 +02:00
Nicolas Dufresne 1177291e1e doc/capsfilter: Document filtering modes
This is documentation for the HTML documentation.
2015-07-28 16:57:43 -04:00
Nicolas Dufresne 25fa87a9e4 doc/filesink: Add BufferMode enumeration
This is purely for documentation purpose. This way the values will
show up in the HTML documentation.
2015-07-28 16:57:36 -04:00
Sebastian Dröge a30c4cf721 capsfilter: Only remember previous filter caps if they were actually used for something
If nobody ever saw the previous filter caps, nothing could've negotiated with
them and we can just pretend they never existed at all.
2015-07-28 14:16:35 +03:00
Sebastian Dröge 4e2eb93f04 capsfilter: When switching caps change modes, forget all previous caps 2015-07-28 14:16:35 +03:00
Thiago Santos 0accb7f700 concat: dot not reset pad states too early
Resetting the flushing state of the pads at the end of the
PAUSED_TO_READY transition will make pads handle serialized
queries again which will wait for non-active pads and might
cause deadlocks when stopping the pipeline.

Move the reset to the READY_TO_PAUSED instead.

https://bugzilla.gnome.org/show_bug.cgi?id=752623
2015-07-21 00:22:25 -03:00
Tim-Philipp Müller a7ea17a83d tee: fix typo in allow-not-linked property description 2015-07-14 12:44:31 +01:00
Justin Joy 6c93236462 docs: add StreamidDemux to documentation
https://bugzilla.gnome.org/show_bug.cgi?id=749873
2015-07-08 17:07:49 +01:00
Havard Graff ee63702d61 identity: refactor and add tests using GstHarness
Writing a test for unscheduling the gst_clock_id_wait inside the
identity element, found an invalid read, caused by removing the clock-id
when calling _unschedule instead of letting the code calling _wait remove
the clock-id after being unscheduled.

https://bugzilla.gnome.org/show_bug.cgi?id=752055
2015-07-07 13:05:34 +03:00
Tim-Philipp Müller 41fdf21a60 queue: avoid slice allocs/frees for each item
Microoptimisation: Let GstQueueArray store our
item struct. That way we don't have to alloc/free
temporary QueueItem slices for every item we want
to put into the queue.

https://bugzilla.gnome.org/show_bug.cgi?id=750149
2015-07-04 11:07:19 +01:00
Stefan Sauer c11e5d0f7d docs: another sweep canonicalizing the plugin docs sections file
Use underscores for capsfilter macros. Correct the type-name for fakesrc
if we ever implement the enum.
2015-07-03 12:39:57 +02:00
Stefan Sauer feadd6a1f1 docs: order and canonicalize the -sections.txt file
Have all sections in alphabetical order. Also make the macro order consistent.
This is a preparation for generating the file. Remove GET_CLASS macro for
typefine element, since it is not used and the header is not installed.
2015-07-03 11:52:22 +02:00
Luis de Bethencourt c635f38cdc inputselector: remove always-true check
event can't be NULL, it has been dereferenced by GST_EVENT_TYPE (), and no
case frees the pointer. Remove unnecessary check which will always be True.

CID #1308955
2015-07-02 15:10:58 +01:00
Miguel París Díaz c2e15651be funnel: add "forward-sticky-events" property
It is useful to avoid sending sticky event on stream changes.

https://bugzilla.gnome.org/show_bug.cgi?id=749315
2015-06-25 10:53:55 +02:00
Song Bing e9c9a1e3e2 inputselector: Handle different duration track selection
Support track switch from EOS track to non-EOS one.

https://bugzilla.gnome.org/show_bug.cgi?id=750761
2015-06-23 15:28:13 +02:00
Mathieu Duponchelle 056283ff85 concat: when releasing pad, send EOS appropriately.
Previously, concat sent an EOS if there was a next pad.

https://bugzilla.gnome.org/show_bug.cgi?id=751107
2015-06-22 14:15:28 +02:00
Carlos Rafael Giani c50e47343a concat: Add adjust-base property
This disables the segment.base adjustments, which is useful if downstream
takes care of base adjustments already (example: a combination of concat
and streamsynchronizer)

https://bugzilla.gnome.org/show_bug.cgi?id=751047
2015-06-22 14:11:30 +02:00
Tim-Philipp Müller 7be8acbfb0 typefindelement: reset segment only once streaming has stopped
Fixes the occasional criticals in the discoverer unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=745073
https://bugzilla.gnome.org/show_bug.cgi?id=750823
2015-06-14 21:25:29 +01:00
Tim-Philipp Müller f190d01e0d gst_writev: define UIO_MAXIOV on iOS/OSX
Apparently it's only seton iOS/OSX if defined(KERNEL).
2015-06-11 23:06:26 +01:00
Jan Schmidt e08db722f5 gst_writev: Respect UIO_MAXIOV limit for the iov array
If we receive more than UIO_MAXIOV (1024 typically) buffers
in a single writev call, fall back to consolidating them
into one output buffer or multiple write calls.

This could be made more optimal, but let's wait until it's
ever a bottleneck for someone
2015-06-12 01:17:24 +10:00
Carlos Rafael Giani 77b6352194 concat: Add active-pad property
https://bugzilla.gnome.org/show_bug.cgi?id=746949
2015-06-11 12:02:30 +02:00
Sebastian Dröge d8db88d078 concat: Also reset the current start offset when receiving a FLUSH_STOP on the srcpad 2015-06-11 11:05:53 +02:00
Sebastian Dröge c324e31c26 concat: Add some newlines to event handling code to make the code look a bit less dense 2015-06-11 11:05:38 +02:00
Carlos Rafael Giani 25c66e6004 concat: Reset segment base offset after FLUSH_STOP with reset_time = TRUE
If the reset_time value of a FLUSH_STOP event is set to TRUE, the pipeline
will have the base_time of its elements reset. This means that the concat
element's current_start_offset has to be reset to 0, since it was
calculated with the old base-time in mind.

Only FLUSH_STOP events coming from the active pad are looked at.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
2015-06-11 11:03:18 +02:00
Carlos Rafael Giani 426a6ea644 concat: Forward FLUSH_START and FLUSH_STOP events
Without this, seeking deadlocks if performed while the pipeline is paused.
Only flush events coming from the active pad are forwarded.

https://bugzilla.gnome.org/show_bug.cgi?id=745366
2015-06-10 11:51:49 +02:00
Edward Hervey 084f6859ea filesink: Fix fsync/_commit usage
_MSC_VER will only be defined when building *on* windows and not just
*for* windows. Instead, use the G_OS_WIN32 define
2015-06-09 11:03:28 +02:00
Jan Schmidt ef2a4083af filesink: Fix Windows build by using _commit instead of fsync. 2015-06-09 00:52:34 +10:00
Jan Schmidt ade4a83e63 Add GST_BUFFER_FLAG_SYNC_AFTER flag, and implement in filesink.
Makes it possible to get filesink to fsync() after rendering
a buffer.
2015-06-08 19:13:18 +10:00
Sebastian Dröge 91f537edf2 typefind: Post an error if we can't typefind the data until EOS
https://bugzilla.gnome.org/show_bug.cgi?id=750439
2015-06-05 10:02:04 +02:00
eunhae choi e921ee132b downloadbuffer: release lock before posting msg
to avoid the deadlock in playbin2,
send msg after release the download buffer lock.

https://bugzilla.gnome.org/show_bug.cgi?id=749535
2015-06-01 14:05:16 -03:00
Sebastian Dröge 179ba9f182 funnel: Improve debug output a bit 2015-05-27 13:54:37 +02:00
Tim-Philipp Müller 19e5356afd Revert "doc: Workaround gtkdoc issue"
This reverts commit 460a7bf682.

This should be fixed by the gtk-doc 1.23 release.

<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html
2015-05-18 13:13:55 +01:00
Wim Taymans 1d1f76a328 sparsefile: small cleanup
The error path unrefs file->file so make sure we only go there when
there is a non-NULL file->file.
2015-05-18 11:26:07 +02:00
Nicolas Dufresne 460a7bf682 doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the refsect2
into para.
2015-05-16 23:29:03 -04:00
Tim-Philipp Müller 8c85795e92 fakesrc: fix property description
We're enterprise now folks.
2015-05-15 20:44:08 +01:00
Víctor Manuel Jáquez Leal aafce9bea1 fdsrc: docs: fix and update documentation
Update example to use gst-launch-1.0 and fix a paragraph.

https://bugzilla.gnome.org/show_bug.cgi?id=749233
2015-05-12 10:15:22 +01:00
Tim-Philipp Müller 1a9a3c7ef9 docs: gst-launch -> gst-launch-1.0 in example pipelines
And some small example pipeline fix-ups.
2015-05-10 11:35:50 +01:00
Olivier Crête d1620f1c2e identity: Also synchronize GAP events in sync=1
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête 5ea338907c identity: With sync=true, don't pre-roll
To act like a real live element, block the streaming when paused, and
return NO_PREROLL.

https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête 7807296afd identity: Take upstream latency into account for sync=1
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête f2992654ca identity: Handle PTS and DTS separately
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Tim-Philipp Müller 8e6561be91 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 17:49:44 +01:00
Thiago Santos 88a898080a inputselector: Only try to push the first EOS received
Subsequent EOS will push on the source pad that already received
EOS and that will make the event function return FALSE. It needs
only to push the first one and only return TRUE for the subsequent
ones.
2015-04-24 17:19:49 -03:00
Tim-Philipp Müller 3191440485 tee: fix use of possibly-freed pad in debug statement
The gst_object_unref() in the block above may be dropping
the last ref to the pad and free the pad. Set pad pointer
to NULL here, so that we don't accidentally use a
possibly-freed pad pointer in the debug log statements
further below, and also use the tee element as log object
since that's more appropriate anyway.

Fixes valgrind warnings and crashes in tee test_stress
unit test when debug logging is enabled.
2015-04-18 12:01:54 +01:00
Sebastian Dröge d70631fe99 typefindelement: Use gst_event_unref() instead of gst_mini_object_unref() + casting 2015-04-13 17:01:41 +02:00
Guillaume Desmottes 15fd78f0b6 typefind: fix leak in gst_type_find_element_src_event()
gst_type_find_element_src_event() is supposed to consume @event but wasn't
doing so when it was handling the event itself.

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2015-04-13 10:33:41 -03:00
Sebastian Dröge 6409420474 typefind: Run the default have-type handler after all application handlers
Otherwise the CAPS event will already be forwarded downstream and
the application has no way to intervene anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=735896
2015-04-13 09:04:14 +02:00
Duncan Palmer 0ad06434da multiqueue: Don't automatically enter the buffering state when use-buffering is set.
There is no reason I can see to set mq->buffering = TRUE when
use_buffering is set; the code here also calls update_buffering(), which
will set mq->buffering = TRUE if this is warranted because of low buffer
levels.

https://bugzilla.gnome.org/show_bug.cgi?id=745937
2015-04-10 10:40:00 -03:00
Guillaume Desmottes b15e6f4bf0 inputselector: fix cached buffer leak in chain function
gst_selector_pad_chain() was popping cached buffers out of the queue without
freeing those. Make sure we don't steal the GstBuffer as the cached buffer ref
has been passed to the pad chain function.

This can be reproduced by running the
validate.file.playback.switch_subtitle_track_while_paused.test5_mkv scenario
with Valgrind.

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2015-04-10 09:27:30 -03:00
Jose Antonio Santos Cadenas 3e8e0a7065 tee: Add allow-not-linked property
This property avoids not linked error when all the pads are unlinked
or when there are no source pads. This is useful in dynamic pipelines
where it can happen that for a short time there are no pads at all or
all downstream pads are not linked yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746436
2015-03-26 10:46:26 +01:00
Thiago Santos 25295ee285 output-selector: add drain handling
Release the latest buffer, if any, and then just let
the drain be pushed downstream
2015-03-24 16:21:23 -03:00
Jan Alexander Steffens (heftig) 27644a6bd2 input-selector: Rename _activate_sinkpad to _get_active_sinkpad
Removes the now unused 'pad' parameter and renames the function
to something more appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=739620
2015-03-24 10:34:27 -03:00
Jan Alexander Steffens (heftig) bf8a71104c input-selector: Remove pad's 'active' field
This is now never read.

https://bugzilla.gnome.org/show_bug.cgi?id=739620
2015-03-24 10:34:27 -03:00
Jan Alexander Steffens (heftig) 6f24f4917d input-selector: Use segment-presence for running_time check
When determining whether the running_time of a pad can be
calculated, check if the segment is in TIME format instead
of using the 'active' field.

Since the latter is set through *any* activity, it's not a
reliable indicator of segment presence.

https://bugzilla.gnome.org/show_bug.cgi?id=739620
2015-03-24 10:34:27 -03:00
Jan Alexander Steffens (heftig) 0a3ded1932 input-selector: Remove 'blocked' flag
With the disappearance of the 'block' signal, this
flag cannot be set to TRUE.

gst_input_selector_wait disappears as it never waits
and just returns self->flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=736891
2015-03-24 09:42:14 -03:00
Jan Alexander Steffens (heftig) 7a1ebbe0e3 input-selector: Remove obsolete 'block' signal
This signal blocks the input-selector with no means of unblocking
other than a state change back to READY. It seems this signal was
part of an old way of synchronously switching the selector,
together with the already-removed 'switch' signal.

Removing the signal is safe, as attempting to use it could only
end in deadlocks. Attempting to emit an unknown signal just causes
g_criticals.

https://bugzilla.gnome.org/show_bug.cgi?id=736891
2015-03-24 09:42:14 -03:00