Commit graph

53 commits

Author SHA1 Message Date
Thibault Saunier 0149f87626 tools:discoverer: Add an option to print the cache directory 2019-03-07 20:59:29 +00:00
Thibault Saunier 54920276b0 discoverer: Implement GstDiscovererInfo caching
This uses the gst_discoverer_info_from/to_variant API and saves
the variants on disc (in the user data cache dir) allowing much
faster retrieval of the information after the cache has been built.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Vivia Nikolaidou effd892021 discoverer: Don't crash when running with -v if channel-mask==0 and >7 channels
For e.g. 16-channel audio, if the channel mask is 0 (which it usually
is), gst_audio_channel_positions_from_mask would get confused,
ultimately leading into a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=796578
2018-06-14 15:13:51 +03:00
Edward Hervey cb28f49625 tools: Fix discoverer deprecation
The only information provided by "misc" was the missing plugins which
is already handled with another API
2018-04-02 08:53:28 +02:00
Mathieu Duponchelle 889bb92882 discoverer: output channel positions
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:47:24 +02:00
Mathieu Duponchelle 1d5a6627d8 discoverer: output whether the uri is live
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:47:24 +02: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
Vineeth TM b632b206e1 tools: discoverer: When info is NULL just print error and return
In case discover_uri returns NULL info, passing the info to discoverer APIs
result in critical assertion errors. Hence instead of passing NULL info along,
print the error and return.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-19 10:20:58 +03:00
Vineeth TM 6ee8b22c40 discoverer: free context and error during failures
When g_option_context_parse or gst_discoverer_new fails, then there will
be memory leaks for ctx and err variables. Free'ing the same.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-17 14:11:17 +02: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
Vincent Penquerc'h e107ba97e2 gst-discoverer: error out on failure to copy
This should not really fail, but let's check return value
anyway as it guards against future changes.

Coverity 1135731
2014-10-30 11:42:02 +00:00
Vivia Nikolaidou a0dd71ad80 discoverer: Pretty-print topology tags
Call the code used in properties for topology tags too.
Side-effect achieved: more tags printed, buffers (e.g. images) shortened.
2014-07-22 09:33:35 +02:00
Sebastian Dröge aa04403006 discoverer: Fix code style a bit
if (...)
  one_line;
else if (...) {
  many_lines;
} else
  one_line;

looks a bit confusing.
2014-07-21 13:53:17 +02:00
Vivia Nikolaidou fe67cd3d00 discoverer: prettier image tag printing
Rather than dumping the serialized sample value, the code now
prints the number of bytes in the buffer, then the caps in a
human-readable format.

https://bugzilla.gnome.org/show_bug.cgi?id=733482
2014-07-21 12:42:32 +01:00
Thibault Saunier 622007e7db discoverer: Add APIs to simply get installer details for missing plugins
Currently the API is far from optimal and the user has to work around
our badly defined API to simply install missing plugins.

API:
  new:
    gst_discoverer_info_get_missing_elements_installer_details

  deprecated:
    gst_discoverer_info_get_misc
    gst_discoverer_stream_info_get_misc

https://bugzilla.gnome.org/show_bug.cgi?id=720596
2014-05-03 21:48:55 +02:00
Bastien Nocera f2c1f91508 gst-discoverer: Support non-ASCII tags
By calling setlocale() to get us multi-byte/UTF-8 support.

https://bugzilla.gnome.org/show_bug.cgi?id=723164
2014-01-30 20:14:16 +01:00
Alessandro Decina 08bac91ae1 discoverer: fix build after last commit
Add a forward declaration for my_g_string_append_printf that specifies
G_GNUC_PRINTF. Turn off indent on it as it drives gst-indent crazy.
2013-11-04 11:35:55 +01:00
Alessandro Decina d9c39b9fe0 discoverer: fix -Wformat-nonliteral warning 2013-11-04 11:19:26 +01:00
Stefan Sauer a6cf3c8aac discoverer: extract helper to print common stream info
Save some lnes of code by using a helper for common stream info.
2013-10-03 19:52:58 +02:00
Sebastian Dröge 15ee41dfc9 discoverer: Add support for getting the stream-id
https://bugzilla.gnome.org/show_bug.cgi?id=654830
2012-11-20 14:57:42 +01: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
Tim-Philipp Müller 2a6a450001 discoverer: remove unused 'silent' command line option 2012-08-17 23:32:17 +01:00
Anton Belka b395ecbe3b gst-discoverer: clean up some code duplication
Use print_tag_foreach() instead of print_tag().

https://bugzilla.gnome.org/show_bug.cgi?id=679550
2012-07-07 23:23:06 +01:00
Sebastian Dröge a9ee382e7a discoverer: Update for GstToc API changes 2012-07-05 12:29:00 +02:00
Tim-Philipp Müller 400511b71e gst-discoverer: print all entries for a certain tag
If there are multiple entries for a tag, print all of them
individually.
2012-05-26 19:53:50 +01:00
Tim-Philipp Müller d9adf02a5a gst-discoverer: don't use GstStructure API on tag lists 2012-05-26 19:50:46 +01:00
Anton Belka 42cb4bdf67 discoverer: Add TOC support to discoverer and add -c/--toc parameters to gst-discoverer utility 2012-05-21 08:52:05 +02:00
Sebastian Dröge 0ec452409f discoverer: Fix another GstBuffer occurence to GstSample 2012-04-17 18:22:24 +02:00
Sebastian Dröge c4f15da97f discoverer: Tags now contain GstSamples instead of GstBuffers 2012-04-17 17:32:01 +02:00
Sebastian Dröge 68c0790817 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/interfaces/propertyprobe.c
	sys/xvimage/xvimagesink.c
2012-01-25 11:50:54 +01:00
Mark Nauwelaerts 656423bd65 gst-discoverer: remove extraneous variable 2012-01-19 16:43:35 +01:00
Tim-Philipp Müller 576bbb4fd8 Remove compatibility code cruft for old GLib versions 2012-01-18 17:22:21 +00:00
Sebastian Dröge dc8984d76c Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/app/gstappsrc.c
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/video/videooverlay.c
	gst/playback/gstplaysink.c
	gst/playback/gststreamsynchronizer.c
	tests/check/Makefile.am
	win32/common/libgstvideo.def
2012-01-10 13:15:12 +01:00
Havard Graff 95be60de15 Fix various unlikely, but still potential memoryleaks in error code paths
https://bugzilla.gnome.org/show_bug.cgi?id=667311
2012-01-05 13:27:23 +00:00
Tim-Philipp Müller 19d17b8f24 tools: avoid unportable vararg macro construct in gst-discoverer
https://bugzilla.gnome.org/show_bug.cgi?id=667306
2012-01-05 12:23:08 +00:00
Tim-Philipp Müller fb6d09055a Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/alsa/gstalsadeviceprobe.c
	ext/alsa/gstalsamixer.c
	ext/pango/gsttextoverlay.c
	ext/pango/gsttextoverlay.h
	gst-libs/gst/audio/gstaudiobasesink.c
	gst-libs/gst/audio/gstaudioringbuffer.c
	gst-libs/gst/audio/gstaudiosrc.c
	gst-libs/gst/video/Makefile.am
	gst-libs/gst/video/video.c
	gst/encoding/gststreamcombiner.c
	gst/encoding/gststreamsplitter.c
	gst/playback/gstplaybasebin.c
	gst/playback/gststreamsynchronizer.c
	gst/playback/gstsubtitleoverlay.c
	gst/playback/gsturidecodebin.c
	sys/xvimage/xvimagesink.c
	tests/examples/Makefile.am
	win32/common/libgstvideo.def

Video overlay composition disabled for now, needs
porting to buffer meta.
2011-12-08 01:19:03 +00:00
Tim-Philipp Müller ff6cc8af82 tools, tests: g_thread_init() is deprecated in glib master
It's not needed any longer.
2011-12-04 17:16:36 +00:00
Wim Taymans e1287b97ab Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggmux.c
	gst-libs/gst/audio/audio.c
	gst-libs/gst/audio/audio.h
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/pbutils/Makefile.am
	gst-libs/gst/pbutils/gstdiscoverer.c
	gst/playback/gstplaysinkaudioconvert.c
	gst/playback/gstplaysinkvideoconvert.c
	win32/common/libgstaudio.def
2011-08-29 11:37:36 +02:00
Vincent Penquerc'h 921b92ce06 discoverer: retrieve audio track language from tags too
https://bugzilla.gnome.org/show_bug.cgi?id=657257
2011-08-26 10:05:51 +02:00
Vincent Penquerc'h 4b5bfb1fd4 discoverer: add subtitles API
https://bugzilla.gnome.org/show_bug.cgi?id=639055
2011-08-26 10:05:50 +02:00
Wim Taymans 04f74e5642 plugins: more porting 2011-03-28 10:20:06 +02:00
Stefan Kost 399f528a33 discoverer: handle desc==NULL
It would otherwise be printed as (null) and mess up indentation (no \n).
2011-02-22 16:43:08 +02:00
Edward Hervey fce99dc0be tools: Improve pretty-printing of tags
Avoids escaping strings for nothing and printing out useless buffer contents.
2011-01-06 08:48:04 +01:00
Edward Hervey b40c0b875c tools: don't leak the GMainLoop 2011-01-06 08:48:03 +01:00
Edward Hervey 2c84beebb2 gst-discoverer: show global tags by default 2010-12-19 13:45:01 +01:00
Stefan Kost 4e8956c9f1 discoverer: query seekability
Besides the duration we can also query the seekability of a stream. Use the new
API in the gst-discoverer tool.

API: gst_discoverer_info_get_seekable
2010-12-13 17:03:25 +02:00
Arun Raghavan d392994597 discoverer: Fix argument type to _container_info_get_streams()
No reason for gst_discoverer_container_info_get_streams() to not take a
GstDiscovererContainerInfo as its argument.
2010-11-08 11:44:22 +00:00
Stefan Kost 03eea2364a discoverer: rename boolean getters for consistency
Rename _get_is_image() to _is_image() and _get_interlaced() to _is_interlaced().

https://bugzilla.gnome.org/show_bug.cgi?id=633311
2010-10-30 14:50:21 +01:00
Tim-Philipp Müller 91d574c234 tools: update gst-discoverer tool for last-minute API change
https://bugzilla.gnome.org/show_bug.cgi?id=633311
2010-10-30 11:41:23 +01:00
Arun Raghavan f55529e8d0 gst-discoverer: The 'ready' signal was renamed to 'finished' 2010-10-04 18:16:50 +02:00