Commit graph

83 commits

Author SHA1 Message Date
Xavier Claessens
2efb4a7adb Meson: Use pkg-config generator 2020-10-23 11:14:18 -04:00
Guillaume Desmottes
b542b1c257 player: Add g_autoptr() support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1495>
2020-08-05 12:31:53 +02:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Askar Safin
c881e0a505 gst-player: fix bug with changing playback direction
Fix gst_event_new_seek call in gst-libs/gst/player/gstplayer.c

If rate >= 0.0, then previous code doesn't set end of segment. So, the end of segment
will be in place where previous seek put it. This is not neccesary end of media file
(in case of reverse playback). So if we play video backward for some time and then
switched to forward playing, we will get EOS somewhere in the middle of media file.
This commit always sets end of segment, thus fixing this bug
2019-09-04 15:19:39 +00:00
Thibault Saunier
47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Thibault Saunier
7fe3f36ac8 Minor documentation fixes 2019-05-13 11:36:27 -04:00
Sebastian Dröge
5b918e681d player: Fix various Since markers in the docs 2019-04-23 15:09:03 +03:00
Philippe Normand
b5af1b9f2e player: Logging fix for updated audio info
Bitrate was logged a second time instead of the max_bitrate.
2018-12-22 18:39:44 +01:00
Sebastian Dröge
a171f30ab1 player: Don't crash if playbin is not available but kill the process cleanly 2018-12-10 13:21:43 +02:00
Víctor Manuel Jáquez Leal
00acafc209 player: don't change uri when setting subtitle uri
https://bugzilla.gnome.org/show_bug.cgi?id=797362
2018-11-01 11:59:59 +01:00
Philippe Normand
de26abc88a player: API additions for subtitle-video-offset property
This new property contols the synchronisation offset between subtitles and video
in nanoseconds.

https://bugzilla.gnome.org/show_bug.cgi?id=797134
2018-11-01 09:52:57 +00:00
Sebastian Dröge
afbbc3a97e player: Don't set state to READY if we're already stopped
Otherwise setting an URI after creation will already set the state
to READY/buffering and disallow setting the configuration.

See https://github.com/servo/servo/issues/22010
2018-10-24 14:36:41 +01:00
Tim-Philipp Müller
96ac822b67 player: fix deprecated api declaration 2018-09-24 14:46:40 +01:00
Tim-Philipp Müller
b6411ae74c libs: fix API export/import and 'inconsistent linkage' on MSVC
For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

While we're at it, add new GST_API_EXPORT in config.h and use
that for GST_*_API decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 14:45:56 +01:00
Philippe Normand
d1ed94491e player: Set default position and duration value to GST_CLOCK_TIME_NONE
When the position query fails the returned value shall remain -1 instead of 0 to
avoid confusion on application side between error and beginning of media.

https://bugzilla.gnome.org/show_bug.cgi?id=797066
2018-09-03 12:11:42 +01:00
Nirbheek Chauhan
cea5e3fcdb meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:41:00 +05:30
Roland Jon
d5aabd0f58 player: Avoid trying to join the player thread from itself
https://bugzilla.gnome.org/show_bug.cgi?id=796731
2018-07-02 15:27:17 +03:00
Lyon Wang
92576e7db8 player: Fix duration-changed CRITICAL warning if duration did not actually change
Check if duration is changed before emitting duration-changed signal

https://bugzilla.gnome.org/show_bug.cgi?id=796491
2018-06-04 21:06:28 +03:00
Tim-Philipp Müller
fc9bdae8e2 player: GST_EXPORT -> GST_PLAYER_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 13:02:54 +00:00
Philippe Normand
0c14a92c28 player: doc update for set_subtitle_uri()
A call to this function without enabling the subtitle track has no effect.
2018-01-07 17:03:10 +00:00
Philippe Normand
13363f2388 player: transfer ownership of info properties
The previous code would emit GObject critical warnings when the info properties
are NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=791982
2017-12-27 15:28:44 +00:00
Sebastian Dröge
cc58bd6ae0 player: Fix-up set_seek_accurate() configuration to take a player config instead of a player instance 2017-12-16 10:44:26 +02:00
Sebastian Dröge
20c4dc25fb player: Consistently use GstVideoMultiviewFramePacking instead of Mode
The latter needs additional metadata, and the former was already used
everywhere except for the functions: in properties in playbin itself.
2017-12-16 10:23:41 +02:00
Havard Graff
22f0f11abf meson: remove vs_module_defs
The GST_EXPORT should handle it.
2017-10-05 13:57:48 +01:00
Rico Tzschichholz
4a60566999 meson: Fix namespace and add some missing args in the gir generation 2017-10-05 13:56:46 +01:00
Philippe Renon
085f875a24 player: introduce helper method to remove seek source
this incidentally fixes a missing g_source_destroy() call in _main()

https://bugzilla.gnome.org/show_bug.cgi?id=787727
2017-09-15 17:28:12 +03:00
Philippe Renon
9fce29497d player: remove duplicate state_ret check in play internal
https://bugzilla.gnome.org/show_bug.cgi?id=787727
2017-09-15 17:28:12 +03:00
Philippe Normand
8a29da8023 player: notify of media-info update after duration change
This is a follow-up of 98b0802a98

https://bugzilla.gnome.org/show_bug.cgi?id=786201
2017-08-15 09:38:55 +01:00
Philippe Normand
98b0802a98 player: propagate updated duration to media_info
https://bugzilla.gnome.org/show_bug.cgi?id=786201
2017-08-14 09:21:29 +01:00
Sebastian Dröge
4a45a01b5e player: Constify the config argument to gst_player_get_video_snapshot()
This structure is only ever read from.
2017-08-08 11:05:39 +03:00
Tim-Philipp Müller
ce8485a585 player: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Sebastian Dröge
634cd87c76 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +03:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Seungha Yang
e25da85a65 player: Make use of GstStreams API with playbin3
Allow use of playbin3 and GstStreams API by setting
the environment variable "GST_PLAYER_USE_PLAYBIN3"

https://bugzilla.gnome.org/show_bug.cgi?id=775487
2017-03-22 15:17:30 +02:00
Haihua Hu
79be2e8b7b player: Fix setting of external subtitle URI
gst_player_set_uri_internal shouldn't free suburi which maybe set
by user to load external subtitle before start play. It just need
reset playbin's subutri property to NULL no matter if there was a
previous one or not.

https://bugzilla.gnome.org/show_bug.cgi?id=779453
2017-03-09 10:31:45 +02:00
Thibault Saunier
cea4346d84 meson: Build GIR files 2017-01-23 12:48:53 -03:00
Lyon Wang
b22fec8293 player: Add support for selecting a specific video sink
- Add overlay video renderer "video-sink" property, so that can be set
- In create_video_sink, it returns video sink instead of always NULL
- Add new renderer_new_with_sink() API to set video sink

https://bugzilla.gnome.org/show_bug.cgi?id=776490
2017-01-17 13:14:59 +02:00
Sebastian Dröge
9bd99d3670 player: Add missing documentation for deprecated functions 2017-01-17 13:09:55 +02:00
Lyon Wang
2609aaa48b player: Add get video snapshot API
Add get video snapshot API:
  gst_player_get_video_snapshot()

https://bugzilla.gnome.org/show_bug.cgi?id=773709
2017-01-17 13:09:55 +02:00
Sebastian Dröge
19ddd9efd2 player: Add deprecated compatibility functions for the audio/video/subtitle stream getters 2016-12-21 11:38:11 +02:00
Sebastian Dröge
00f9a21cd2 player: Move audio/video/subtitle stream list getters into the correct namespace 2016-12-21 11:32:52 +02:00
Lyon Wang
9294dc4ac7 player: Add get track number media info API
https://bugzilla.gnome.org/show_bug.cgi?id=773570
2016-12-21 11:31:09 +02:00
Arun Raghavan
6a0d53b767 player: Don't try to cache the GQuark for GST_PLAYER_ERROR
This is potentially racy (in the unlikely scenario that we get two
first-time calls to gst_player_error_quark() at the same time). This
should not impact anything in terms of performance since it's only on
the error path.

The call itself could just be inlined by making GST_PLAYER_ERROR be
defined to the g_quark_from_static_string() call, but this feels ugly
from an API perspective.
2016-12-08 11:22:38 +05:30
Lyon Wang
8d41d816a2 player: Add configuration for enabling accurate seeks
https://bugzilla.gnome.org/show_bug.cgi?id=773521
2016-11-01 19:49:52 +02:00
Sebastian Dröge
8ba57fb4bd player: Cache duration and return cached duration
https://bugzilla.gnome.org/show_bug.cgi?id=771992
2016-11-01 19:36:40 +02:00
Sebastian Dröge
254db116a1 player: Remove Return documentation for function returning void 2016-09-30 13:42:06 +03:00
Sebastian Dröge
fa31ea7ac3 player: Only report the initial duration if the query was successful 2016-09-26 13:26:36 +03:00
Sebastian Dröge
ac6e2af62d player: Remove some leftovers from external GstPlayer 2016-09-17 17:08:22 -04:00