1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-16 16:02:54 +02:00
Commit Graph

212 Commits

Author SHA1 Message Date
Pierre d'Herbemont
5539b7b79c playlist: b_cant_sleep is private. 2008-09-28 17:10:00 +02:00
Pierre d'Herbemont
09995291a6 playlist: b_auto_preparse is private. 2008-09-28 17:09:59 +02:00
Pierre d'Herbemont
11c77e0823 playlist: b_doing_ml doing ml is private. 2008-09-28 17:09:59 +02:00
Pierre d'Herbemont
1df015beff playlist: b_tree is private. 2008-09-28 17:09:59 +02:00
Pierre d'Herbemont
35506f4d2f playlist: items_to_delete is now private. 2008-09-27 19:18:20 +02:00
Pierre d'Herbemont
d228fdd28e playlist: Move more members as private. 2008-09-27 19:12:39 +02:00
Antoine Cellerier
ba6501f308 s/pl_Yield/pl_Hold/ 2008-09-20 22:28:40 +02:00
Antoine Cellerier
2bde17e157 Add URI column to Qt4 playlist. Add sorting by URI in playlist core. 2008-09-18 19:42:58 +02:00
Rémi Denis-Courmont
e3f0531d93 Playlist: put private data after public data 2008-09-14 12:35:42 +03:00
Pierre d'Herbemont
bad878b521 playlist: Fetcher and parser are playlist private. 2008-08-31 10:38:56 +02:00
Pierre d'Herbemont
d11fd0d1e5 codecleanup: Replace input_Item by input_item. 2008-08-15 00:32:07 +02:00
Pierre d'Herbemont
902cddda86 vlc_playlist.h: Correct type for request status. (Fix a warning too). 2008-08-13 00:57:24 +02:00
Rémi Denis-Courmont
c0f4bfc5d8 Headers: use non-reserved identifiers for multi-inclusion protection 2008-08-11 19:34:48 +03:00
Laurent Aimar
91c1edba6d Removed an unused lock.
Fixed a playlist race condition on input events.

The playlist was loosing state events from input. And thus it may not
always be able to detect (by itself) the end of a stream (It happens
easily with small playlist files).
2008-07-28 23:35:02 +02:00
Pierre d'Herbemont
1f293c2049 playlist: Never delete the playlist_item directly. We don't know who might need it.
We need to rework modules/playlist and implement refcounting or proper id management.
2008-07-22 21:26:20 +02:00
Pierre d'Herbemont
d057b0df8d playlist: playlist_NodeAddInput was noted as deprecated in docs, remove it from exported symbols. 2008-07-19 12:57:20 +02:00
Pierre d'Herbemont
0a1480ee6d playlist: playlist_DeleteFromInputInParent wasn't used by modules, don't export it. 2008-07-19 12:57:20 +02:00
Pierre d'Herbemont
587f46a9b5 playlist: playlist_DeleteInputInParent->playlist_DeleteFromInputInParent to match playlist_DeleteFromInput. 2008-07-19 12:57:20 +02:00
Pierre d'Herbemont
71becfcced playlist: Use pl_Locked in vlc_playlist.h. 2008-07-15 19:41:43 +02:00
Pierre d'Herbemont
8b6e26a823 playlist: Defines pl_Locked, pl_Locked to pass to as b_locked. 2008-07-15 19:34:03 +02:00
Pierre d'Herbemont
81b983e85e playlist: Don't export playlist_ItemNewFromInput as it is not used, and don't use pl_Yield from here. 2008-07-13 23:58:59 +02:00
Pierre d'Herbemont
1c10df82d7 playlist: Defines a small helper to directly access current input. 2008-07-13 16:17:54 +02:00
Pierre d'Herbemont
ab915f9988 macosx: Define playlist_IsStopped(), and make sure it returns the very next state. Fix #1674. (Hitting the button stop on Mac OS X interface doesn't close the vout window.) 2008-07-07 00:06:21 +02:00
Pierre d'Herbemont
d90d8b7da2 playlist: Define playlist_CurrentInput(), that returns current playing input. 2008-07-05 15:50:01 +02:00
Jean-Paul Saman
ef7ff281ab Add playlist_CurrentId() to get the playlist item id from the currently playing item. 2008-06-14 10:09:06 +02:00
Rémi Denis-Courmont
fbb8255dcf Remove __LIBVLC__ test 2008-06-06 19:07:55 +03:00
Rémi Denis-Courmont
2f1752dd6c Playlist stuff belong in vlc_playlist.h 2008-05-31 21:27:28 +03:00
Rémi Denis-Courmont
82921f3c8d Remove p_playlist from p_libvlc
Plugins are already using pl_Yield to get the playlist, as they should.
2008-05-07 22:26:56 +03:00
Rémi Denis-Courmont
d3d776685b Remove pl_Get. This endorsed unyielded playlist access. 2008-05-07 21:38:43 +03:00
Rafaël Carré
722ab9f14e playlist-tree has only 2 meaningful values now 2008-04-22 19:51:49 +02:00
Rafaël Carré
04cfbc32da Remove unused i_enabled member from the playlist struct 2008-04-17 00:31:17 +02:00
Rafaël Carré
53b281b4b3 Do not put a private function in a public header 2008-04-17 00:23:24 +02:00
Pierre d'Herbemont
449fd28aaf Replace vlc_bool_t by bool, VLC_TRUE by true and VLC_FALSE by false.
This improves readability a lot and prevent us from reinventing the wheel.
2008-04-14 02:02:22 +02:00
Rémi Duraffort
349c167bba Remove playlist_NodeDump as nobody is using this debuging function. 2008-04-07 22:41:07 +02:00
Pierre d'Herbemont
719f576184 stats: Move the stat to libvlc instead of the playlist. As stated in the code it is not playlist related. 2008-03-29 21:53:12 +01:00
Pierre d'Herbemont
24ddff58f6 libvlc: Move input_item array from playlist to libvlc.
This avoids the circular dependency there is from playlist and input item, which creates a dead lock at exit.
2008-03-26 17:36:07 +01:00
Sam Hocevar
5122c9d9e9 Various spelling fixes. 2008-03-21 21:25:49 +00:00
Rafaël Carré
55f3a9f1dc Interaction are controlled by a dedicated thread
This is not the playlist's work at all
Fix #1520
2008-03-16 20:50:21 +01:00
Rémi Duraffort
b0565043b5 Use the correct meta data to sort the playlist.
The sorting is still strange (wrong ?) but the sort is done on the right meta data.
2008-03-04 01:47:01 +01:00
Rémi Denis-Courmont
20d8d786fc Remove useless include 2008-01-24 16:11:34 +00:00
Jean-Paul Saman
75a0a1de87 CodingStyle fixes, use ; when using macros and do not write it in the macro definition. 2007-12-06 16:26:46 +00:00
Rafaël Carré
f452c11004 playlist_CreateNode(): add an argument to specify an input_item_t to be linked with the node, rather than creating a new input.
Setting that argument to NULL will make playlist_CreateNode() behave like previously.

That way we can create only one input per pair of node (for local playlist, media library, and service discovery)
Previous behaviour was to create 2 inputs with the same i_id member, but we would store both input in a binary search tree (sorted by i_id), and that kind of tree MUST NOT have 2 items with the same key, else we will get some bad memory corruption when the wrong input is removed from the tree (the other being left in the tree while the memory referred by it was freed).
Note that this breaks ABI
2007-10-18 15:34:01 +00:00
Pierre d'Herbemont
222960cff9 playlist/services_discovery.c: Isolate more the services_discovery code from the playlist code by having two separate header. Partly revert [22536]. 2007-10-11 01:02:50 +00:00
Rafaël Carré
d3b42e438a services_discovery: storing the category & onelevel playlist items with the services_discovery_t is not needed anymore, simplify that.
put the services_discovery_t** in the public playlist_t to save one unchecked malloc() and the corresponding free()
2007-10-10 23:04:09 +00:00
Rafaël Carré
83a9495bed services_discovery: stores the category & onelevel playlist_item_t* in the services_discovery_t structure
simplify upnp* and hal modules
2007-10-10 18:16:05 +00:00
Rafaël Carré
5b093e36f6 Adds an input option "meta-file" to be used by input that aren't real inputs (like playlists).
Re-enables media library.
Fixes #1047 (nth attempt).
2007-09-28 16:08:55 +00:00
Rémi Denis-Courmont
a73e4106b1 Out-of-line __pl_Get and __pl_Release - depend on libvlc_int_t 2007-09-16 15:29:04 +00:00
Rémi Denis-Courmont
eca5f8a1c1 Fix deadlock 2007-09-16 11:00:07 +00:00
Rémi Denis-Courmont
68bdff1b34 Use the new API in playlist macros 2007-09-16 10:55:07 +00:00
Rafaël Carré
6ee1e193fd Removes trailing spaces. Removes tabs. 2007-09-10 18:56:52 +00:00
Pierre d'Herbemont
ed9a75a913 playlist/services_discovery.c: Implement and expose GetServicesNames. 2007-08-24 23:31:55 +00:00
Pierre d'Herbemont
02e8a6cff9 playlist: Make playlist_archived_services_discovery_t internal. 2007-08-19 14:51:08 +00:00
Pierre d'Herbemont
1153717cbf playlist/services_discovery.c: Use a stop method to end the service. 2007-08-18 03:44:13 +00:00
Pierre d'Herbemont
716d5bf2f2 playlist/services_discovery.c: Handle removal of a service. 2007-08-18 03:37:01 +00:00
Pierre d'Herbemont
54e92316a9 include/vlc_playlist.h: Export playlist_DeleteInputInParent. 2007-08-17 09:51:21 +00:00
Pierre d'Herbemont
66f38edb84 control/media_discoverer.c: Implementation of a media_discoverer libvlc object based on top of services_discovery. 2007-08-17 08:10:42 +00:00
Pierre d'Herbemont
3d4efe3b67 playlist/services_discovery.c: Improved services_discovery object, playlist independant. Now, the services_discovery plugin have to be converted to use this interface. 2007-08-17 02:23:11 +00:00
Pierre d'Herbemont
c5f25910d5 include/vlc_input.h: Make input items able to themselves handle item subitem added. 2007-08-16 17:52:28 +00:00
Pierre d'Herbemont
6a3e9f6ae2 include/vlc_playlist.h: Code formatting. 2007-08-04 16:18:42 +00:00
Pierre d'Herbemont
a2fc359499 include/vlc_playlist.h: More typos. 2007-08-04 16:16:44 +00:00
Pierre d'Herbemont
f4dd6b3521 include/vlc_playlist.h: Typo in comment. 2007-08-04 16:13:39 +00:00
Jean-Baptiste Kempf
a33fbe9023 DBUS: fix by Mr_Mirsal 2007-03-08 00:04:54 +00:00
Clément Stenac
85ff1461a2 * Start cleaning up libvlc playlist API (Refs:#457)
- Return correct item ids
  - Structures for navigating the playlist
  - Consistent locking
* Add a b_locked parameter to the remaining playlist API calls
2007-02-20 07:29:54 +00:00
Filippo Carone
1ae081bee3 playlist_ItemGetByInputId now included in libvlc 2007-02-11 21:18:13 +00:00
Clément Stenac
496a54201d * Do not take and release the structure lock for each element of the list while
releasing it. mutex locks /= 20 on a standard preparse run
* Only create absolutely necessary variables while preparsing
--> Preparse speed *= 4 (with item in disk cache of course)

* Do not rebuild playlist too much while adding a directory. Add a new flag
  to NodeCreate and Add to control this behaviour
2006-12-10 14:00:54 +00:00
Clément Stenac
fbf4c8060d A bit of vlc/libvlc cleanup:
* libvlc sources and plugins now define __LIBVLC__ and headers exported to
  plugins (ie, include/vlc_*.h) check for this
* libvlc sources use the value of the "libvlc" component in vlc-config instead
  of vlc
* Apply flags directly to "libvlc" in configure.ac - might temporarily break win32 :)
2006-12-03 13:48:21 +00:00
Clément Stenac
d3fe7f2879 A bit of headers cleanup
* Headers in include must contain the structures and prototypes needed
  by the plugins and should be named vlc_*.
* Headers in include/vlc must contain the structures and prototypes
  needed by external libvlc clients

* Moved and renamed some things in headers. 
   - Removed vlc_cpu.h, vlc_error.h (merged in vlc_common)
   - Removed snapshot.h (merged in vlc_vout.h)
   - Removed vlc_spu.h (merged in vlc_osd.h)
   - Removed intf_eject.h and vlc_interaction.h (merged in vlc_interface)
   - Moved all internal headers to src
   - Merged vlc_video.h and video_output.h and move private things to src
   - Removed vlc/intf.h, vlc/aout.h, vlc/vout.h, vlc/decoder.h and vlc/input.h
     (meta headers for use in modules, and often implying too large 
     dependencies)
* Removed some useless dependencies
* Unexported a bunch of functions and structures used only in src/
  (--> Still some work here)
* Finally made input_thread_t and input_source_t (mostly) private. 
  Added input_GetItem to fetch the input_item of an input_thread
* Cleaned up deprecated entries in vlc_symbols.h and bumped up symbol 
  prefix

This commit has a 99% probability of breaking the build, 0.1% of killing
your cat and 0% of getting you hot chicks.
2006-11-26 14:20:34 +00:00
Clément Stenac
420d5f170e * Documentation belongs to the .h, step 1
* Unexported a few internal functions
  (playlist_ItemDelete, playlist_ThreadCreate, playlist_ThreadDestroy)
* Remove playlist_AddSDModules and merge its features into ServicesDiscoveryAdd
* Fix a bug in signaling of node destruction (fixes Qt source selector assertion failures)
* Disable unused generic devices probe code
2006-11-19 14:37:04 +00:00
Antoine Cellerier
4bdf68b034 Small doxygen doc fix (i hope) 2006-11-19 14:04:06 +00:00
Clément Stenac
0900f11014 Finish the playlist API transition (hopefully)
- Remove a bunch of transition now-useless API.
 - Remove all playlist_Lock* functions. Matching functions now accept a
   b_locked parameter that should be set to VLC_TRUE if the playlist is
   locked when calling the function. The advantages are that it reduces
   the API bloat and that the b_locked flag can be propagated in the
   call stack
 - Remove useless playlist testsuite
 - Remove broken daap plugin (unmaintained wrt VLC API changes, relies on 
   an unmaintained library, probably unable to read content from new itunes, 
   ...). Implementations exist in rhythmbox, xmms2 and 
   daap-sharp, we should see if a proper lib exists or if we could 
   make one
 - Reduce verbosity a bit
 - Documentation
2006-11-19 13:20:02 +00:00
Clément Stenac
e8aa094f86 Preparse playlist items that don't have enough meta
If the item is not to be preparsed but has enough meta, mark it as preparsed
2006-11-12 18:19:49 +00:00
Clément Stenac
673861da5c * Remove some unneeded complexity in playlist and directory
* Remove some unneeded wrappers and locking
2006-11-11 23:37:25 +00:00
Rémi Denis-Courmont
717e0b68fe Ever const 2006-11-10 20:45:26 +00:00
Rémi Denis-Courmont
fad2848881 Some more const 2006-11-08 15:53:28 +00:00
Clément Stenac
d3217fc729 Clean up and improve core handling for album art. Still only "always fetch" implemented 2006-10-23 21:02:45 +00:00
Clément Stenac
b6d0e5a07a Rebuild the array of currently playing items as a background task.
This array is now usable as a reliable source of data for size
Use playlist_CurrentSize(p_playlist) to retrieve the size of the current playset.
2006-10-21 16:59:09 +00:00
Clément Stenac
2d3be24e0f Don't loop continuously the playlist thread, use cond.
Not tested heavily yet ...

For interaction implementers: you need to call playlist_Signal after changing the status of a dialog. Please see the diff for qt4/dialogs/interaction.cpp
2006-10-21 13:33:06 +00:00
Clément Stenac
799b2826ee Playlist
* Remove the random special case
 * Use the array of currently playing items for all cases
 * Convert array items to array API
 * Replace standard searches in sorted arrays by bsearches
 * Size is not yet fixed (next round).

Array
 * Add reset/value and bsearch functions
 * Add foreach helper
2006-10-21 11:09:51 +00:00
Clément Stenac
9cd8ee7b4e Improve drag&drop handling 2006-10-15 15:28:34 +00:00
Clément Stenac
0326005e1c Lazy allocation of the stat structure
Update stats in the input threads instead of playlist thread
2006-10-01 14:24:44 +00:00
Antoine Cellerier
2d90e869b4 Some more (mostly) untested stuff:
* Secondary queue items now have a b_fetch_art flag
 * You can use the playlist_AskForArtEnqueue function to ask for art from an interface. This will enqueue at the begining of the secondary queue
 * other stuff which i don't remember :)
 * (fix issues with previous (and unrelated) DIR_SEP commit)
2006-09-24 22:01:28 +00:00
Antoine Cellerier
560105460d Start of meta engine stuff. src/input/input.c needs to be fixed a bit. I'll finish it today. @zorglub: now you have to use the psz_arturl meta to display stuff in the interface. 2006-09-23 15:47:53 +00:00
Clément Stenac
6ecd4022a3 Remove vlc_object_find for playlist from the core 2006-09-15 22:10:37 +00:00
Clément Stenac
28d49d986f Store playlist object in instance-specific object 2006-09-15 16:18:08 +00:00
Clément Stenac
4e5e7e2dc0 Rename playlist_NodesCreateForSD to playlist_NodesPairCreate and document it 2006-09-15 11:43:22 +00:00
Clément Stenac
315069b3b1 Split playlist include file in public/private 2006-09-05 06:09:42 +00:00
Clément Stenac
98de0c4bd4 Start grabbing hotkeys in Qt. Unfinished 2006-09-03 21:53:38 +00:00
Clément Stenac
3f1e3abe35 Auto load and save media library (Closes:#433) 2006-09-03 17:31:02 +00:00
Clément Stenac
532a761def Re-enable random.
It is now based on a shuffled array of items, so that next + prev takes you back to what you were playing
2006-09-02 16:59:50 +00:00
Clément Stenac
fe8f7fc784 Fix a few quirks with playlist filters 2006-09-02 10:20:26 +00:00
Clément Stenac
948676af6e Fix for deletion of current item 2006-08-27 10:34:35 +00:00
Clément Stenac
6a42cf33fb * Allow service discoveries to state whether they prefer being displayed as tree
* Start putting together all interface strings (Refs:#703)
2006-08-26 16:51:55 +00:00
Clément Stenac
e6e82bdad0 Add functions to use the media library 2006-08-11 13:32:42 +00:00
Clément Stenac
a5df65a280 Fix sort by artist 2006-08-07 17:26:02 +00:00
Clément Stenac
f3c6bbcc0a Some infrastructure work for playlist autoload/autosave 2006-07-08 17:28:51 +00:00
Clément Stenac
06b57a510f * Add a "media-library" option to enable/disable ML
* Add a "playlist-tree" option to force onelevel/catgory mode
2006-06-14 20:09:51 +00:00
Clément Stenac
63db764f0e Fix vout/sout garbage collection and input spam debug messages 2006-06-08 18:59:14 +00:00
Clément Stenac
c21acbbcf5 * Remove unused playlist_ItemCopy
* Fix some debug
2006-05-25 09:52:57 +00:00
Clément Stenac
c6e29a7dda New helper to create nodes for services discovery 2006-05-15 05:57:19 +00:00
Clément Stenac
ed0b72e371 Merge back branch 0.8.6-playlist-vlm to trunk.
What is currently broken:
 * Some playlist demuxers (shout, dvb and pls)
 * DAAP
 * BeOS playlist
 * GPE playlist, I suppose

What has some trouble:
 * Meta handling in several demuxers (most notably TS)
 * Skins2 playlist (doesn't refresh correctly)
 * OS X playlist (see bigben's latest commits)
2006-05-14 18:29:00 +00:00