Commit graph

222 commits

Author SHA1 Message Date
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
Christoph Reiter
b163f373c3 meson: install the man pages for the command line tools
https://bugzilla.gnome.org/show_bug.cgi?id=796274
2018-05-20 13:29:30 +01: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
Antonio Ospite
cfc1be0d61 tools: play: fix leaving STDIN in non-blocking mode after exit
gst-play-1.0 sets STDIN to non-blocking mode to have the input
characters read as soon as they arrive.

However, when gst_play_kb_set_key_handler() gets called from
restore_terminal() it forgets to restore the STDIN blocking status.

This can result in broken behavior for cli command executed in the same
terminal after gst-play-1.0 exited.

It turns out that putting STDIN in non-blocking mode is not even the
proper way to achieve the desired effect, instead VMIN and VTIME in
struct termios should be set to 0.

Let's do that, and don't mess with the STDIN blocking mode now that it's
not necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=794591
2018-03-26 11:59:56 +01:00
Edward Hervey
3de5fd4342 gst-play: Prevent disabling all streams
This would have bad effects :)
2017-10-27 09:51:29 +02:00
Seungha Yang
a8e05cc9cc gst-play: Support track change on playbin3
* playbin3 does not support {current,n}-{audio,video,text}
properties, and they were replaced by GstStreams API.
So, GstStreams API and select-stream event should be used
for track change in case of playbin3.
see also https://bugzilla.gnome.org/show_bug.cgi?id=769079

* By using commend line option "--use-playbin3", gst-play will
use playbin3 regardless of "USE_PLAYBIN" env variable.

https://bugzilla.gnome.org/show_bug.cgi?id=775469
2017-10-27 09:45:39 +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
Olivier Crête
41c1064f5f tools: gst-device-monitor: Print gst-launch example
Print a gst-launch-1.0 line that could get to this device,
useful as we don't have other ways to see what it does exactly.
This may not work if the create element has configurations other than
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=781152
2017-04-11 14:27:59 -04:00
Tim-Philipp Müller
a1085c3b1f tools: gst-play: improve verbose output of property notifications
Use new message notify API and print caps and taglists in a nicer
to read way, just like gst-launch-1.0 does nowadays, without
escaping everything three times.
2017-03-07 00:25:03 +00:00
Nicolas Dechesne
7c0c59ccdf tools: gst-play: set GST_GL_XINITHREADS
This ensure that XInitThreads is called and so gl contexts are properly
initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=776403
2016-12-23 12:18:10 +02:00
Tim-Philipp Müller
c90f18994c tools: gst-play: cycle between video tracks without disabling video 2016-09-04 16:04:00 +01: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
Jan Schmidt
657a9c23d6 gst-play: Allow disabling audio/video/subtitle tracks
When cycling through tracks, add 'disable' to the set
of states.
2016-07-15 22:51:35 +10:00
Guillaume Desmottes
a3c47a0754 tools: fix device leaks in gst-device-monitor
gst_message_parse_device_{added,removed} is actually returning a new ref
on the device.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 12:58:53 +01:00
Guillaume Desmottes
ef1a99d4d8 gst-play: call gst_deinit()
So we can use gst-play to track memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=765216
2016-04-18 11:36:39 -04:00
Vincent Penquerc'h
509d4a0f92 gst-play: remove peculiar setting of invalid -v property 2016-03-04 13:10:49 +00:00
Tim-Philipp Müller
a153804566 tools: gst-play: add 'n' and 'b' as additional shortcuts for next/previous item
< and > are composed with shift + something else on many keyboards
layouts, so don't work well when injecting them via windowing systems
which will send them as shift key press and separate other key, and
we the don't combine that to < or > properly. n/b are easier.
2016-02-25 23:16:22 +00:00
Tim-Philipp Müller
4f5a263381 tools: gst-play: allow setting of flags in serialized foo+bar format
https://bugzilla.gnome.org/show_bug.cgi?id=751901
2016-01-18 19:21:52 +00:00
Hugues Fruchet
1c72c6ddce tools: gst-play: add command line options for verbose output and playbin flags
https://bugzilla.gnome.org/show_bug.cgi?id=751901
2016-01-18 19:21:52 +00:00
Nirbheek Chauhan
bc90841c7d gst-device-monitor: Use g_printerr instead of g_error
g_error is meant to be used for programmer errors (causes an abort),
not for expected runtime errors.
2016-01-14 17:51:13 +00:00
Tim-Philipp Müller
f2ecf85103 tools: gst-device-monitor: print uint properties in both decimal and hex
Some values are easier to read and make sense of in hex.

https://bugzilla.gnome.org//show_bug.cgi?id=759780
2015-12-29 11:29:31 +00:00
Tim-Philipp Müller
69d3b098a2 tools: gst-device-monitor: print non-string device properties too 2015-12-26 11:43:22 +00:00
Nirbheek Chauhan
49e71afe7b tools: gst-device-monitor: fix two memory leaks
The removed GList link needs to be freed too, and
the G_OPTION_REMAINING arguments need to be freed.
2015-10-28 18:56:03 +00:00
Vivia Nikolaidou
476dff826e gst-play: Removed erroneous comment
The "fall through" comment was wrong. Removed.

https://bugzilla.gnome.org/show_bug.cgi?id=755440
2015-10-02 17:28:27 +03:00
Vivia Nikolaidou
2528a5bbd8 gst-play: Add keyboard shortcut '0' to seek to beginning
https://bugzilla.gnome.org/show_bug.cgi?id=755440
2015-10-02 17:28:24 +03: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
Vivia Nikolaidou
cca823b490 tools: gst-play: Use g_build_filename instead of g_strconcat
When running gst-play against a directory name, and suffix the path with a
directory separator (e.g. tab completion), gst-play was printing two directory
separators in a row. g_build_filename fixes this, and additionally allows for
both '/' and '\' as separators on Windows.
2015-08-18 15:19:03 +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
Tim-Philipp Müller
2b0e71f4de tools: gst-play: seek at least in steps of a second
In case of very short files we might end up seeking in
steps of a fraction of a second, which is silly and gives
the impression that seeking doesn't actually work. Make
minimum seek step a second instead.
2015-07-24 10:15:21 +01:00
Tim-Philipp Müller
e2d8eabb3d tools: gst-device-monitor: fix props leak
CID 1311942
2015-07-16 10:54:29 +01:00
Wim Taymans
eddf604e66 device-monitor: print device properties 2015-07-15 18:22:28 +02:00
Vineeth TM
9efa9dfcc8 gst-play: fix memory leak
In gst-play, for GST_MESSAGE_ELEMENT bus message,
event is being allocated through
gst_navigation_message_parse_event, but not freed.

https://bugzilla.gnome.org/show_bug.cgi?id=752040
2015-07-07 09:26:03 +01:00
Vineeth T M
eec791a37f tools: gst-play: fix seeking issue
For positive seeking segment.stop value will be -1,
when we change rate to -1, then the stop value will be udpated
with the current position. And then again if we change rate to 1,
the segment.stop value does not get updated and remains as position
where we last changed rate to -1. Hence playback stops at that point.
In case of positive rates, call gst_element_new_seek with correct values

https://bugzilla.gnome.org/show_bug.cgi?id=751213
2015-06-19 10:09:24 -04:00
Tim-Philipp Müller
247a6aab9a tools: gst-play: error out instead of crashing if there's no playbin element 2015-06-16 22:32:49 +01:00
Vivia Nikolaidou
0aacd7f393 tools: gst-play: don't print 64 whitespaces next to the time indication
Printing 64 whitespaces to erase the "Paused" message (after \r) would make
it wrap to the next line on shorter terminals. Instead we only print the
amount of spaces needed. Also mark the "Paused" string for translation
while we're at it.
2015-06-09 20:08:15 +01:00
Tim-Philipp Müller
6ed7ea73cf tools: gst-play: add shortcuts to switch audio/subtitle/video tracks 2015-06-09 10:20:58 +01:00
Vivia Nikolaidou
4fdbe215dc tools: gst-play: sort directory entries
When adding a directory to the playlist, the order would be whatever
g_dir_read_name returned. Sorting these using natural sort order.

https://bugzilla.gnome.org/show_bug.cgi?id=750585
2015-06-08 20:25:40 +01:00
Luis de Bethencourt
22302db7fc tools: gst-play: remove unnecessary variable
The second assignment of sret is never used. We can remove the first assignment
and use the value directly instead.
2015-05-30 15:34:57 +01:00
Tim-Philipp Müller
83463b2061 tools: gst-play: keep configured playback rate and trick mode when seeking
Instead of resetting rate to 1.0
2015-05-24 18:58:51 +01:00
Tim-Philipp Müller
c7893ef59f tools: gst-play: mark more strings for translation 2015-05-24 18:46:21 +01:00
danny song
bd35bf5933 tools: gst-play: add keyboard shortcut help
https://bugzilla.gnome.org/show_bug.cgi?id=749740
2015-05-24 16:12:04 +01:00
Tim-Philipp Müller
b74d4f972a tools: gst-play: enable interative mode by default
And change --interactive option to --no-interactive.
2015-05-21 12:38:53 +01:00
Tim-Philipp Müller
5a8d1d2246 gst-play: add some more key navigation mappings
And don't feed multi-character key descriptors to the
event handler, it won't be what it expects.
2015-04-29 15:47:46 +01:00
Edward Hervey
bba3f57c8b tools: Add mouse/keyboard handling from messages
Allows the user to control playback with the window in focus

https://bugzilla.gnome.org/show_bug.cgi?id=747245
2015-04-29 15:47:49 +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
12ed0428a9 gst-play: fix compiler warning
‘return’ with no value, in function returning non-void
2015-02-28 13:31:41 +00:00
Tim-Philipp Müller
0e9dac0cc7 gst-play: add keyboard shortcut to cycle through trick modes
Make "t" activate trick modes and cycle through the various
modes.
2015-02-28 13:11:45 +00:00
Tim-Philipp Müller
a257fcf366 gst-play: fix indentation
Prevent gst-indent from messing up indentation, it
really doesn't like the G_GNUC_PRINTF thing here.
2015-02-28 11:37:27 +00:00