summaryrefslogtreecommitdiff
path: root/browser-plugin
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2010-01-21 20:30:05 +0000
committerBastien Nocera <hadess@hadess.net>2010-01-21 20:30:05 +0000
commit37fff207f6e33b431caffcc164d70b88c67b01ea (patch)
tree189987484603c55783351522727f3dedfbf689a2 /browser-plugin
parent1f01e518a3348338b9e381814c455884376fdc38 (diff)
Add better debug
Diffstat (limited to 'browser-plugin')
-rw-r--r--browser-plugin/totem-plugin-viewer.c21
-rw-r--r--browser-plugin/totemPlugin.cpp11
2 files changed, 27 insertions, 5 deletions
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 8800a060..323c102b 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -501,6 +501,8 @@ totem_embedded_do_command (TotemEmbedded *embedded,
{
g_return_val_if_fail (command != NULL, FALSE);
+ g_message ("totem_embedded_do_command: %s", command);
+
if (strcmp (command, TOTEM_COMMAND_PLAY) == 0) {
return totem_embedded_play (embedded, error);
}
@@ -524,6 +526,9 @@ totem_embedded_set_href (TotemEmbedded *embedded,
const char *target,
GError *error)
{
+ g_message ("totem_embedded_set_href %s (target: %s)",
+ href_uri, target);
+
g_free (embedded->href_uri);
g_free (embedded->target);
@@ -666,6 +671,8 @@ totem_pl_item_free (gpointer data, gpointer user_data)
static gboolean
totem_embedded_clear_playlist (TotemEmbedded *emb, GError *error)
{
+ g_message ("totem_embedded_clear_playlist");
+
g_list_foreach (emb->playlist, (GFunc) totem_pl_item_free, NULL);
g_list_free (emb->playlist);
@@ -692,7 +699,8 @@ totem_embedded_add_item (TotemEmbedded *embedded,
{
TotemPlItem *item;
- g_message ("totem_embedded_add_item: %s", uri);
+ g_message ("totem_embedded_add_item: %s (base: %s title: %s subtitle: %s)",
+ uri, base_uri, title, subtitle);
item = g_slice_new0 (TotemPlItem);
item->uri = g_strdup (uri);
@@ -815,6 +823,8 @@ static gboolean
totem_embedded_close_stream (TotemEmbedded *emb,
GError *error)
{
+ g_message ("totem_embedded_close_stream");
+
if (!emb->is_browser_stream)
return TRUE;
@@ -887,7 +897,8 @@ totem_embedded_set_local_file (TotemEmbedded *emb,
{
char *file_uri;
- g_message ("Setting the current path to %s", path);
+ g_message ("Setting the current path to %s (uri: %s base: %s)",
+ path, uri, base_uri);
totem_embedded_clear_playlist (emb, NULL);
@@ -909,6 +920,8 @@ totem_embedded_set_local_cache (TotemEmbedded *emb,
{
int fd;
+ g_message ("totem_embedded_set_local_cache: %s", path);
+
/* FIXME Should also handle playlists */
if (!emb->is_browser_stream)
return TRUE;
@@ -941,8 +954,8 @@ totem_embedded_set_playlist (TotemEmbedded *emb,
GFile *src, *dst;
int fd;
- g_message ("Setting the current playlist to %s (base: %s)",
- path, base_uri);
+ g_message ("Setting the current playlist to %s (uri: %s base: %s)",
+ path, uri, base_uri);
totem_embedded_clear_playlist (emb, NULL);
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index d167040f..12e9ac51 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -855,6 +855,7 @@ totemPlugin::ViewerReady ()
#ifdef TOTEM_NARROWSPACE_PLUGIN
/* Tell the viewer it has an href */
if (mHref) {
+ Dm("SetHref in ViewerReady");
dbus_g_proxy_call_no_reply (mViewerProxy,
"SetHref",
G_TYPE_STRING, mHref,
@@ -2392,6 +2393,7 @@ totemPlugin::StreamAsFile (NPStream *stream,
gboolean retval = TRUE;
GError *error = NULL;
if (mIsPlaylist) {
+ Dm("Calling SetPlaylist in StreamAsFile");
retval = dbus_g_proxy_call (mViewerProxy,
"SetPlaylist",
&error,
@@ -2406,6 +2408,7 @@ totemPlugin::StreamAsFile (NPStream *stream,
* completely in the cache.)
*/
else if (mBytesStreamed == 0) {
+ Dm("Calling SetLocalFile from ViewerReady");
retval = dbus_g_proxy_call (mViewerProxy,
"SetLocalFile",
&error,
@@ -2454,7 +2457,13 @@ totemPlugin::URLNotify (const char *url,
NPReason reason,
void *notifyData)
{
- D ("URLNotify URL '%s' reason %d", url ? url : "", reason);
+ const char *reasons[] = {
+ "Base (undefined)",
+ "Done",
+ "Network error",
+ "User break"
+ };
+ D ("URLNotify URL '%s' reason %d (%s)", url ? url : "", reason, reasons[reason]);
/* If we get called when we expect a stream,
* it means that the stream failed.