[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/noatun/modules/phonon-engine
From:       Stefan Gehn <mETz81 () web ! de>
Date:       2007-02-14 17:37:29
Message-ID: 1171474649.241956.20271.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 633647 by metz:

- debug output is phonon objects are missing
- clean up license/copyright header


 M  +41 -17    noatun_phonon.cpp  
 M  +10 -16    noatun_phonon.h  


--- trunk/KDE/kdemultimedia/noatun/modules/phonon-engine/noatun_phonon.cpp #633646:633647
@@ -1,20 +1,14 @@
-/***************************************************************************
-                           Phonon Engine for Noatun
-                             -------------------
-    begin                : 2007-02-01
-    copyright            : (C) 2007 by Stefan Gehn
-    email                : Stefan Gehn <metz/AT/gehn/DOT/net>
- ***************************************************************************/
+/* This file is part of Noatun
 
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+  This file was created on 2007-02-01
 
+  Copyright 2007 by Stefan Gehn <mETz81@web.de>
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+*/
 #include "noatun_phonon.h"
 
 #include <noatun/player.h>
@@ -122,7 +116,13 @@
 Player::State PhononPlugin::state() const
 {
 	if (mMediaObject)
+	{
 		return PhononPlugin::convertState(mMediaObject->state());
+	}
+	else
+	{
+		kWarning(66666) << k_funcinfo << "NO MEDIAOBJECT" << endl;
+	}
 	return Player::StoppedState;
 }
 
@@ -130,7 +130,15 @@
 int PhononPlugin::position() const
 {
 	if (mMediaObject)
-		return mMediaObject->currentTime(); // qint64 vs. int
+	{
+		int pos = mMediaObject->currentTime(); // qint64 vs. int
+		//kDebug(66666) << k_funcinfo << pos << endl;
+		return pos;
+	}
+	else
+	{
+		kWarning(66666) << k_funcinfo << "NO MEDIAOBJECT" << endl;
+	}
 	return -1;
 }
 
@@ -138,7 +146,15 @@
 int PhononPlugin::length() const
 {
 	if (mMediaObject)
-		return mMediaObject->totalTime(); // qint64 vs. int
+	{
+		int len = mMediaObject->totalTime(); // qint64 vs. int
+		kDebug(66666) << k_funcinfo << len << endl;
+		return len;
+	}
+	else
+	{
+		kWarning(66666) << k_funcinfo << "NO MEDIAOBJECT" << endl;
+	}
 	return -1;
 }
 
@@ -153,9 +169,13 @@
 {
 	//kDebug(66666) << k_funcinfo << endl;
 	if (mAudioOutput)
+	{
 		return (unsigned int)(100.00 * mAudioOutput->volume() + 0.5);
+	}
 	else
+	{
 		kWarning(66666) << k_funcinfo << "Missing a Phonon::AudioOutput object" << endl;
+	}
 	return 0u;
 }
 
@@ -164,9 +184,13 @@
 {
 	//kDebug(66666) << k_funcinfo << endl;
 	if (mAudioOutput)
+	{
 		mAudioOutput->setVolume(percent * 0.01);
+	}
 	else
+	{
 		kWarning(66666) << k_funcinfo << "Missing a Phonon::AudioOutput object" << endl;
+	}
 }
 
 
--- trunk/KDE/kdemultimedia/noatun/modules/phonon-engine/noatun_phonon.h #633646:633647
@@ -1,20 +1,14 @@
-/***************************************************************************
-                           Phonon Engine for Noatun
-                             -------------------
-    begin                : 2007-02-01
-    copyright            : (C) 2007 by Stefan Gehn
-    email                : Stefan Gehn <metz/AT/gehn/DOT/net>
- ***************************************************************************/
+/* This file is part of Noatun
 
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+  This file was created on 2007-02-01
 
+  Copyright 2007 by Stefan Gehn <mETz81@web.de>
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+*/
 #ifndef N_PHONON_H
 #define N_PHONON_H
 
@@ -56,7 +50,7 @@
 	virtual void stop();
 	virtual void setPosition(int msec);
 
-private slots:
+private Q_SLOTS:
 	void updateState(Phonon::State oldState, Phonon::State newState);
 	void finishedPlaying();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic