summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/mediaobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/mmf/mediaobject.h')
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index a55b6e6..2eb70c3 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -22,6 +22,10 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <Phonon/MediaSource>
#include <Phonon/MediaObjectInterface>
#include <QScopedPointer>
+#include <QTimer>
+
+// For recognizer
+#include <apgcli.h>
namespace Phonon
{
@@ -77,10 +81,63 @@ namespace Phonon
void tick(qint64 time);
private:
+ static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
+
+// The following has been moved into the AbstractPlayer-derived classes
+// This needs to be cleaned up - at present, there is no way for this class
+// to enter an error state, unless it has already constructed m_player
+#if 0
+ /**
+ * Defined private state enumeration in order to add GroundState
+ */
+ enum PrivateState
+ {
+ LoadingState = Phonon::LoadingState,
+ StoppedState = Phonon::StoppedState,
+ PlayingState = Phonon::PlayingState,
+ BufferingState = Phonon::BufferingState,
+ PausedState = Phonon::PausedState,
+ ErrorState = Phonon::ErrorState,
+ GroundState
+ };
+
+ /**
+ * Converts PrivateState into the corresponding Phonon::State
+ */
+ static Phonon::State phononState(PrivateState state);
+
+ /**
+ * Changes state and emits stateChanged()
+ */
+ void changeState(PrivateState newState);
+
+ ErrorType m_error;
+ PrivateState m_state;
+#endif
+
+ RApaLsSession m_recognizer;
+ RFs m_fileServer;
+ enum MediaType { MediaTypeUnknown, MediaTypeAudio, MediaTypeVideo };
+ MediaType mimeTypeToMediaType(const TDesC& mimeType);
+ MediaType fileMediaType(const QString& fileName);
+ // TODO: urlMediaType function
+
+ // Storing the file handle here to work around KErrInUse error
+ // from MMF player utility OpenFileL functions
+ RFile m_file;
+
+ AudioOutput* m_audioOutput;
+
+ qint32 m_tickInterval;
+
+ QTimer* m_tickTimer;
+
+ qreal m_volume;
+ int m_maxVolume;
+
void loadPlayer(const MediaSource &source);
QScopedPointer<AbstractPlayer> m_player;
-
};
}
}