Commit graph

88 commits

Author SHA1 Message Date
Seungha Yang
61d200a957 Port to gst_print* family
g_print* would print broken string on Windows
See also https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/258

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/20>
2020-07-27 16:28:33 +09:00
Nirbheek Chauhan
3f54c90b7a meson: gtk player example is optional 2019-09-10 08:34:43 +00:00
Matthew Waters
1ead809fca build: add meson fallbacks for use in gst-build 2019-06-11 16:55:57 +10:00
Matthew Waters
28fdf37d17 run gst-indent over c files 2019-03-26 16:09:29 +11:00
Philippe Normand
d23171fbdf gtk-play: fix deprecation warnings 2017-08-08 12:01:34 +03:00
Víctor Manuel Jáquez Leal
d909deaaf4 playback/player: gtk_menu_popup() is deprecated
gtk_menu_popup() is deprecated in GTK+ 3.22. This patch adds a
compiler guard to use gtk_menu_popup at pointer() if GTK+ is 3.22
or bigger.

https://bugzilla.gnome.org/show_bug.cgi?id=781904
2017-05-02 14:11:30 +03:00
Víctor Manuel Jáquez Leal
dbb0375bfe playback/player: don't unref a contained widget
In the GTK+ model, when a wiget is created, it is floating, thus
when it is added to a widget container, this container is the owner
of the widget.

The video_area widget is created in two different paths:

1\ when the renderer element is also a GTK+ widget and we are
   the owners.
2\ when the renderer element is an overlay an video area a new
   widget owned by the container.

In the first code path, there was a memory leak fixed on commit
f8d4796a, but it didn't consider the second path, leading to a
segmentation fault because the owner of the widget is not us.

This patch unrefs early the video area widget in the first path
avoiding to unref it twice in the second path.

https://bugzilla.gnome.org/show_bug.cgi?id=781904
2017-05-02 14:11:30 +03:00
Víctor Manuel Jáquez Leal
ff1a6546da playback/player: don't unref gtk_sink but sink it
Commit 5b8ba60c was added because of a memory leak when gtksink was
used as renderer. Nonetheless the patch didn't consider two facts:

1\ that the gtk_sink element was in floating state
2\ there is another code path where the gtk_sink element is already
   sank

Thus the correct fix, is not to ref and unref gtk_sink, but sink it.

https://bugzilla.gnome.org/show_bug.cgi?id=781904
2017-05-02 14:11:30 +03:00
Sebastian Dröge
fc41dd802f Add meson build system for playback/player/{gst-play,gtk} and network/http-launch 2016-08-26 19:02:24 +03:00
Sebastian Dröge
f6cf0dd997 playback/player: gtk: Remove unused variable 2016-08-23 23:48:26 +03:00
Sebastian Dröge
d30c65f9f8 playback/player: Block value-changed signal when playing an URI to prevent spurious seeks 2016-08-23 19:02:53 +03:00
Sebastian Dröge
1d760d92ed playback/player: gtk: Block value-change signal handler while updating the range of the seekbar too
I.e. when updating the duration. Changing the range might also change the
value, which would then trigger a seek.
2016-08-22 16:19:59 +03:00
Sebastian Dröge
89c74b3dd8 playback/player: gtk: Use GQueue instead of g_list_append() or the prepend-reverse trick 2016-08-18 15:48:57 +03:00
Maxin B. John
e82333ab70 playback/player: gtk-play: provide similar behaviour for quit and close
In x86 targets, gtk-play just pause rather than quitting the application
when we click the close button (delete-event). Change the callback function
to get similar behaviour when we click on "Quit" menu option.
2016-08-08 11:43:32 +02:00
Guillaume Desmottes
f8d4796a57 playback/player: gtk: fix widget leak
The ref returned by gst_player_gtk_video_renderer_get_widget() was never
released.
2016-07-21 20:34:40 +03:00
Guillaume Desmottes
5b8ba60c46 playback/player: gtk: fix gtkglsink leak
The ref returned by gst_element_factory_make() was leaked.
2016-07-21 20:34:40 +03:00
Guillaume Desmottes
10dd3a2177 playback/player: Call gst_deinit() in all applications at the end of main()
Needed to be able to track leaks using valgrind or the leaks tracer.
2016-07-21 20:32:43 +03:00
Mariusz Wasak
edc4734383 playback/player: Changing icons names to make it visible on gtk player
Fixes https://github.com/sdroege/gst-player/pull/150
2016-03-22 18:30:27 +02:00
Mariusz Wasak
b46d26b81f playback/player: gtk: Change True to glib TRUE to make gtk player project compile
https://github.com/sdroege/gst-player/pull/149
2016-03-16 17:12:34 +02:00
Sebastian Dröge
f509043c1d playback/player: player: Build against GstPlayer version from gst-plugins-bad everywhere
The old version with everything included and buildable against GStreamer 1.6
can still be found in the gst-player-0.1 branch and will be continued to be
updated for a while.
2016-01-04 10:21:21 +02:00
Sebastian Dröge
addb63586b playback/player: player: Remove gst_player_new() and make gst_player_new_full() the normal constructor
In very few cases the simple version was actually needed and having the
parameters hidden by a _full() version caused application that actually needed
it to not use it.
2016-01-04 09:59:40 +02:00
Sebastian Dröge
171c723592 playback/player: gtk: Remove double assignment of a variable 2015-11-09 21:35:57 +01:00
Justin Kim
6cc6793d1f playback/player: gtk-play: change print format of guint64
guint64 type usually corresponds with 'G_GUINT64_FORMAT'.
2015-11-05 08:31:42 +01:00
Sebastian Dröge
15d62dcfe6 playback/player: gtk-play: Run gst-indent 2015-09-21 14:20:24 +02:00
Hyunjun Ko
5903c7cd5e playback/player: gtk-play: change to use valid macro function 2015-09-17 15:45:24 +02:00
Jimmy Ohn
4dcc43b935 playback/player: gtk-play: Modify switch statement in stream_info_get_string
In stream_info_get_string function, buffer variable is used
all switch case repeatedly. Also, return used in switch statement.
So, I have modified that cases.
2015-09-15 17:49:22 +02:00
Sebastian Dröge
b5c10865aa playback/player: gtk-play: Add compiler warning flags to the build and fix the warnings 2015-09-04 18:11:25 +03:00
Alexandre Moreno
6e9e9228bd playback/player: gtk-play: Remove unused variable 2015-09-01 21:45:50 +03:00
Sebastian Dröge
a8f8d1b032 playback/player: player: Refactor video rendering API
There's a GstPlayerVideoRenderer interface now, which defines how video
rendering happens in GstPlayer. Included is an implementation for the
GstVideoOverlay interface, and inside the GTK example application one for
gtksink/gtkglsink.
2015-08-14 17:13:39 +02:00
Sebastian Dröge
6ed6b58929 playback/player: player: Abstract the signal emission dispatching to a new interface
This allows to implement signal dispatching to other event loop systems than
GLib without having direct GLib support in the base GstPlayer class. A
implementation for the GLib main context is provided and used in the
applications and tests.
2015-08-12 18:13:31 +02:00
Sebastian Dröge
f68bac6318 playback/player: gtk-play: Fix indention 2015-07-30 15:54:26 +03:00
Brijesh Singh
7a874938a0 playback/player: gtk-play: if title is NULL then use uri basename in toolbar label
If stream title is not available in the stream then use file basename in
toolbar title label and full uri in window title bar.
2015-07-30 15:54:16 +03:00
Brijesh Singh
a18cefb73c playback/player: gtk-play: fix elapsed and remain time label
If elapsed or remain time is greater than 60 mins then add hours in
label text.
2015-07-30 15:54:16 +03:00
Víctor Manuel Jáquez Leal
a8bb7e0199 playback/player: gtk-play: handle keys
Add a mplayer alike key-binding.
2015-07-26 19:51:36 +03:00
Víctor Manuel Jáquez Leal
64a73ff36b playback/player: gtk-play: remove unused callback 2015-07-20 20:31:45 +03:00
Víctor Manuel Jáquez Leal
0a38d36996 playback/player: gtk-play: remove unused variables 2015-07-20 20:31:45 +03:00
Brijesh Singh
b59a893da7 playback/player: gtk-play: add support to build UI through gtkbuilder
- build toolbar ui from glade generated xml files
- build media info dialog from glade generated xml files
- add support to apply css style on widget
- multiple cleanups
2015-07-07 23:49:09 +03:00
Sebastian Dröge
cce3ab6381 playback/player: gtk-play: Add close button to the playback speed dialog 2015-06-16 09:54:25 +02:00
Brijesh Singh
efd3c03ab2 playback/player: gtk-play: add playback rate control menu item 2015-06-16 09:52:18 +02:00
Sebastian Dröge
3afafa30c6 playback/player: gtk: Also use gtksink if available 2015-06-15 20:55:29 +02:00
Víctor Manuel Jáquez Leal
ba1ea11823 playback/player: gtk-play: remove unused variables 2015-06-11 20:11:31 +02:00
Sebastian Dröge
40e21cea24 playback/player: gtk: Inhibit the screen saver when playing something 2015-06-11 18:52:12 +02:00
Sebastian Dröge
b5e35ad70b playback/player: gtk: Port to GtkApplication
And also clean up some other things.

https://github.com/sdroege/gst-player/issues/56
2015-06-11 18:42:38 +02:00
Sebastian Dröge
362b5ce2a5 playback/player: gtk: Remove redundant code 2015-06-11 16:25:49 +02:00
Sebastian Dröge
78142bf4ea playback/player: gtk: Use gtkglsink if available 2015-06-11 15:12:56 +02:00
Brijesh Singh
2a2c10ac25 playback/player: gtk-play: use volume-changed signal from player to update the volume slider. 2015-06-11 14:32:25 +02:00
Víctor Manuel Jáquez Leal
80eefca0d1 playback/player: gtk-play: color balance dialog 2015-06-11 14:27:38 +02:00
Sebastian Dröge
b647f6858a playback/player: gtk: Only go to PLAYING with the next file if we were in PLAYING state before
Otherwise setting a subtitle URI in PAUSED will automatically go to PLAYING.
2015-06-11 13:09:25 +02:00
Víctor Manuel Jáquez Leal
91379afe55 playback/player: gtk-play: remove unused variables 2015-06-10 22:38:35 +02:00
Víctor Manuel Jáquez Leal
ddc42da7fe playback/player: gtk-play: destroy dialog's parent window 2015-06-10 22:38:09 +02:00