[meego-commits] 24084: Changes to MeeGo:1.2:oss/xbmc
rui_long
no_reply at build.meego.com
Thu Sep 22 09:19:19 UTC 2011
Hi,
I have made the following changes to xbmc in project MeeGo:1.2:oss. Please review and accept ASAP.
Thank You,
rui_long
[This message was auto-generated]
---
Request #24084:
submit: devel:tv:1.2/xbmc(r11)(update) -> MeeGo:1.2:oss/xbmc
Message:
TV only package update
State: new 2011-09-22T02:08:16 rui_long
Comment: None
changes files:
--------------
--- xbmc.changes
+++ xbmc.changes
@@ -0,0 +1,3 @@
+* Tue Sept 20 2011 He Junyan <junyan.he at intel.com> - 10.1
+- Modify the to use the UMMS as a backend multimedia server for XBMC
+
new:
----
0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
spec files:
-----------
--- xbmc.spec
+++ xbmc.spec
@@ -1,6 +1,6 @@
#
# Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.22
+# Generated by: spectacle version 0.21
#
# >> macros
# << macros
@@ -49,6 +49,7 @@
Patch32: 0034-increase-cximage-jpeg-buffer-size.patch
Patch33: 0035-enable-multimedia-keys-for-remote.patch
Patch34: 0036-removed-sleep-timer-and-exit-function.patch
+Patch35: 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
Requires: avahi
Requires: SDL
Requires: SDL_mixer
@@ -194,6 +195,8 @@
%patch33 -p1
# 0036-removed-sleep-timer-and-exit-function.patch
%patch34 -p1
+# 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
+%patch35 -p1
# >> setup
# << setup
other changes:
--------------
++++++ 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch (new)
--- 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
+++ 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
+From 19f90393f6364f73f5b12ee56aae3d78344db478 Mon Sep 17 00:00:00 2001
+From: He Junyan <junyan.he at intel.com>
+Date: Wed, 21 Sep 2011 10:51:39 +0800
+Subject: [PATCH] basic OK for UMMS client
+
+---
+ xbmc/cores/meegoplayer/MeegoPlayer.cpp | 399 +++++++++++++++++++++-----------
+ xbmc/cores/meegoplayer/MeegoPlayer.h | 4 +-
+ 2 files changed, 269 insertions(+), 134 deletions(-)
+
+diff --git a/xbmc/cores/meegoplayer/MeegoPlayer.cpp b/xbmc/cores/meegoplayer/MeegoPlayer.cpp
+index 32f0795..319ec75 100755
+--- a/xbmc/cores/meegoplayer/MeegoPlayer.cpp
++++ b/xbmc/cores/meegoplayer/MeegoPlayer.cpp
+@@ -45,13 +45,21 @@
+
+ // Default time after which the item's playcount is incremented
+ #define DEFAULT_PLAYCOUNT_MIN_TIME 10
++#if 0
+ // The player bus name
+ #define UPLAYER_BUS_NAME "uk.co.madeo.uplayer"
+ // The player bus path
+ #define UPLAYER_BUS_PATH "/uk/co/madeo/uplayer"
++#endif
+ // DBUS reply timeout
+ #define DBUS_REPLY_TIMEOUT -1
+
++/* The UMMS Dbus Call. */
++#define UMMS_SERVICE_NAME "com.meego.UMMS"
++#define UMMS_OBJECT_MANAGER_OBJECT_PATH "/com/meego/UMMS/ObjectManager"
++#define UMMS_OBJECT_MANAGER_INTERFACE_NAME "com.meego.UMMS.ObjectManager.iface"
++#define UMMS_MEDIA_PLAYER_INTERFACE_NAME "com.meego.UMMS.MediaPlayer"
++
+ using namespace XFILE;
+
+ CMeegoPlayer::CMeegoPlayer(IPlayerCallback& callback)
+@@ -79,15 +87,21 @@ CMeegoPlayer::CMeegoPlayer(IPlayerCallback& callback)
+
+ m_dialog = NULL;
+ m_isFullscreen = true;
++ m_playerName = NULL;
+
+ if (!InitializeDbus()) {
+ CLog::Log(LOGNOTICE, "Meego dbus player: DBUS initalisation failed");
+ }
++
++ if (!RequestPlayeer(TRUE)) {
++ CLog::Log(LOGNOTICE, "Meego dbus player: Request player failed");
++ }
+ }
+
+ CMeegoPlayer::~CMeegoPlayer()
+ {
+ CloseFile();
++ RequestPlayeer(FALSE);
+ StopThread();
+ }
+
+@@ -119,7 +133,7 @@ bool CMeegoPlayer::CloseFile()
+ if (m_dialog && m_dialog->IsActive()) m_dialog->Close();
+
+ // dbus stop playback
+- callDbusMethod("stop", "", 0);
++ callDbusMethod("Stop", "", 0);
+ // make sure we know we are not playing
+ m_bIsPlaying = false;
+ m_paused = false;
+@@ -182,13 +196,13 @@ void CMeegoPlayer::Process()
+ }
+
+ CLog::Log(LOGNOTICE, "Meego dbus player: URI sent to dbus player is : %s", dbusURI.c_str());
+- int returnCode = callDbusMethod("set_uri", dbusURI, 0);
++ int returnCode = callDbusMethod("SetUri", dbusURI, 0);
+ if (returnCode == -1) {
+ CGUIDialogOK::ShowAndGetInput(257, 853, 0, 0);
+ m_callback.OnPlayBackStopped();
+ return;
+ }
+- callDbusMethod("play", "", 0);
++ callDbusMethod("Play", "", 0);
+
+ // wait until we receive a stop message from the player
+ bool eos = waitOnDbus();
+@@ -220,11 +234,11 @@ void CMeegoPlayer::Pause()
+ {
+ if (m_paused == true) {
+ m_paused = false;
+- callDbusMethod("play", "", 0);
++ callDbusMethod("Play", "", 0);
+ m_callback.OnPlayBackResumed();
+ } else {
+ m_paused = true;
+- callDbusMethod("pause", "", 0);
++ callDbusMethod("Pause", "", 0);
+ m_callback.OnPlayBackPaused();
+ }
+ }
+@@ -364,9 +378,11 @@ void CMeegoPlayer::SetVolume(long volume)
+ /* We are muted */
+ m_volume = 0;
+ } else {
+- m_volume = (double) volume / -10000;
++ //m_volume = (double) volume / -10000;
+ /* Convert what XBMC gives into 0.0 -> 1.0 scale playbin2 uses */
+- m_volume = ((1 - m_volume) - 0.4) * 1.6666;
++ //m_volume = ((1 - m_volume) - 0.4) * 1.6666;
++
++ m_volume = volume;
+ }
+
+ /* update the volume later */
+@@ -408,150 +424,267 @@ bool CMeegoPlayer::InitializeDbus()
+ return true;
+ }
+
+-bool CMeegoPlayer::waitOnDbus()
++
++bool CMeegoPlayer::RequestPlayeer(bool attend)
+ {
+- DBusMessage* message;
++ DBusMessage *message;
++ DBusMessage *reply;
++ char * playerName = NULL;
+
+- if (NULL == connection) {
+- CLog::Log(LOGERROR,"Meego dbus player: Connection is NULL - %s", error.message);
+- return true;
+- }
+- /* add a rule for which messages we want to see */
+- dbus_bus_add_match(connection, "type='signal',interface='"UPLAYER_BUS_NAME"'", &error);
+- dbus_connection_flush(connection);
+- if (dbus_error_is_set(&error)) {
+- CLog::Log(LOGERROR,"Meego dbus player: General error on dbus");
+- return true;
+- }
++ if (connection == NULL) {
++ CLog::Log(LOGDEBUG,"Failed to open connection to dbus. Check permissions: %s", error.message);
++ return false;
++ }
+
+- bool eos = false;
+-
+- /* stay stuck here until dbus says it's ok or m_bIsPlaying is false */
+- while (m_bIsPlaying) {
+- /* non blocking read of the next available message */
+- dbus_connection_read_write(connection, 0);
+- message = dbus_connection_pop_message(connection);
+-
+- /* loop again if we haven't read a message */
+- if (message == NULL) {
+- if (m_speed != m_old_speed) {
+- CLog::Log(LOGDEBUG,"Meego dbus player: m_speed is : %d", m_speed);
+- callDbusMethod ("set_rate", "", m_speed);
+- m_old_speed = m_speed;
+- m_time = callDbusMethod ("get_position", "", 0);
+- } else if (m_volumeu) {
+- Sleep(100);
+- m_volumeu = false;
+- callDbusMethod ("set_volume", "", m_volume);
+- }
+- Sleep(100);
++ if (dbus_error_is_set(&error)) {
++ CLog::Log(LOGERROR,"Meego dbus player: General error on dbus");
++ if (!InitializeDbus()) {
++ CLog::Log(LOGNOTICE, "Meego dbus player: DBUS initalisation failed");
++ }
+ }
+- else {
+- CLog::Log(LOGDEBUG,"Meego dbus player: Received signal from dbus");
+- if (dbus_message_is_signal (message, UPLAYER_BUS_NAME, "emitEOSSignal")) {
+- /* we are EOF */
+- m_bIsPlaying = false;
+- eos = true;
+- CLog::Log(LOGNOTICE,"Meego dbus player: EOF received");
+- } else if (dbus_message_is_signal (message, UPLAYER_BUS_NAME, "emitNewURI")) {
+- CLog::Log(LOGDEBUG,"Meego dbus player: New URI signal received");
+- } else if (dbus_message_is_signal (message, UPLAYER_BUS_NAME, "emitPlaying")) {
+- CLog::Log(LOGDEBUG,"Meego dbus player: Playing signal received");
+- } else if (dbus_message_is_signal (message, UPLAYER_BUS_NAME, "emitError")) {
+- CLog::Log(LOGDEBUG,"Meego dbus player: Error signal received");
+- m_bIsPlaying = false;
+- CGUIDialogOK::ShowAndGetInput(257, 854, 0, 0);
+- } else if (dbus_message_is_signal (message, UPLAYER_BUS_NAME, "emitDuration")) {
+- DBusMessageIter args;
+- int type;
+-
+- CLog::Log(LOGDEBUG,"Meego dbus player: Duration signal received");
+- if (dbus_message_iter_init(message, &args)) {
+- /* message is not empty */
+- type = dbus_message_iter_get_arg_type (&args);
+- if (type == DBUS_TYPE_INT32) {
+- dbus_message_iter_get_basic(&args, &m_totalTime);
+- CLog::Log(LOGDEBUG, "Meego dbus player: duration is %d", m_totalTime);
+- }
++
++ if(attend) {
++ /* Now init the Object and get the player. */
++ message = dbus_message_new_method_call (UMMS_SERVICE_NAME,
(334 more lines skipped)
++++++ xbmc.yaml
--- xbmc.yaml
+++ xbmc.yaml
@@ -43,6 +43,7 @@
- 0034-increase-cximage-jpeg-buffer-size.patch
- 0035-enable-multimedia-keys-for-remote.patch
- 0036-removed-sleep-timer-and-exit-function.patch
+ - 0037-modify-meegoplayer-to-use-UMMS-as-backend.patch
Description: |
XBMC media center is a free cross-platform media-player jukebox and
entertainment hub. XBMC can play a spectrum of of multimedia formats,
More information about the MeeGo-commits
mailing list