summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Eefting <edwin@datux.nl>2012-11-09 23:42:06 (GMT)
committer Edwin Eefting <edwin@datux.nl>2012-11-09 23:42:06 (GMT)
commitb3f62c1da7a96601c314fbc431d474dd13d8ed01 (patch)
treec9ea23de0a42f62ab0d1f4d928a22827e897a6fd
parent1b66f02e61145e1d3902a9deed0462aadd567ec3 (diff)
vlc logging disabled for now. (api changed and its not really possible to do per-libvlc logging anyway)
-rw-r--r--modules/docs/html/classplay__vlc_1_1CPlayer-members.html2
-rw-r--r--modules/docs/html/classplay__vlc_1_1CPlayer.html35
-rw-r--r--modules/docs/html/functions.html3
-rw-r--r--modules/docs/html/functions_func.html3
-rw-r--r--modules/play_vlc.module/CMakeLists.txt2
-rw-r--r--modules/play_vlc.module/module.cpp16
-rw-r--r--modules/test.module/module.cpp6
7 files changed, 54 insertions, 13 deletions
diff --git a/modules/docs/html/classplay__vlc_1_1CPlayer-members.html b/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
index 58d6286..80a60a0 100644
--- a/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
+++ b/modules/docs/html/classplay__vlc_1_1CPlayer-members.html
@@ -76,7 +76,7 @@ This is the complete list of members for <a class="el" href="classplay__vlc_1_1C
<tr bgcolor="#f0f0f0"><td><b>vlcEventGeneric</b>(const libvlc_event_t *event, void *player) (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, static]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>vlcEventMediaMetaChanged</b>(const libvlc_event_t *event, void *player) (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, static]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>vlcEventMediaPlayerTimeChanged</b>(const libvlc_event_t *event, void *player) (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, static]</code></td></tr>
- <tr bgcolor="#f0f0f0"><td><b>vlcEventMediaStateChanged</b>(const libvlc_event_t *event, void *player) (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, static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classplay__vlc_1_1CPlayer.html#a39bca8aacf2cc0d3993ba1973674b43b">vlcEventMediaStateChanged</a>(const libvlc_event_t *event, void *player)</td><td><a class="el" href="classplay__vlc_1_1CPlayer.html">play_vlc::CPlayer</a></td><td><code> [inline, static]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>vlcEventMediaSubItemAdded</b>(const libvlc_event_t *event, void *player) (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, static]</code></td></tr>
<tr bgcolor="#f0f0f0"><td><b>vlcMeta2Var</b>(libvlc_media_t *m, Cvar &amp;var) (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, static]</code></td></tr>
</table></div><!-- contents -->
diff --git a/modules/docs/html/classplay__vlc_1_1CPlayer.html b/modules/docs/html/classplay__vlc_1_1CPlayer.html
index d6ebe60..d54b7d9 100644
--- a/modules/docs/html/classplay__vlc_1_1CPlayer.html
+++ b/modules/docs/html/classplay__vlc_1_1CPlayer.html
@@ -97,8 +97,7 @@ static void&#160;</td><td class="memItemRight" valign="bottom"><b>vlcEventMediaP
static void&#160;</td><td class="memItemRight" valign="bottom"><b>vlcMeta2Var</b> (libvlc_media_t *m, Cvar &amp;var)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c56fa7a5bf301042ab235bbdb6345e0"></a><!-- doxytag: member="play_vlc::CPlayer::vlcEventMediaMetaChanged" ref="a9c56fa7a5bf301042ab235bbdb6345e0" args="(const libvlc_event_t *event, void *player)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>vlcEventMediaMetaChanged</b> (const libvlc_event_t *event, void *player)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39bca8aacf2cc0d3993ba1973674b43b"></a><!-- doxytag: member="play_vlc::CPlayer::vlcEventMediaStateChanged" ref="a39bca8aacf2cc0d3993ba1973674b43b" args="(const libvlc_event_t *event, void *player)" -->
-static void&#160;</td><td class="memItemRight" valign="bottom"><b>vlcEventMediaStateChanged</b> (const libvlc_event_t *event, void *player)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classplay__vlc_1_1CPlayer.html#a39bca8aacf2cc0d3993ba1973674b43b">vlcEventMediaStateChanged</a> (const libvlc_event_t *event, void *player)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6271813e86a6a0bd5ce59f0c08b219f"></a><!-- doxytag: member="play_vlc::CPlayer::vlcEventMediaSubItemAdded" ref="ad6271813e86a6a0bd5ce59f0c08b219f" args="(const libvlc_event_t *event, void *player)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>vlcEventMediaSubItemAdded</b> (const libvlc_event_t *event, void *player)</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
@@ -106,6 +105,38 @@ Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b5b24dcc5be9036e8bb4d330bdb3a66"></a><!-- doxytag: member="play_vlc::CPlayer::description" ref="a6b5b24dcc5be9036e8bb4d330bdb3a66" args="" -->
string&#160;</td><td class="memItemRight" valign="bottom"><b>description</b></td></tr>
</table>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="a39bca8aacf2cc0d3993ba1973674b43b"></a><!-- doxytag: member="play_vlc::CPlayer::vlcEventMediaStateChanged" ref="a39bca8aacf2cc0d3993ba1973674b43b" args="(const libvlc_event_t *event, void *player)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void <a class="el" href="classplay__vlc_1_1CPlayer.html#a39bca8aacf2cc0d3993ba1973674b43b">play_vlc::CPlayer::vlcEventMediaStateChanged</a> </td>
+ <td>(</td>
+ <td class="paramtype">const libvlc_event_t *&#160;</td>
+ <td class="paramname"><em>event</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>player</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td><code> [inline, static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>check the logs as well libvlc_log_message_t logMessage; out.clear(); out.event="play_Log";</p>
+<p>free the old iterator, and get a fresh one libvlc_log_iterator_free(((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLogIterator); ((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLogIterator=libvlc_log_get_iterator(((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLog); while (libvlc_log_iterator_has_next(((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLogIterator)) {</p>
+<p>libvlc_log_iterator_next(((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLogIterator, &amp;logMessage); if (logMessage.i_severity==0) out["severity"]="info"; else if (logMessage.i_severity==1) out["severity"]="error"; else if (logMessage.i_severity==2) out["severity"]="warning"; else if (logMessage.i_severity==3) out["severity"]="debug";</p>
+<p>out["type"]=logMessage.psz_type; out["name"]=logMessage.psz_name; out["message"]=logMessage.psz_message; if (logMessage.psz_header) out["header"]=logMessage.psz_header; out.send(); } clear logs libvlc_log_clear(((<a class="el" href="classplay__vlc_1_1CPlayer.html">CPlayer</a> *)player)-&gt;mLog);</p>
+
+</div>
+</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>play_vlc.module/module.cpp</li>
</ul>
diff --git a/modules/docs/html/functions.html b/modules/docs/html/functions.html
index 7a57767..d9db019 100644
--- a/modules/docs/html/functions.html
+++ b/modules/docs/html/functions.html
@@ -78,6 +78,9 @@
<li>setInfo()
: <a class="el" href="classpaper_1_1CpaperClient.html#a185feb49970e8f19ac40adcc76cb9aee">paper::CpaperClient</a>
</li>
+<li>vlcEventMediaStateChanged()
+: <a class="el" href="classplay__vlc_1_1CPlayer.html#a39bca8aacf2cc0d3993ba1973674b43b">play_vlc::CPlayer</a>
+</li>
</ul>
</div><!-- contents -->
diff --git a/modules/docs/html/functions_func.html b/modules/docs/html/functions_func.html
index 3c85a33..7d70a90 100644
--- a/modules/docs/html/functions_func.html
+++ b/modules/docs/html/functions_func.html
@@ -78,6 +78,9 @@
<li>setInfo()
: <a class="el" href="classpaper_1_1CpaperClient.html#a185feb49970e8f19ac40adcc76cb9aee">paper::CpaperClient</a>
</li>
+<li>vlcEventMediaStateChanged()
+: <a class="el" href="classplay__vlc_1_1CPlayer.html#a39bca8aacf2cc0d3993ba1973674b43b">play_vlc::CPlayer</a>
+</li>
</ul>
</div><!-- contents -->
diff --git a/modules/play_vlc.module/CMakeLists.txt b/modules/play_vlc.module/CMakeLists.txt
index 5969111..141205d 100644
--- a/modules/play_vlc.module/CMakeLists.txt
+++ b/modules/play_vlc.module/CMakeLists.txt
@@ -10,7 +10,7 @@ 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)
+pkg_check_modules (VLC libvlc>=1.1.0)
IF(VLC_FOUND)
diff --git a/modules/play_vlc.module/module.cpp b/modules/play_vlc.module/module.cpp
index e03cfb6..1f794ad 100644
--- a/modules/play_vlc.module/module.cpp
+++ b/modules/play_vlc.module/module.cpp
@@ -45,8 +45,8 @@ class CPlayer
//pointers to vlc objects and event managers
libvlc_instance_t * mVlc;
- libvlc_log_t * mLog;
- libvlc_log_iterator_t * mLogIterator;
+ //dont log for now, since the log api doesnt even specify to which libvlc instance the logentries belong:
+ //libvlc_log_subscriber_t *mLogSubscriber;
libvlc_media_list_t* mList;
libvlc_event_manager_t *mListEm;
@@ -120,7 +120,7 @@ class CPlayer
}
//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;
@@ -226,7 +226,7 @@ class CPlayer
out.send();
-
+/**
//check the logs as well
libvlc_log_message_t logMessage;
out.clear();
@@ -257,6 +257,7 @@ class CPlayer
}
//clear logs
libvlc_log_clear(((CPlayer *)player)->mLog);
+**/
}
static void vlcEventMediaSubItemAdded(const libvlc_event_t * event, void *player)
@@ -294,7 +295,7 @@ class CPlayer
if (!mVlc)
throwError("Problem creating new vlc instance");
-
+/*
//open logger
mLog=libvlc_log_open(mVlc);
if (!mVlc)
@@ -303,6 +304,7 @@ class CPlayer
mLogIterator=libvlc_log_get_iterator(mLog);
if (!mLogIterator)
throwError("Problem getting log iterator");
+*/
//create list player
DEB("Creating list player");
@@ -355,7 +357,7 @@ class CPlayer
bool ok()
{
- return (mLogIterator!=NULL && mLog!=NULL && mVlc!=NULL && mPlayer!=NULL && mList!=NULL && mListPlayer!=NULL);
+ return (/*mLogIterator!=NULL && mLog!=NULL &&*/ mVlc!=NULL && mPlayer!=NULL && mList!=NULL && mListPlayer!=NULL);
}
void destroy()
@@ -373,11 +375,13 @@ class CPlayer
if (mListPlayer)
libvlc_media_list_player_release(mListPlayer);
+/*
if (mLogIterator)
libvlc_log_iterator_free(mLogIterator);
if (mLog)
libvlc_log_close(mLog);
+*/
if (mVlc)
libvlc_release(mVlc);
diff --git a/modules/test.module/module.cpp b/modules/test.module/module.cpp
index 5bbb877..43b0def 100644
--- a/modules/test.module/module.cpp
+++ b/modules/test.module/module.cpp
@@ -77,8 +77,8 @@ SYNAPSE_REGISTER(module_Init)
// out["path"]="modules/http_json.module/libhttp_json.so";
// out.send();
-// out["path"]="modules/play_vlc.module/libplay_vlc.so";
-// out.send();
+ out["path"]="modules/play_vlc.module/libplay_vlc.so";
+ out.send();
// out["path"]="modules/exec.module/libexec.so";
// out.send();
@@ -208,7 +208,7 @@ SYNAPSE_REGISTER(exec_Ended)
std::string playUrl;
SYNAPSE_REGISTER(play_vlc_Ready)
{
- playUrl="http://listen.diXXX.fm/public3/chilloutdreams.pls";
+ playUrl="http://listen.di.fm/public3/chilloutdreams.pls";
Cmsg out;
out.dst=msg["session"];
out.event="play_NewPlayer";