summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Eefting <edwin@datux.nl>2013-01-20 23:20:03 (GMT)
committer Edwin Eefting <edwin@datux.nl>2013-01-20 23:20:03 (GMT)
commit56a91bbb7fd79fdc533802ca162e7c5459d1370a (patch)
tree71233a90827716a33be1c1572f6266c976f2291c
parent5f86645296effd1767541cc25698ec1a9409816b (diff)
mp module kinda works now.
-rw-r--r--etc/synapse/pl.conf2
-rw-r--r--modules/CMakeLists.txt4
-rw-r--r--modules/docs/html/classpl_1_1Citer-members.html2
-rw-r--r--modules/docs/html/classpl_1_1Citer.html4
-rw-r--r--modules/docs/html/classpl_1_1CiterMan-members.html6
-rw-r--r--modules/docs/html/classpl_1_1CiterMan.html12
-rw-r--r--modules/docs/html/classplay__vlc_1_1CPlayer-members.html1
-rw-r--r--modules/docs/html/classplay__vlc_1_1CPlayer.html2
-rw-r--r--modules/docs/html/namespacemembers.html2
-rw-r--r--modules/docs/html/namespacemembers_func.html2
-rw-r--r--modules/docs/html/namespacepl.html35
-rw-r--r--modules/docs/html/namespaceplay__vlc.html45
-rw-r--r--modules/docs/html/namespacesynapse.html4
-rw-r--r--modules/docs/html/pl_8module_2module_8cpp.html31
-rw-r--r--modules/docs/html/pl__dir_8module_2module_8cpp.html20
-rw-r--r--modules/docs/html/play__vlc_8module_2module_8cpp.html8
-rw-r--r--modules/mp.module/module.cpp25
-rw-r--r--modules/pl_dir.module/module.cpp141
-rw-r--r--modules/play_vlc.module/CMakeLists.txt39
-rw-r--r--modules/play_vlc.module/module.cpp132
20 files changed, 341 insertions, 176 deletions
diff --git a/etc/synapse/pl.conf b/etc/synapse/pl.conf
index b78d4b0..799fd43 100644
--- a/etc/synapse/pl.conf
+++ b/etc/synapse/pl.conf
@@ -1,3 +1,3 @@
{
- "paths":["/mnt/server/mp3"]
+ "path":"/mediabox/mp3/"
}
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 6f96d5d..54ce839 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -10,10 +10,12 @@ file(GLOB modules *.module)
MESSAGE(STATUS "Detected synapse modules: ${modules}")
SUBDIRS(${modules})
+
+
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
- add_custom_target(doc ALL
+ add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
diff --git a/modules/docs/html/classpl_1_1Citer-members.html b/modules/docs/html/classpl_1_1Citer-members.html
index 543a55f..251ad4e 100644
--- a/modules/docs/html/classpl_1_1Citer-members.html
+++ b/modules/docs/html/classpl_1_1Citer-members.html
@@ -63,7 +63,7 @@
</div><!--header-->
<div class="contents">
This is the complete list of members for <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>, including all inherited members.<table>
- <tr bgcolor="#f0f0f0"><td><b>create</b>(string id, string rootPath) (defined in <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>)</td><td><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>create</b>(int id, string rootPath) (defined in <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>)</td><td><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>destroy</b>() (defined in <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>)</td><td><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>enterDir</b>() (defined in <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>)</td><td><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>exitDir</b>() (defined in <a class="el" href="classpl_1_1Citer.html">pl::Citer</a>)</td><td><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td><td><code> [inline]</code></td></tr>
diff --git a/modules/docs/html/classpl_1_1Citer.html b/modules/docs/html/classpl_1_1Citer.html
index aedc160..8ca4a25 100644
--- a/modules/docs/html/classpl_1_1Citer.html
+++ b/modules/docs/html/classpl_1_1Citer.html
@@ -83,8 +83,8 @@ void&#160;</td><td class="memItemRight" valign="bottom"><b>exitDir</b> ()</td></
void&#160;</td><td class="memItemRight" valign="bottom"><b>enterDir</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab138049a42ed386b6345df21f8d87bc2"></a><!-- doxytag: member="pl::Citer::reset" ref="ab138049a42ed386b6345df21f8d87bc2" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>reset</b> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac21cf577f043e689a1d009fbad2d0c5b"></a><!-- doxytag: member="pl::Citer::create" ref="ac21cf577f043e689a1d009fbad2d0c5b" args="(string id, string rootPath)" -->
-void&#160;</td><td class="memItemRight" valign="bottom"><b>create</b> (string id, string rootPath)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab97004818ff2c6c79d7fad00e8c8357d"></a><!-- doxytag: member="pl::Citer::create" ref="ab97004818ff2c6c79d7fad00e8c8357d" args="(int id, string rootPath)" -->
+void&#160;</td><td class="memItemRight" valign="bottom"><b>create</b> (int id, string rootPath)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a399111db095105871de410e3848eaf94"></a><!-- doxytag: member="pl::Citer::send" ref="a399111db095105871de410e3848eaf94" args="(int dst)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>send</b> (int dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5496fc8e648a98adea0ce7dfc5ac0f3e"></a><!-- doxytag: member="pl::Citer::destroy" ref="a5496fc8e648a98adea0ce7dfc5ac0f3e" args="()" -->
diff --git a/modules/docs/html/classpl_1_1CiterMan-members.html b/modules/docs/html/classpl_1_1CiterMan-members.html
index 6e16d44..fe0d6c1 100644
--- a/modules/docs/html/classpl_1_1CiterMan-members.html
+++ b/modules/docs/html/classpl_1_1CiterMan-members.html
@@ -63,9 +63,9 @@
</div><!--header-->
<div class="contents">
This is the complete list of members for <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>, including all inherited members.<table>
- <tr bgcolor="#f0f0f0"><td><b>create</b>(string id, string basePath) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
- <tr bgcolor="#f0f0f0"><td><b>destroy</b>(string id) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
- <tr bgcolor="#f0f0f0"><td><b>get</b>(string id) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>create</b>(int id, string basePath) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>destroy</b>(int id) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>get</b>(int id) (defined in <a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a>)</td><td><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td><td><code> [inline]</code></td></tr>
</table></div><!-- contents -->
diff --git a/modules/docs/html/classpl_1_1CiterMan.html b/modules/docs/html/classpl_1_1CiterMan.html
index c4dd184..c3bad8e 100644
--- a/modules/docs/html/classpl_1_1CiterMan.html
+++ b/modules/docs/html/classpl_1_1CiterMan.html
@@ -69,12 +69,12 @@
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a357500dc2cfba5a25d196415965e1a41"></a><!-- doxytag: member="pl::CiterMan::get" ref="a357500dc2cfba5a25d196415965e1a41" args="(string id)" -->
-<a class="el" href="classpl_1_1Citer.html">Citer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>get</b> (string id)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8136bece61ead3cbd5042ead7625acf5"></a><!-- doxytag: member="pl::CiterMan::create" ref="a8136bece61ead3cbd5042ead7625acf5" args="(string id, string basePath)" -->
-void&#160;</td><td class="memItemRight" valign="bottom"><b>create</b> (string id, string basePath)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61dd65ab0fdeec22d9eb368f9fa7cb1f"></a><!-- doxytag: member="pl::CiterMan::destroy" ref="a61dd65ab0fdeec22d9eb368f9fa7cb1f" args="(string id)" -->
-void&#160;</td><td class="memItemRight" valign="bottom"><b>destroy</b> (string id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3d5193b090ffdddcb6cb562e9bc462c"></a><!-- doxytag: member="pl::CiterMan::get" ref="ab3d5193b090ffdddcb6cb562e9bc462c" args="(int id)" -->
+<a class="el" href="classpl_1_1Citer.html">Citer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>get</b> (int id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58c1d8c8aace7fb84f180d135e0ddf18"></a><!-- doxytag: member="pl::CiterMan::create" ref="a58c1d8c8aace7fb84f180d135e0ddf18" args="(int id, string basePath)" -->
+void&#160;</td><td class="memItemRight" valign="bottom"><b>create</b> (int id, string basePath)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a1f441bfc611a8ac95c528fbede333c"></a><!-- doxytag: member="pl::CiterMan::destroy" ref="a2a1f441bfc611a8ac95c528fbede333c" args="(int id)" -->
+void&#160;</td><td class="memItemRight" valign="bottom"><b>destroy</b> (int id)</td></tr>
</table>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>pl_dir.module/<a class="el" href="pl__dir_8module_2module_8cpp.html">module.cpp</a></li>
diff --git a/modules/docs/html/classplay__vlc_1_1CPlayer-members.html b/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
index fc73f87..2a40872 100644
--- a/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
+++ b/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
@@ -69,6 +69,7 @@ This is the complete list of members for <a class="el" href="classplay__vlc_1_1C
<tr bgcolor="#f0f0f0"><td><b>init</b>(int id) (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>ok</b>() (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>open</b>(string url) (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>sendStatus</b>(int dst) (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>stop</b>() (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>throwError</b>(string msg) (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>throwIfBad</b>() (defined in <a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a>)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline]</code></td></tr>
diff --git a/modules/docs/html/classplay__vlc_1_1CPlayer.html b/modules/docs/html/classplay__vlc_1_1CPlayer.html
index 558b0e7..4842a9e 100644
--- a/modules/docs/html/classplay__vlc_1_1CPlayer.html
+++ b/modules/docs/html/classplay__vlc_1_1CPlayer.html
@@ -71,6 +71,8 @@
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9cbba49db82ac2c2dacb1b4dec1dce3"></a><!-- doxytag: member="play_vlc::CPlayer::sendStatus" ref="ab9cbba49db82ac2c2dacb1b4dec1dce3" args="(int dst)" -->
+void&#160;</td><td class="memItemRight" valign="bottom"><b>sendStatus</b> (int dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b246fb8c309270c1af74426e78189ff"></a><!-- doxytag: member="play_vlc::CPlayer::throwError" ref="a5b246fb8c309270c1af74426e78189ff" args="(string msg)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>throwError</b> (string msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4be3b71fa38cd96d656c69243c2c1eda"></a><!-- doxytag: member="play_vlc::CPlayer::throwIfBad" ref="a4be3b71fa38cd96d656c69243c2c1eda" args="()" -->
diff --git a/modules/docs/html/namespacemembers.html b/modules/docs/html/namespacemembers.html
index 4030bf0..9f3a663 100644
--- a/modules/docs/html/namespacemembers.html
+++ b/modules/docs/html/namespacemembers.html
@@ -68,7 +68,7 @@
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>SYNAPSE_REGISTER()
: <a class="el" href="namespacesynapse.html#a5d8cde710c3f03a7e22da5ff6483e0c8">synapse</a>
-, <a class="el" href="namespaceplay__vlc.html#a49a63ddf628c67643894f9c73370ec41">play_vlc</a>
+, <a class="el" href="namespaceplay__vlc.html#a56cc479958ef3b55b520614ab44c758a">play_vlc</a>
, <a class="el" href="namespacepl.html#ab254d14cfe7e0ff668f442b3f0e8a93a">pl</a>
, <a class="el" href="namespacepaper.html#a72bdfbae14e0c5c8121fa304fc01ed92">paper</a>
, <a class="el" href="namespacesynapse.html#a5776780555f705177772b14833d9d942">synapse</a>
diff --git a/modules/docs/html/namespacemembers_func.html b/modules/docs/html/namespacemembers_func.html
index ecb6f2b..fd40e05 100644
--- a/modules/docs/html/namespacemembers_func.html
+++ b/modules/docs/html/namespacemembers_func.html
@@ -68,7 +68,7 @@
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>SYNAPSE_REGISTER()
: <a class="el" href="namespacesynapse.html#a5d8cde710c3f03a7e22da5ff6483e0c8">synapse</a>
-, <a class="el" href="namespaceplay__vlc.html#a49a63ddf628c67643894f9c73370ec41">play_vlc</a>
+, <a class="el" href="namespaceplay__vlc.html#a56cc479958ef3b55b520614ab44c758a">play_vlc</a>
, <a class="el" href="namespacepl.html#ab254d14cfe7e0ff668f442b3f0e8a93a">pl</a>
, <a class="el" href="namespacepaper.html#a72bdfbae14e0c5c8121fa304fc01ed92">paper</a>
, <a class="el" href="namespacesynapse.html#a5776780555f705177772b14833d9d942">synapse</a>
diff --git a/modules/docs/html/namespacepl.html b/modules/docs/html/namespacepl.html
index 16e3376..73ab120 100644
--- a/modules/docs/html/namespacepl.html
+++ b/modules/docs/html/namespacepl.html
@@ -76,14 +76,16 @@ Functions</h2></td></tr>
&#160;</td><td class="memItemRight" valign="bottom"><b>SYNAPSE_REGISTER</b> (module_Init)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a297d0a05611e230ba3277b3c54ffab7b"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="a297d0a05611e230ba3277b3c54ffab7b" args="(module_SessionStart)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>SYNAPSE_REGISTER</b> (module_SessionStart)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a41d4c9a382b6f9874e9e2f8ba4f1bf7f">SYNAPSE_REGISTER</a> (pl_Create)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new iterator. <a href="#a41d4c9a382b6f9874e9e2f8ba4f1bf7f"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac08587f70674958c0c62cf65d0a933a8">SYNAPSE_REGISTER</a> (pl_Destroy)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete specified iterator. <a href="#ac08587f70674958c0c62cf65d0a933a8"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3418352523d26acb45c43ff31a114a7"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="ad3418352523d26acb45c43ff31a114a7" args="(module_SessionEnd)" -->
+&#160;</td><td class="memItemRight" valign="bottom"><b>SYNAPSE_REGISTER</b> (module_SessionEnd)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ab00aa18486ac95d2147cb54864dbebb6">SYNAPSE_REGISTER</a> (pl_New)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new iterator. <a href="#ab00aa18486ac95d2147cb54864dbebb6"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a8dd7cf032fae73a7e5dc1160f9b15826">SYNAPSE_REGISTER</a> (pl_Del)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete specified iterator (actually ends session, so you cant destroy default iterator) <a href="#a8dd7cf032fae73a7e5dc1160f9b15826"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a80d1265ebf1140dbc3ad510d3ca36d06">SYNAPSE_REGISTER</a> (pl_Mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Change selection/search criteria for files. <a href="#a80d1265ebf1140dbc3ad510d3ca36d06"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ad0851dde62d6be69e214a988f29b66f1">SYNAPSE_REGISTER</a> (pl_Current)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current directory and file. <a href="#ad0851dde62d6be69e214a988f29b66f1"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#aa84e1240dbf5a091053734f43a06d640">SYNAPSE_REGISTER</a> (pl_GetStatus)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current directory and file. <a href="#aa84e1240dbf5a091053734f43a06d640"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#aee06b9a309c2bf4651bc15b13923c487">SYNAPSE_REGISTER</a> (pl_NextDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Select next directory entry in list. <a href="#aee06b9a309c2bf4651bc15b13923c487"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac439b345905f3f2431e5ae5f7a967fd0">SYNAPSE_REGISTER</a> (pl_PreviousDir)</td></tr>
@@ -100,24 +102,26 @@ Functions</h2></td></tr>
&#160;</td><td class="memItemRight" valign="bottom"><b>SYNAPSE_REGISTER</b> (module_Shutdown)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bbb6887709ae8072d5405ed9c5ecc9a"></a><!-- doxytag: member="pl::iterMan" ref="a4bbb6887709ae8072d5405ed9c5ecc9a" args="" -->
+<a class="el" href="classpl_1_1CiterMan.html">CiterMan</a>&#160;</td><td class="memItemRight" valign="bottom"><b>iterMan</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c551bb2abae2f08f105c2124d2f40ba"></a><!-- doxytag: member="pl::config" ref="a2c551bb2abae2f08f105c2124d2f40ba" args="" -->
+synapse::Cconfig&#160;</td><td class="memItemRight" valign="bottom"><b>config</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc4fb6cf3ddacbfd13e78602fc7fec1f"></a><!-- doxytag: member="pl::shutdown" ref="acc4fb6cf3ddacbfd13e78602fc7fec1f" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>shutdown</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a154b24a2d6bca0a321a3f9216c4d9032"></a><!-- doxytag: member="pl::defaultId" ref="a154b24a2d6bca0a321a3f9216c4d9032" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultId</b> = -1</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bbb6887709ae8072d5405ed9c5ecc9a"></a><!-- doxytag: member="pl::iterMan" ref="a4bbb6887709ae8072d5405ed9c5ecc9a" args="" -->
-<a class="el" href="classpl_1_1CiterMan.html">CiterMan</a>&#160;</td><td class="memItemRight" valign="bottom"><b>iterMan</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Playlist namespace. </p>
</div><hr/><h2>Function Documentation</h2>
-<a class="anchor" id="a41d4c9a382b6f9874e9e2f8ba4f1bf7f"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="a41d4c9a382b6f9874e9e2f8ba4f1bf7f" args="(pl_Create)" -->
+<a class="anchor" id="ab00aa18486ac95d2147cb54864dbebb6"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="ab00aa18486ac95d2147cb54864dbebb6" args="(pl_New)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pl::SYNAPSE_REGISTER </td>
<td>(</td>
- <td class="paramtype">pl_Create&#160;</td>
+ <td class="paramtype">pl_New&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
@@ -136,7 +140,6 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultId</b> = -1</td
<dl class="user"><dt><b>Replies pl_Entry:</b></dt><dd></dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">id</td><td>Traverser id </td></tr>
<tr><td class="paramname">path</td><td>Current path </td></tr>
<tr><td class="paramname">file</td><td>Current file, selected according to search criteria </td></tr>
</table>
@@ -145,14 +148,14 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultId</b> = -1</td
</div>
</div>
-<a class="anchor" id="ac08587f70674958c0c62cf65d0a933a8"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="ac08587f70674958c0c62cf65d0a933a8" args="(pl_Destroy)" -->
+<a class="anchor" id="a8dd7cf032fae73a7e5dc1160f9b15826"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="a8dd7cf032fae73a7e5dc1160f9b15826" args="(pl_Del)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pl::SYNAPSE_REGISTER </td>
<td>(</td>
- <td class="paramtype">pl_Destroy&#160;</td>
+ <td class="paramtype">pl_Del&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
@@ -160,7 +163,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultId</b> = -1</td
</div>
<div class="memdoc">
-<p>Delete specified iterator. </p>
+<p>Delete specified iterator (actually ends session, so you cant destroy default iterator) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>Traverser id </td></tr>
@@ -201,14 +204,14 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultId</b> = -1</td
</div>
</div>
-<a class="anchor" id="ad0851dde62d6be69e214a988f29b66f1"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="ad0851dde62d6be69e214a988f29b66f1" args="(pl_Current)" -->
+<a class="anchor" id="aa84e1240dbf5a091053734f43a06d640"></a><!-- doxytag: member="pl::SYNAPSE_REGISTER" ref="aa84e1240dbf5a091053734f43a06d640" args="(pl_GetStatus)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pl::SYNAPSE_REGISTER </td>
<td>(</td>
- <td class="paramtype">pl_Current&#160;</td>
+ <td class="paramtype">pl_GetStatus&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
diff --git a/modules/docs/html/namespaceplay__vlc.html b/modules/docs/html/namespaceplay__vlc.html
index 26b32ff..fbcfcc1 100644
--- a/modules/docs/html/namespaceplay__vlc.html
+++ b/modules/docs/html/namespaceplay__vlc.html
@@ -83,7 +83,7 @@ Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85e2a1f79ec9295c04848d47d3b08b43"></a><!-- doxytag: member="play_vlc::SYNAPSE_REGISTER" ref="a85e2a1f79ec9295c04848d47d3b08b43" args="(module_SessionEnd)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>SYNAPSE_REGISTER</b> (module_SessionEnd)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a0ee16a84fbb1b8ec0afa9a8a3f446bb9">SYNAPSE_REGISTER</a> (play_GetPlayers)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of players Returns a play_Players event with a list of available player ids. <a href="#a0ee16a84fbb1b8ec0afa9a8a3f446bb9"></a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of players. <a href="#a0ee16a84fbb1b8ec0afa9a8a3f446bb9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a92c196b48daa10c84da50c0aaefeda1e">SYNAPSE_REGISTER</a> (play_DelPlayer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the player instance. <a href="#a92c196b48daa10c84da50c0aaefeda1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#afb1964ede7792427166c5734af1a9e63">SYNAPSE_REGISTER</a> (play_NewPlayer)</td></tr>
@@ -92,8 +92,12 @@ Functions</h2></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens and starts playing an url. <a href="#a7cf66043964d0628f09b006490f01c15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a49a63ddf628c67643894f9c73370ec41">SYNAPSE_REGISTER</a> (play_Stop)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops playing. <a href="#a49a63ddf628c67643894f9c73370ec41"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a56cc479958ef3b55b520614ab44c758a">SYNAPSE_REGISTER</a> (play_GetStatus)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets status of player. <a href="#a56cc479958ef3b55b520614ab44c758a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74b3a9a5ec2d35d06d1fdcd32c9a4d74"></a><!-- doxytag: member="play_vlc::vlcMutex" ref="a74b3a9a5ec2d35d06d1fdcd32c9a4d74" args="" -->
+recursive_mutex&#160;</td><td class="memItemRight" valign="bottom"><b>vlcMutex</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe14b89af865a06366dd2b8185e29620"></a><!-- doxytag: member="play_vlc::players" ref="afe14b89af865a06366dd2b8185e29620" args="" -->
CPlayerMap&#160;</td><td class="memItemRight" valign="bottom"><b>players</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a992e55c5e86cb2d6c29888f177595483"></a><!-- doxytag: member="play_vlc::defaultSession" ref="a992e55c5e86cb2d6c29888f177595483" args="" -->
@@ -117,7 +121,8 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultSession</b></td
</div>
<div class="memdoc">
-<p>Get a list of players Returns a play_Players event with a list of available player ids. </p>
+<p>Get a list of players. </p>
+<dl class="user"><dt><b>Sends reply: <em><code>play_Player</code> </em> </b></dt><dd>For every player. </dd></dl>
</div>
</div>
@@ -181,14 +186,13 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultSession</b></td
<li><code>url</code> The url or local filename to open.</li>
</ul>
<dl class="user"><dt><b>Broadcasts: <em><code>play_InfoMeta</code>:</em> </b></dt><dd>Metadata for the current url. (can also be sended while playing, for streams for example)</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateNone</code>:</em> </b></dt><dd>Player has no status.</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateOpening</code>:</em> </b></dt><dd>Player is opening an url</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateBuffering</code>:</em> </b></dt><dd>Player is buffering data</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StatePlaying</code>:</em> </b></dt><dd>Player is playing.</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StatePaused</code>:</em> </b></dt><dd>Player is paused</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateStopped</code>:</em> </b></dt><dd>Player has stopped</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateEnded</code>:</em> </b></dt><dd>Media has ended</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>play_StateError</code>:</em> </b></dt><dd>An error has occured. TOOD: need to fix logging, to show what actually went wrong.</dd></dl>
+<dl class="user"><dt><b>Broadcasts: <em><code>play_State</code>:</em> </b></dt><dd>Current status. </dd></dl>
+<dl class="params"><dt><b>Parameters:</b></dt><dd>
+ <table class="params">
+ <tr><td class="paramname">state,:</td><td>none: no status yet opening: Player is opening an url buffering: Player is buffering data playing: Player is playing something paused: Player is pausing stopped: Player is stopped ended: Media has ended error: an error occured. TOOD: need to fix logging, to show what actually went wrong.</td></tr>
+ </table>
+ </dd>
+</dl>
<dl class="user"><dt><b>Broadcasts: <em><code>play_Time</code>:</em> </b></dt><dd>Sended every second with time and position info. <ul>
<li><code>length</code> total length of media in seconds. (0 for streams) </li>
<li><code>time</code> current position of the media, in seconds. </li>
@@ -216,6 +220,27 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultSession</b></td
</div>
</div>
+<a class="anchor" id="a56cc479958ef3b55b520614ab44c758a"></a><!-- doxytag: member="play_vlc::SYNAPSE_REGISTER" ref="a56cc479958ef3b55b520614ab44c758a" args="(play_GetStatus)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">play_vlc::SYNAPSE_REGISTER </td>
+ <td>(</td>
+ <td class="paramtype">play_GetStatus&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Gets status of player. </p>
+<p>This is just to allow new clients to get the latest events.</p>
+<p>Usually play_InfoMeta and stuff. </p>
+
+</div>
+</div>
</div><!-- contents -->
diff --git a/modules/docs/html/namespacesynapse.html b/modules/docs/html/namespacesynapse.html
index 5fd9369..a244208 100644
--- a/modules/docs/html/namespacesynapse.html
+++ b/modules/docs/html/namespacesynapse.html
@@ -144,7 +144,7 @@ void&#160;</td><td class="memItemRight" valign="bottom"><b>exitHandler</b> (int
<li><code>description</code> Description of the session.</li>
</ul>
</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>module_SessionStarted</code> </em> </b></dt><dd>Tells the world a new session is started for this module. <ul>
+<dl class="user"><dt><b>Broadcasts: <em><code>module_SessionStarted</code> </em>(REMOVED )</b></dt><dd>Tells the world a new session is started for this module. <ul>
<li><code>session</code> The session id of the new session.</li>
</ul>
</dd></dl>
@@ -292,7 +292,7 @@ void&#160;</td><td class="memItemRight" valign="bottom"><b>exitHandler</b> (int
<li><code></code>(other parameters) Contains all specified arguments. (without password)</li>
</ul>
</dd></dl>
-<dl class="user"><dt><b>Broadcasts: <em><code>module_SessionStarted</code>:</em> </b></dt><dd>to let the rest of the word know of the new session. <ul>
+<dl class="user"><dt><b>Broadcasts: <em><code>module_SessionStarted</code> </em>(REMOVED):</b></dt><dd>to let the rest of the word know of the new session. <ul>
<li><code>session</code> The session id of the new session. </li>
</ul>
</dd></dl>
diff --git a/modules/docs/html/pl_8module_2module_8cpp.html b/modules/docs/html/pl_8module_2module_8cpp.html
index 224347e..d453861 100644
--- a/modules/docs/html/pl_8module_2module_8cpp.html
+++ b/modules/docs/html/pl_8module_2module_8cpp.html
@@ -54,7 +54,7 @@
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
-<a href="#define-members">Defines</a> &#124;
+<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
@@ -79,35 +79,36 @@ Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpl_1_1CsortedDir.html">pl::CsortedDir</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpl_1_1Citer.html">pl::Citer</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpl_1_1CiterMan.html">pl::CiterMan</a></td></tr>
-<tr><td colspan="2"><h2><a name="define-members"></a>
-Defines</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b03a7555e481d771c4ca8c611e331b0"></a><!-- doxytag: member="pl.module/module.cpp::BOOST_FILESYSTEM_VERSION" ref="a7b03a7555e481d771c4ca8c611e331b0" args="" -->
-#define&#160;</td><td class="memItemRight" valign="bottom"><b>BOOST_FILESYSTEM_VERSION</b>&#160;&#160;&#160;3</td></tr>
+<tr><td colspan="2"><h2><a name="namespaces"></a>
+Namespaces</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html">pl</a></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Playlist namespace. </p>
+<br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3642467c1c424d75f3fed785a0b0bab2"></a><!-- doxytag: member="pl.module/module.cpp::SYNAPSE_REGISTER" ref="a3642467c1c424d75f3fed785a0b0bab2" args="(module_Init)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_Init)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a297d0a05611e230ba3277b3c54ffab7b"></a><!-- doxytag: member="pl.module/module.cpp::SYNAPSE_REGISTER" ref="a297d0a05611e230ba3277b3c54ffab7b" args="(module_SessionStart)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_SessionStart)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Create)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a41d4c9a382b6f9874e9e2f8ba4f1bf7f">pl::SYNAPSE_REGISTER</a> (pl_Create)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new iterator. <a href="#a41d4c9a382b6f9874e9e2f8ba4f1bf7f"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Destroy)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac08587f70674958c0c62cf65d0a933a8">pl::SYNAPSE_REGISTER</a> (pl_Destroy)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete specified iterator. <a href="#ac08587f70674958c0c62cf65d0a933a8"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Mode)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a80d1265ebf1140dbc3ad510d3ca36d06">pl::SYNAPSE_REGISTER</a> (pl_Mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Change selection/search criteria for files. <a href="#a80d1265ebf1140dbc3ad510d3ca36d06"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Current)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ad0851dde62d6be69e214a988f29b66f1">pl::SYNAPSE_REGISTER</a> (pl_Current)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current directory and file. <a href="#ad0851dde62d6be69e214a988f29b66f1"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_NextDir)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#aee06b9a309c2bf4651bc15b13923c487">pl::SYNAPSE_REGISTER</a> (pl_NextDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Select next directory entry in list. <a href="#aee06b9a309c2bf4651bc15b13923c487"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_PreviousDir)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac439b345905f3f2431e5ae5f7a967fd0">pl::SYNAPSE_REGISTER</a> (pl_PreviousDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Select previous entry directory in list. <a href="#ac439b345905f3f2431e5ae5f7a967fd0"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_EnterDir)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a5a0bb33074d26778a65e2a857f88de05">pl::SYNAPSE_REGISTER</a> (pl_EnterDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enters selected directory. <a href="#a5a0bb33074d26778a65e2a857f88de05"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_ExitDir)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ade9264bafa3a9f332af5e3289999990f">pl::SYNAPSE_REGISTER</a> (pl_ExitDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Exits directory, selecting directory on higher up the hierarchy. <a href="#ade9264bafa3a9f332af5e3289999990f"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Next)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ab320dfcd31376339447633aa02c014c4">pl::SYNAPSE_REGISTER</a> (pl_Next)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Next song. <a href="#ab320dfcd31376339447633aa02c014c4"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (pl_Previous)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ab254d14cfe7e0ff668f442b3f0e8a93a">pl::SYNAPSE_REGISTER</a> (pl_Previous)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Previous song. <a href="#ab254d14cfe7e0ff668f442b3f0e8a93a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2020b7018ba776f9bd4810250f11480"></a><!-- doxytag: member="pl.module/module.cpp::SYNAPSE_REGISTER" ref="ad2020b7018ba776f9bd4810250f11480" args="(module_Shutdown)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_Shutdown)</td></tr>
diff --git a/modules/docs/html/pl__dir_8module_2module_8cpp.html b/modules/docs/html/pl__dir_8module_2module_8cpp.html
index 2abbb17..ad280ad 100644
--- a/modules/docs/html/pl__dir_8module_2module_8cpp.html
+++ b/modules/docs/html/pl__dir_8module_2module_8cpp.html
@@ -95,14 +95,16 @@ Functions</h2></td></tr>
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_Init)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a297d0a05611e230ba3277b3c54ffab7b"></a><!-- doxytag: member="pl_dir.module/module.cpp::SYNAPSE_REGISTER" ref="a297d0a05611e230ba3277b3c54ffab7b" args="(module_SessionStart)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_SessionStart)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a41d4c9a382b6f9874e9e2f8ba4f1bf7f">pl::SYNAPSE_REGISTER</a> (pl_Create)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new iterator. <a href="#a41d4c9a382b6f9874e9e2f8ba4f1bf7f"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac08587f70674958c0c62cf65d0a933a8">pl::SYNAPSE_REGISTER</a> (pl_Destroy)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete specified iterator. <a href="#ac08587f70674958c0c62cf65d0a933a8"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3418352523d26acb45c43ff31a114a7"></a><!-- doxytag: member="pl_dir.module/module.cpp::SYNAPSE_REGISTER" ref="ad3418352523d26acb45c43ff31a114a7" args="(module_SessionEnd)" -->
+&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_SessionEnd)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ab00aa18486ac95d2147cb54864dbebb6">pl::SYNAPSE_REGISTER</a> (pl_New)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new iterator. <a href="#ab00aa18486ac95d2147cb54864dbebb6"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a8dd7cf032fae73a7e5dc1160f9b15826">pl::SYNAPSE_REGISTER</a> (pl_Del)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete specified iterator (actually ends session, so you cant destroy default iterator) <a href="#a8dd7cf032fae73a7e5dc1160f9b15826"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#a80d1265ebf1140dbc3ad510d3ca36d06">pl::SYNAPSE_REGISTER</a> (pl_Mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Change selection/search criteria for files. <a href="#a80d1265ebf1140dbc3ad510d3ca36d06"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ad0851dde62d6be69e214a988f29b66f1">pl::SYNAPSE_REGISTER</a> (pl_Current)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current directory and file. <a href="#ad0851dde62d6be69e214a988f29b66f1"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#aa84e1240dbf5a091053734f43a06d640">pl::SYNAPSE_REGISTER</a> (pl_GetStatus)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current directory and file. <a href="#aa84e1240dbf5a091053734f43a06d640"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#aee06b9a309c2bf4651bc15b13923c487">pl::SYNAPSE_REGISTER</a> (pl_NextDir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Select next directory entry in list. <a href="#aee06b9a309c2bf4651bc15b13923c487"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepl.html#ac439b345905f3f2431e5ae5f7a967fd0">pl::SYNAPSE_REGISTER</a> (pl_PreviousDir)</td></tr>
@@ -119,12 +121,14 @@ Functions</h2></td></tr>
&#160;</td><td class="memItemRight" valign="bottom"><b>pl::SYNAPSE_REGISTER</b> (module_Shutdown)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bbb6887709ae8072d5405ed9c5ecc9a"></a><!-- doxytag: member="pl_dir.module/module.cpp::iterMan" ref="a4bbb6887709ae8072d5405ed9c5ecc9a" args="" -->
+CiterMan&#160;</td><td class="memItemRight" valign="bottom"><b>pl::iterMan</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c551bb2abae2f08f105c2124d2f40ba"></a><!-- doxytag: member="pl_dir.module/module.cpp::config" ref="a2c551bb2abae2f08f105c2124d2f40ba" args="" -->
+synapse::Cconfig&#160;</td><td class="memItemRight" valign="bottom"><b>pl::config</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc4fb6cf3ddacbfd13e78602fc7fec1f"></a><!-- doxytag: member="pl_dir.module/module.cpp::shutdown" ref="acc4fb6cf3ddacbfd13e78602fc7fec1f" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>pl::shutdown</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a154b24a2d6bca0a321a3f9216c4d9032"></a><!-- doxytag: member="pl_dir.module/module.cpp::defaultId" ref="a154b24a2d6bca0a321a3f9216c4d9032" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>pl::defaultId</b> = -1</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bbb6887709ae8072d5405ed9c5ecc9a"></a><!-- doxytag: member="pl_dir.module/module.cpp::iterMan" ref="a4bbb6887709ae8072d5405ed9c5ecc9a" args="" -->
-CiterMan&#160;</td><td class="memItemRight" valign="bottom"><b>pl::iterMan</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The play list module. </p>
diff --git a/modules/docs/html/play__vlc_8module_2module_8cpp.html b/modules/docs/html/play__vlc_8module_2module_8cpp.html
index 5d77964..55d9c75 100644
--- a/modules/docs/html/play__vlc_8module_2module_8cpp.html
+++ b/modules/docs/html/play__vlc_8module_2module_8cpp.html
@@ -74,6 +74,8 @@
<code>#include &quot;exception/cexception.h&quot;</code><br/>
<code>#include &quot;boost/bind.hpp&quot;</code><br/>
<code>#include &lt;functional&gt;</code><br/>
+<code>#include &lt;boost/thread/mutex.hpp&gt;</code><br/>
+<code>#include &lt;boost/thread/recursive_mutex.hpp&gt;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
@@ -98,7 +100,7 @@ Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85e2a1f79ec9295c04848d47d3b08b43"></a><!-- doxytag: member="play_vlc.module/module.cpp::SYNAPSE_REGISTER" ref="a85e2a1f79ec9295c04848d47d3b08b43" args="(module_SessionEnd)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>play_vlc::SYNAPSE_REGISTER</b> (module_SessionEnd)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a0ee16a84fbb1b8ec0afa9a8a3f446bb9">play_vlc::SYNAPSE_REGISTER</a> (play_GetPlayers)</td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of players Returns a play_Players event with a list of available player ids. <a href="#a0ee16a84fbb1b8ec0afa9a8a3f446bb9"></a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of players. <a href="#a0ee16a84fbb1b8ec0afa9a8a3f446bb9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a92c196b48daa10c84da50c0aaefeda1e">play_vlc::SYNAPSE_REGISTER</a> (play_DelPlayer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the player instance. <a href="#a92c196b48daa10c84da50c0aaefeda1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#afb1964ede7792427166c5734af1a9e63">play_vlc::SYNAPSE_REGISTER</a> (play_NewPlayer)</td></tr>
@@ -107,8 +109,12 @@ Functions</h2></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens and starts playing an url. <a href="#a7cf66043964d0628f09b006490f01c15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a49a63ddf628c67643894f9c73370ec41">play_vlc::SYNAPSE_REGISTER</a> (play_Stop)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops playing. <a href="#a49a63ddf628c67643894f9c73370ec41"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplay__vlc.html#a56cc479958ef3b55b520614ab44c758a">play_vlc::SYNAPSE_REGISTER</a> (play_GetStatus)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets status of player. <a href="#a56cc479958ef3b55b520614ab44c758a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74b3a9a5ec2d35d06d1fdcd32c9a4d74"></a><!-- doxytag: member="play_vlc.module/module.cpp::vlcMutex" ref="a74b3a9a5ec2d35d06d1fdcd32c9a4d74" args="" -->
+recursive_mutex&#160;</td><td class="memItemRight" valign="bottom"><b>play_vlc::vlcMutex</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe14b89af865a06366dd2b8185e29620"></a><!-- doxytag: member="play_vlc.module/module.cpp::players" ref="afe14b89af865a06366dd2b8185e29620" args="" -->
CPlayerMap&#160;</td><td class="memItemRight" valign="bottom"><b>play_vlc::players</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a992e55c5e86cb2d6c29888f177595483"></a><!-- doxytag: member="play_vlc.module/module.cpp::defaultSession" ref="a992e55c5e86cb2d6c29888f177595483" args="" -->
diff --git a/modules/mp.module/module.cpp b/modules/mp.module/module.cpp
index 278ac9b..4946771 100644
--- a/modules/mp.module/module.cpp
+++ b/modules/mp.module/module.cpp
@@ -25,12 +25,14 @@ namespace mp
using namespace std;
int playerId;
+ int plId;
SYNAPSE_REGISTER(module_Init)
{
Cmsg out;
playerId=0;
+ plId=0;
out.clear();
out.event="core_ChangeModule";
@@ -65,10 +67,6 @@ namespace mp
out["name"]="http_json";
out.send();
- out.clear();
- out.event="pl_Create";
- out["id"]="/home/psy/pl";
- out.send();
}
@@ -99,6 +97,25 @@ namespace mp
playerId=msg.src;
}
+ //playlist switched to different path/file
+ SYNAPSE_REGISTER(pl_Entry)
+ {
+ //for now we just support one playlist
+ if (!plId)
+ plId=msg.src;
+
+
+ if (msg.src==plId)
+ {
+ //lets play it
+ Cmsg out;
+ out.event="play_Open";
+ out["url"]="file://"+msg["currentFile"].str();
+ out.dst=playerId;
+ out.send();
+ }
+ }
+
SYNAPSE_REGISTER(play_InfoMeta)
diff --git a/modules/pl_dir.module/module.cpp b/modules/pl_dir.module/module.cpp
index ab618f1..c339fa0 100644
--- a/modules/pl_dir.module/module.cpp
+++ b/modules/pl_dir.module/module.cpp
@@ -49,40 +49,6 @@ namespace pl
using namespace boost::filesystem;
using namespace boost;
- bool shutdown;
- int defaultId=-1;
-
- SYNAPSE_REGISTER(module_Init)
- {
- Cmsg out;
- shutdown=false;
- defaultId=msg.dst;
-
- //load config file
- synapse::Cconfig config;
- config.load("etc/synapse/pl.conf");
-
- out.clear();
- out.event="core_ChangeModule";
- out["maxThreads"]=1;
- out.send();
-
- out.clear();
- out.event="core_ChangeSession";
- out["maxThreads"]=1;
- out.send();
-
- //tell the rest of the world we are ready for duty
- out.clear();
- out.event="core_Ready";
- out.send();
-
- }
-
- SYNAPSE_REGISTER(module_SessionStart)
- {
- }
-
class Cpath : public path
@@ -194,7 +160,7 @@ namespace pl
path mCurrentFile;
- string mId;
+ int mId;
private:
@@ -376,7 +342,7 @@ namespace pl
next();
}
- void create(string id, string rootPath)
+ void create(int id, string rootPath)
{
mId=id;
mRootPath=rootPath;
@@ -390,7 +356,6 @@ namespace pl
Cmsg out;
out.event="pl_Entry";
out.dst=dst;
- out["id"]=mId;
out["rootPath"]=mRootPath.string();
out["currentPath"]=mCurrentPath.string();
out["currentFile"]=mCurrentFile.string();
@@ -414,19 +379,19 @@ namespace pl
class CiterMan
{
private:
- typedef map<string,Citer> CiterMap;
+ typedef map<int,Citer> CiterMap;
CiterMap mIterMap;
public:
- Citer & get(string id)
+ Citer & get(int id)
{
if (mIterMap.find(id)==mIterMap.end())
throw(synapse::runtime_error("Playlist not found"));
return(mIterMap[id]);
}
- void create(string id, string basePath)
+ void create(int id, string basePath)
{
if (mIterMap.find(id)!=mIterMap.end())
throw(synapse::runtime_error("Playlist already exists"));
@@ -434,7 +399,7 @@ namespace pl
mIterMap[id].create(id, basePath);
}
- void destroy(string id)
+ void destroy(int id)
{
get(id).destroy();
mIterMap.erase(id);
@@ -444,7 +409,51 @@ namespace pl
};
CiterMan iterMan;
+ synapse::Cconfig config;
+ bool shutdown;
+ int defaultId=-1;
+
+ SYNAPSE_REGISTER(module_Init)
+ {
+ Cmsg out;
+ shutdown=false;
+ defaultId=msg.dst;
+
+ //load config file
+ config.load("etc/synapse/pl.conf");
+
+ out.clear();
+ out.event="core_ChangeModule";
+ out["maxThreads"]=1;
+ out.send();
+
+ out.clear();
+ out.event="core_ChangeSession";
+ out["maxThreads"]=1;
+ out.send();
+
+ //tell the rest of the world we are ready for duty
+ out.clear();
+ out.event="core_Ready";
+ out.send();
+
+ }
+
+ SYNAPSE_REGISTER(module_SessionStart)
+ {
+ if (msg.isSet("path"))
+ iterMan.create(msg.dst, msg["path"]);
+ else
+ iterMan.create(msg.dst, config["path"]);
+
+ iterMan.get(msg.dst).send(0);
+ }
+
+ SYNAPSE_REGISTER(module_SessionEnd)
+ {
+ iterMan.destroy(msg.dst);
+ }
/** Create a new iterator
\param id Traverser id
@@ -453,24 +462,32 @@ namespace pl
SECURITY WARNING: Its possible to traverse the whole filesystem for users that have permission to send pl_Create!
\par Replies pl_Entry:
- \param id Traverser id
\param path Current path
\param file Current file, selected according to search criteria
*/
- SYNAPSE_REGISTER(pl_Create)
+ SYNAPSE_REGISTER(pl_New)
{
- iterMan.create(msg["id"], msg["path"]);
- iterMan.get(msg["id"]).send(msg.src);
+ Cmsg out;
+ out.event="core_NewSession";
+ out["path"]=msg["path"];
+ out.dst=1;
+ out.send();
}
- /** Delete specified iterator
+ /** Delete specified iterator (actually ends session, so you cant destroy default iterator)
\param id Traverser id
*/
- SYNAPSE_REGISTER(pl_Destroy)
+ SYNAPSE_REGISTER(pl_Del)
{
- iterMan.destroy(msg["id"]);
+ if (msg.dst!=defaultId)
+ {
+ Cmsg out;
+ out.event="core_DelSession";
+ out.dst=1;
+ out.send();
+ }
}
@@ -493,9 +510,9 @@ namespace pl
\par Replies pl_Entry.
*/
- SYNAPSE_REGISTER(pl_Current)
+ SYNAPSE_REGISTER(pl_GetStatus)
{
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).send(msg.src);
}
/** Select next directory entry in list
@@ -505,8 +522,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_NextDir)
{
- iterMan.get(msg["id"]).nextDir();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).nextDir();
+ iterMan.get(msg.dst).send(0);
}
@@ -518,8 +535,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_PreviousDir)
{
- iterMan.get(msg["id"]).previousDir();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).previousDir();
+ iterMan.get(msg.dst).send(0);
}
/** Enters selected directory
@@ -529,8 +546,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_EnterDir)
{
- iterMan.get(msg["id"]).enterDir();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).enterDir();
+ iterMan.get(msg.dst).send(0);
}
/** Exits directory, selecting directory on higher up the hierarchy
@@ -540,8 +557,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_ExitDir)
{
- iterMan.get(msg["id"]).exitDir();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).exitDir();
+ iterMan.get(msg.dst).send(0);
}
@@ -552,8 +569,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_Next)
{
- iterMan.get(msg["id"]).next();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).next();
+ iterMan.get(msg.dst).send(0);
}
@@ -564,8 +581,8 @@ namespace pl
*/
SYNAPSE_REGISTER(pl_Previous)
{
- iterMan.get(msg["id"]).previous();
- iterMan.get(msg["id"]).send(msg.src);
+ iterMan.get(msg.dst).previous();
+ iterMan.get(msg.dst).send(0);
}
diff --git a/modules/play_vlc.module/CMakeLists.txt b/modules/play_vlc.module/CMakeLists.txt
new file mode 100644
index 0000000..141205d
--- /dev/null
+++ b/modules/play_vlc.module/CMakeLists.txt
@@ -0,0 +1,39 @@
+#this is just a basic CMakeLists.txt, for more information see the cmake manpage
+
+cmake_minimum_required(VERSION 2.6)
+
+#Determine name of the .so module:
+#A module should always be in a modulename.module directory!.
+string(REGEX REPLACE ".*/([^/]*).module$" "\\1" module_name "${CMAKE_CURRENT_BINARY_DIR}")
+MESSAGE(STATUS "Module name of ${CMAKE_CURRENT_BINARY_DIR} is: '${module_name}'")
+
+
+#we really at least need 1.1.x, since the API has changed
+INCLUDE(FindPkgConfig)
+pkg_check_modules (VLC libvlc>=1.1.0)
+IF(VLC_FOUND)
+
+
+ #add definitions, compiler switches, etc.
+ ADD_DEFINITIONS()
+
+
+ #automaticly add all sourcefiles to current module
+ file(GLOB sources *.cpp)
+ ADD_LIBRARY(${module_name} MODULE ${sources})
+
+ #need to link to some other libraries ? just add them here
+ TARGET_LINK_LIBRARIES(${module_name} vlc)
+
+ INCLUDE_DIRECTORIES(../..)
+
+ #add an install target here
+ #INSTALL_FILES(...)
+ #INSTALL_PROGRAMS(...)
+ #INSTALL_TARGET(...)
+ELSE(VLC_FOUND)
+ MESSAGE(WARNING "vlc libraries not found, not building ${module_name}")
+
+
+ENDIF(VLC_FOUND)
+
diff --git a/modules/play_vlc.module/module.cpp b/modules/play_vlc.module/module.cpp
index 0c0b239..0bbb83b 100644
--- a/modules/play_vlc.module/module.cpp
+++ b/modules/play_vlc.module/module.cpp
@@ -33,6 +33,8 @@ This module can play urls and local files.
#include "boost/bind.hpp"
#include <functional>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/recursive_mutex.hpp>
/** VLC player namespace
*
@@ -41,8 +43,12 @@ namespace play_vlc
{
using namespace std;
+using namespace boost;
+//one big mutex so that our threads and vlc threads dont collide
+recursive_mutex vlcMutex;
+
//A player instance
//Consists of a libvlc player, list-player and and media-list (play queue)
//NOTE: the static vlc* functions are used for libvlc call backs. These are called from a seperate vlc thread!
@@ -67,13 +73,28 @@ class CPlayer
libvlc_event_manager_t *mListPlayerEm;
- //WARNING: only access these variables from call back functions, or when player is stopped, to prevent mutex problems!
int mVlcLastTime;
string mVlcUrl;
+ Cvar mStatus;
+
public:
string description;
+ //send all cached status events to specified destination
+ void sendStatus(int dst)
+ {
+ Cmsg out;
+ out.src=mId;
+ out.dst=dst;
+ FOREACH_VARMAP(status, mStatus)
+ {
+ out.event=status.first;
+ out=status.second;
+ out.send();
+ }
+ }
+
void throwError(string msg)
{
msg="[play_vlc] "+msg;
@@ -104,14 +125,19 @@ class CPlayer
static void vlcEventGeneric(const libvlc_event_t * event, void *player)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
Cmsg out;
out.src=((CPlayer *)player)->mId;
+
out.event=string("play_Event")+string(libvlc_event_type_name(event->type));
out.send();
}
static void vlcEventMediaPlayerTimeChanged(const libvlc_event_t * event, void *player)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
int newTime=event->u.media_player_time_changed.new_time/1000;
//NOTE: this is called from another thread...watch out with accessing other variables
@@ -126,10 +152,13 @@ class CPlayer
out["time"]=newTime;
out["length"]=(libvlc_media_player_get_length((libvlc_media_player_t*)event->p_obj))/1000;
out.send();
+
+ //cache status
+ ((CPlayer *)player)->mStatus[out.event]=out;
}
//converts metadata from a mediaobject into a var
- static void vlcMeta2Var(libvlc_media_t * m, Cvar & var)
+ static void vlcMeta2Var(libvlc_media_t * m, Cvar & var)
{
char * s;
@@ -192,6 +221,8 @@ class CPlayer
static void vlcEventMediaMetaChanged(const libvlc_event_t * event, void *player)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
static Cmsg prevMsg;
Cmsg out;
@@ -208,33 +239,44 @@ class CPlayer
{
out.send();
prevMsg=out;
+
+ //cache status
+ ((CPlayer *)player)->mStatus[out.event]=out;
+
}
}
static void vlcEventMediaStateChanged(const libvlc_event_t * event, void *player)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
Cmsg out;
out.src=((CPlayer *)player)->mId;
+ out.event="play_State";
+
+ out["state"]="none";
if (event->u.media_state_changed.new_state==libvlc_NothingSpecial)
- out.event="play_StateNone";
+ out["state"]="none";
else if (event->u.media_state_changed.new_state==libvlc_Opening)
- out.event="play_StateOpening";
+ out["state"]="opening";
else if (event->u.media_state_changed.new_state==libvlc_Buffering)
- out.event="play_StateBuffering";
+ out["state"]="buffering";
else if (event->u.media_state_changed.new_state==libvlc_Playing)
- out.event="play_StatePlaying";
+ out["state"]="playing";
else if (event->u.media_state_changed.new_state==libvlc_Paused)
- out.event="play_StatePaused";
+ out["state"]="paused";
else if (event->u.media_state_changed.new_state==libvlc_Stopped)
- out.event="play_StateStopped";
+ out["state"]="stopped";
else if (event->u.media_state_changed.new_state==libvlc_Ended)
- out.event="play_StateEnded";
+ out["state"]="ended";
else if (event->u.media_state_changed.new_state==libvlc_Error)
- out.event="play_StateError";
+ out["state"]="error";
out.send();
+ //cache status
+ ((CPlayer *)player)->mStatus[out.event]=out;
/**
//check the logs as well
libvlc_log_message_t logMessage;
@@ -271,6 +313,7 @@ class CPlayer
static void vlcEventMediaSubItemAdded(const libvlc_event_t * event, void *player)
{
+
libvlc_event_manager_t *em;
em=libvlc_media_event_manager(event->u.media_subitem_added.new_child);
if (em)
@@ -466,7 +509,6 @@ SYNAPSE_REGISTER(module_Init)
//this module is single threaded, since libvlc manages its own threads
-
out.clear();
out.event="core_Ready";
out.send();
@@ -479,38 +521,42 @@ SYNAPSE_REGISTER(module_Shutdown)
SYNAPSE_REGISTER(module_SessionStart)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
players[dst].init(dst);
//inform everyone there's a new player in town ;)
Cmsg out;
out=msg;
out.event="play_Player";
- out.src=dst;
out.dst=0;
+ out.src=msg.dst;
out.send();
}
SYNAPSE_REGISTER(module_SessionEnd)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
players[dst].destroy();
players.erase(dst);
}
/** Get a list of players
- * Returns a play_Players event with a list of available player ids
+ * \REPLY play_Player
+ * For every player.
*
*/
SYNAPSE_REGISTER(play_GetPlayers)
{
Cmsg out;
- out.event="play_Players";
+ out.event="play_Player";
out.dst=msg.src;
for(CPlayerMap::iterator I=players.begin(); I!=players.end(); I++)
{
- stringstream s;
- s << I->first;
- out["players"][s.str()]=I->second.description;
+ out.src=I->first;
+ out.send();
}
out.send();
}
@@ -524,7 +570,6 @@ SYNAPSE_REGISTER(play_DelPlayer)
throw(synapse::runtime_error("Cant delete default player"));
Cmsg out;
- out.src=dst;
out.event="core_DelSession";
out.send();
}
@@ -547,30 +592,18 @@ SYNAPSE_REGISTER(play_NewPlayer)
\BROADCAST play_InfoMeta:
Metadata for the current url. (can also be sended while playing, for streams for example)
-\BROADCAST play_StateNone:
- Player has no status.
-
-\BROADCAST play_StateOpening:
- Player is opening an url
-
-\BROADCAST play_StateBuffering:
- Player is buffering data
-
-\BROADCAST play_StatePlaying:
- Player is playing.
-
-\BROADCAST play_StatePaused:
- Player is paused
-
-\BROADCAST play_StateStopped:
- Player has stopped
-
-\BROADCAST play_StateEnded:
- Media has ended
-
-\BROADCAST play_StateError:
- An error has occured.
- TOOD: need to fix logging, to show what actually went wrong.
+\BROADCAST play_State:
+ Current status.
+ \param state:
+ none: no status yet
+ opening: Player is opening an url
+ buffering: Player is buffering data
+ playing: Player is playing something
+ paused: Player is pausing
+ stopped: Player is stopped
+ ended: Media has ended
+ error: an error occured.
+ TOOD: need to fix logging, to show what actually went wrong.
\BROADCAST play_Time:
Sended every second with time and position info.
@@ -580,6 +613,8 @@ SYNAPSE_REGISTER(play_NewPlayer)
*/
SYNAPSE_REGISTER(play_Open)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
INFO("vlc opening " << msg["url"].str());
players[dst].open(msg["url"]);
@@ -592,10 +627,23 @@ SYNAPSE_REGISTER(play_Open)
*/
SYNAPSE_REGISTER(play_Stop)
{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+
players[dst].stop();
}
+/** Gets status of player.
+ * This is just to allow new clients to get the latest events.
+ *
+ * Usually play_InfoMeta and stuff.
+ *
+ */
+SYNAPSE_REGISTER(play_GetStatus)
+{
+ lock_guard<recursive_mutex> lock(vlcMutex);
+ players[dst].sendStatus(msg.src);
+}
//end namespace