1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-11 06:21:30 +02:00
Commit Graph

176 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
80d88b05f2 Mark unreachable code on GCC even if NDEBUG
This might suppress some warnings (and very slightly reduce code size)
when assertions are disabled. Not that I particularly like to create
VLC-specific macros.
2015-02-18 17:52:52 +02:00
Rémi Denis-Courmont
5c16983be8 lib: remove unused GCC-ism macro 2015-02-09 21:12:40 +02:00
Rémi Denis-Courmont
dbe58b27d3 libvlc: fix small race 2015-02-08 16:35:55 +02:00
Rémi Denis-Courmont
65ebc4b51a libvlc: go to libvlc_Ended rather than libvlc_Stopped at EOS
This is what the tests expect, and was the final status before the
merge of ABORT and DEAD input events.

In fact, libvlc_Stopped does not really correspond to anything: it has
no STOPPED_S equivalent in the input thread state. The only way to
reach it is to call libvlc_media_player_stop() explicitly.
Regardless, lets keep it for backward compatibility.
2015-02-08 16:35:55 +02:00
Rémi Denis-Courmont
4ea6b96bce libvlc: provide file name and line number 2015-02-08 14:57:17 +02:00
Rémi Denis-Courmont
acb7470b52 input: remove useless parameter to input_Stop() 2015-02-05 22:40:42 +02:00
Rémi Denis-Courmont
bdcdf97054 input: merge ABORT and DEAD events 2015-02-05 22:30:36 +02:00
Thomas Guillem
f7da3d84c9 lib/media: fix MediaListEndReached not sent when media doesn't have sub items
MediaListEndReached event should not be sent only when a new sub item tree is
added, otherwise it won't be sent if media doesn't have any sub items.

To fix this issue, send the MediaListEndReached event when preparse function
terminates (only if the media_list was created either by user or by sub items
callbacks).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-02-04 15:04:24 +01:00
Mark Lee
a60b897e11 lib: add libvlc_audio_output_device_get()
This function gets the active device identifier for the current
audio output, if there is one, and is the complementary function
to libvlc_audio_output_device_set().

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-28 00:01:39 +01:00
Thomas Guillem
2bf94c2512 libvlc: add libvlc_media_parse_with_options
Extended version of libvlc_media_parse_async. It uses a flag to specify parse
options and returns an int for error handling.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-20 11:20:28 +01:00
Thomas Guillem
1723d7e97f libvlc: add libvlc_MediaListEndReached event
Expose an event to libvlc users which allows them to get notified when a media
list reached the end. That is, when the media list is attached to a media
(subitems) that completed a parsing. Or when the media list is attached to a
media discovery that stopped.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-20 11:20:28 +01:00
Thomas Guillem
bcb1b3bd53 libvlc: media_list: don't set media if readonly
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-20 11:20:27 +01:00
Thomas Guillem
16565d4c04 libvlc: media: fix leak if it has subitems
Don't call libvlc_media_list_set_media from media since it causes
p_md->p_subitems to retain p_md while p_md is already retaining
p_md->p_subitems, therefore these 2 objects won't be releasable.

Add a new internal variable: p_internal_md that is set from media without
retaining it.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-20 11:20:27 +01:00
Thomas Guillem
841460febe libvlc: media: lock media_list
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-01-20 08:17:18 +02:00
Thomas Guillem
9b2f91fa25 libvlc: media: set sub_items readonly
media's sub_items should be only writable by media.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-01-20 08:17:18 +02:00
Thomas Guillem
75fe4eafff libvlc: libvlc_media_subitems: lock and always return a medialist
This way, libvlc_media_subitems can be called before, during or after a
parsing. Furthermore, this allows to attach media_list events before
libvlc_media_parse is called.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-01-20 08:17:18 +02:00
Thomas Guillem
9b2c414cc6 libvlc: don't use functions with leading underscore
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2015-01-20 08:17:18 +02:00
Rémi Denis-Courmont
9d30c4c56a libvlc: missing NULL terminator (fixes #13655) 2015-01-15 21:32:27 +02:00
Rémi Denis-Courmont
950645c061 libvlc: fix vbi-page initialization without zvbi plugin
A variable cannot be inherited if it is not a configuration item.
Note this only avoids generating an error; VBI cannot work without the
plugin anyway.
2015-01-15 21:24:10 +02:00
Thomas Guillem
7458af47e6 libvlc: add libvlc_media_get_codec_description
Get codec description from media elementary stream.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-13 23:28:17 +01:00
Thomas Guillem
fa7924acb3 lib: change libvlc_media_discoverer_t creation
libvlc_media_discoverer_new_from_name was creating a services_discovery_t and
was starting it, so libvlc_MediaDiscovererStarted event (or any other events)
could not be received.

To fix that, Split libvlc_media_discoverer_new_from_name into
libvlc_media_discoverer_new and libvlc_media_discoverer_start. That way, we can
attach events between create and start.

libvlc_media_discoverer_new_from_name is now deprecated, but it still works
like before.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-01-13 23:28:17 +01:00
Thomas Guillem
89b679a3fc libvlc_media_list: missing vlc_mutex_destroy
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-12-29 22:29:37 +01:00
Ludovic Fauvet
d4ccd7a5b4 Fix broken NowPlaying (close #9960, #11796, #12850)
Prevent the es_out from overriding the NowPlaying state by splitting
the meta into NowPlaying and ESNowPlaying.

The function input_item_GetNowPlayingFb can be used to return the
preferred meta value.
2014-12-18 11:27:25 +01:00
Felix Paul Kühne
8d48e95e9f lib/media player: inherit vbi-page to achieve correct variable value on first use 2014-12-09 22:13:36 +01:00
Uwe L. Korn
dae78cbb0e input: Add support for DiscNumber meta
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-12-08 12:14:04 +01:00
Uwe L. Korn
ff555c6df9 input: Add support for AlbumArtist meta
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-11-23 00:11:45 +01:00
Jean-Baptiste Kempf
67e74ed283 lib: use app-icon-name for libvlc_set_app_id 2014-11-01 13:45:38 +01:00
Hugo Beauzée-Luyssen
f74f2334bb libvlc: Remove duplicated forward declaration 2014-10-24 17:11:47 +02:00
Rémi Denis-Courmont
32486e651c variables: remove VLC_VAR_GETLIST (same as VLC_VAR_GETCHOICES) 2014-10-23 22:11:49 +03:00
Rémi Denis-Courmont
8cffc346ab lib: use "zoom" rather than "scale" (like interfaces) 2014-10-23 21:06:26 +03:00
Jean-Baptiste Kempf
417b6eb0f0 Win32: prefer the static libraries when creating the dlls
This should avoid the issues of packaging libgcc_s_sjlj-1.dll,
libwinpthread-1.dll and the like.
2014-10-13 09:16:24 +02:00
KO Myung-Hun
863f851833 Add -avoid-version to LDFLAGS of vlc and vlccore on OS/2
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2014-10-12 20:17:15 +03:00
Rémi Denis-Courmont
86796e2a57 lib: disable decoding hardware acceleration with vmem
This ensures that subpictures blending works, and avoids copying back
video frames from GPU to CPU. For proper hardware acceleration,
use libvlc_media_player_set_xwindow() instead.
2014-10-11 14:41:13 +03:00
Igor Prokopenkov
fd4a0ba834 lib: Fire libvlc_MediaListPlayerPlayed at end of playlist
The "libvlc_MediaListPlayerPlayed" event was defined but unused.
It is now fired when libvlc_media_list_player is played until last item in the playlist

Signed-off-by: Igor Prokopenkov <cmyk777@gmail.com>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-10-06 10:55:22 +02:00
Rémi Denis-Courmont
3674097b8f lib: unused variable 2014-09-21 11:39:53 +03:00
Rémi Denis-Courmont
6226ab4687 lib: fix shadowing and wrong variable type
asprintf() returns an int, not a char *.
2014-09-21 11:39:53 +03:00
Rémi Denis-Courmont
805cffa8d1 log: fix theoretical pointer alignment problem 2014-08-20 21:02:45 +03:00
Rémi Denis-Courmont
94ca70d4d3 adjust: convert hue from [0..360] integer to [-180..+180] float 2014-08-19 21:55:59 +03:00
Rémi Denis-Courmont
30838535ef lib: allow setting float variables as integers
Just convert to/from float on the fly. That enables backward compatibility
for setting/getting adjust hue as an interger (next commit).
2014-08-19 21:45:17 +03:00
Rémi Denis-Courmont
6e3efa2376 Copy libtool library versions from 2.2.0 2014-08-17 10:32:19 +03:00
Rémi Denis-Courmont
1e68f58eb1 media_player: do not wait for input to stop when pausing (fixes #11767)
This lead to a deadlock when attempting to pause an input that did not
support pausing.
2014-08-15 21:47:44 +03:00
Felix Abecassis
710ad7ed78 libvlc: add 3 libvlc events: MediaPlayerESAdded, MediaPlayerESDeleted, MediaPlayerESSelected 2014-08-04 12:09:36 +02:00
Felix Abecassis
4a170b9ad3 libvlc: add error checking after calling var_Change
Previously, if var_Change failed (e.g. with VLC_ENOVAR), an
uninitialized value was returned.
2014-07-07 12:53:49 +02:00
Adrien Maglo
f987413453 lib: fix typos in libvlc_media_player_set_equalizer
This commit repairs the libvlc equalizer API.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2014-06-18 19:37:39 +03:00
Rémi Denis-Courmont
b9b9d7fe3e lib: fix object reference leak, fix test suite 2014-06-08 20:04:08 +03:00
Mark Lee
c6b8b1b502 lib: use explicit array initialisation syntax for position table
Also use unsigned char rather than int as the type

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2014-05-24 20:37:37 +08:00
Mark Lee
dadda22941 lib: map the position enum to the correct subpicture alignment bitmasks
libvlc_media_player_set_video_title_display() was wrongly using the
enum value directly, leading to the video title appearing in the wrong
position for some values

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2014-05-24 18:25:17 +08:00
Rémi Denis-Courmont
0e63a3fc83 lib: enable/disable the equalizer as needed, simplify 2014-05-24 12:55:30 +08:00
Rémi Denis-Courmont
bccf8c0018 lib: fix logic inversion 2014-05-20 19:10:22 +08:00
Rémi Denis-Courmont
6e96d8a915 lib: check scale range in libvlc_video_set_scale() 2014-05-20 19:10:22 +08:00