QtMoko media playback progress?

2012-11-21 Thread Neil Jerram
Hi Radek,

With current git master (well, actually 052d8d852), I don't see the
progress bar moving when I play a piece of music in the media player.
Do you?

I wondered if this might be connected with using the '#ifndef
QT_NO_GLIB' implementation of gstreamerbushelper.cpp.  The '#ifdef
QT_NO_GLIB' appears to have support for reporting progress, by emitting
the message() signal with a null message, but I don't see any equivalent
of that in the '#ifndef QT_NO_GLIB' implementation.

Regards,
Neil

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko media playback progress?

2012-11-22 Thread Radek Polak
On Wednesday, November 21, 2012 11:29:35 PM Neil Jerram wrote:

> Hi Radek,
> 
> With current git master (well, actually 052d8d852), I don't see the
> progress bar moving when I play a piece of music in the media player.
> Do you?

I dont either. The gstreamer looks quite unfinished yet. But it shouldnt be 
that hard. You can take insipration how to do it in phonon - it does nearly 
the same that we do, e.g. qwidgetvideosink.cpp is nearly the same as our 
gstreamerqtopiavideosink.cpp etc..

If you would like to take a look at it, it would be nice.

> I wondered if this might be connected with using the '#ifndef
> QT_NO_GLIB' implementation of gstreamerbushelper.cpp.  The '#ifdef
> QT_NO_GLIB' appears to have support for reporting progress, by emitting
> the message() signal with a null message, but I don't see any equivalent
> of that in the '#ifndef QT_NO_GLIB' implementation.

It's very likely that the gstreamer was tested and implement for the 
QT_NO_GLIB variant.

We are now using glib event loop (same as X11-qt) - this is needed e.g. for 
html5 videos. If there is simple way to add this to our glib ifdef then it 
would be great.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko media playback progress?

2012-11-22 Thread Neil Jerram
Radek Polak  writes:

> On Wednesday, November 21, 2012 11:29:35 PM Neil Jerram wrote:
>
>> Hi Radek,
>> 
>> With current git master (well, actually 052d8d852), I don't see the
>> progress bar moving when I play a piece of music in the media player.
>> Do you?
>
> I dont either. The gstreamer looks quite unfinished yet. But it shouldnt be 
> that hard. You can take insipration how to do it in phonon - it does nearly 
> the same that we do, e.g. qwidgetvideosink.cpp is nearly the same as our 
> gstreamerqtopiavideosink.cpp etc..
>
> If you would like to take a look at it, it would be nice.

Sure, I will do that.

>> I wondered if this might be connected with using the '#ifndef
>> QT_NO_GLIB' implementation of gstreamerbushelper.cpp.  The '#ifdef
>> QT_NO_GLIB' appears to have support for reporting progress, by emitting
>> the message() signal with a null message, but I don't see any equivalent
>> of that in the '#ifndef QT_NO_GLIB' implementation.
>
> It's very likely that the gstreamer was tested and implement for the 
> QT_NO_GLIB variant.
>
> We are now using glib event loop (same as X11-qt) - this is needed e.g. for 
> html5 videos. If there is simple way to add this to our glib ifdef then it 
> would be great.

Thanks, that's good to know.

By the way, I am also making gradual progress on the "Draft Message"
problem, which is to do with the QMailMessage::Incoming flag being
incorrectly reset on some messages.  It affects email as well as SMS,
and I think it's timing dependent because it doesn't every incoming
message.

Regards,
Neil

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko media playback progress?

2012-11-22 Thread Radek Polak
On Thursday, November 22, 2012 07:55:31 PM Neil Jerram wrote:

> By the way, I am also making gradual progress on the "Draft Message"
> problem, which is to do with the QMailMessage::Incoming flag being
> incorrectly reset on some messages.  It affects email as well as SMS,
> and I think it's timing dependent because it doesn't every incoming
> message.

For me it triggered when i received SMS on v49 rootfs and rebooted to rootfs 
with 4.8.3 Qt. Maybe this will help you.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko media playback progress?

2012-11-23 Thread Neil Jerram
Neil Jerram  writes:

> Radek Polak  writes:
>
>> On Wednesday, November 21, 2012 11:29:35 PM Neil Jerram wrote:
>>
>>> Hi Radek,
>>> 
>>> With current git master (well, actually 052d8d852), I don't see the
>>> progress bar moving when I play a piece of music in the media player.
>>> Do you?
>>
>> I dont either. The gstreamer looks quite unfinished yet. But it shouldnt be 
>> that hard. You can take insipration how to do it in phonon - it does nearly 
>> the same that we do, e.g. qwidgetvideosink.cpp is nearly the same as our 
>> gstreamerqtopiavideosink.cpp etc..
>>
>> If you would like to take a look at it, it would be nice.
>
> Sure, I will do that.

The attached patch fixes this.

Regards,
Neil

>From 033c9473a840cdfdc9171cae27a204c853efc5aa Mon Sep 17 00:00:00 2001
From: Neil Jerram 
Date: Fri, 23 Nov 2012 23:10:23 +
Subject: [PATCH] gstreamer: generate periodic indication of media playback
 position

---
 .../mediaengines/gstreamer/gstreamerbushelper.cpp  |   22 
 1 file changed, 22 insertions(+)

diff --git a/src/plugins/mediaengines/gstreamer/gstreamerbushelper.cpp b/src/plugins/mediaengines/gstreamer/gstreamerbushelper.cpp
index b22dbb8..af358d6 100644
--- a/src/plugins/mediaengines/gstreamer/gstreamerbushelper.cpp
+++ b/src/plugins/mediaengines/gstreamer/gstreamerbushelper.cpp
@@ -37,12 +37,14 @@ public:
 this->m_helper = helper;
 setParent(helper);
 m_tag = gst_bus_add_watch_full(bus, 0, busCallback, this, NULL);
+	m_intervalTimer->start();
 }
 
 void removeWatch(BusHelper* helper)
 {
 Q_UNUSED(helper);
 g_source_remove(m_tag);
+	m_intervalTimer->stop();
 }
 
 static BusHelperPrivate* instance()
@@ -50,7 +52,26 @@ public:
 return new BusHelperPrivate;
 }
 
+private slots:
+void interval()
+{
+emit m_helper->message(Message());
+}
+
 private:
+BusHelperPrivate()
+{
+m_intervalTimer = new QTimer(this);
+m_intervalTimer->setInterval(250);
+
+connect(m_intervalTimer, SIGNAL(timeout()), SLOT(interval()));
+}
+
+~BusHelperPrivate()
+{
+delete m_intervalTimer;
+}
+
 void processMessage(GstBus* bus, GstMessage* message)
 {
 Q_UNUSED(bus);
@@ -65,6 +86,7 @@ private:
 
 guint   m_tag;
 BusHelper*  m_helper;
+QTimer* m_intervalTimer;
 };
 
 #else
-- 
1.7.10.4

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko media playback progress?

2012-11-24 Thread Radek Polak
On Saturday, November 24, 2012 12:12:40 AM Neil Jerram wrote:

> Neil Jerram  writes:
> > Radek Polak  writes:
> >> On Wednesday, November 21, 2012 11:29:35 PM Neil Jerram wrote:
> >>> Hi Radek,
> >>> 
> >>> With current git master (well, actually 052d8d852), I don't see the
> >>> progress bar moving when I play a piece of music in the media player.
> >>> Do you?
> >> 
> >> I dont either. The gstreamer looks quite unfinished yet. But it shouldnt
> >> be that hard. You can take insipration how to do it in phonon - it does
> >> nearly the same that we do, e.g. qwidgetvideosink.cpp is nearly the
> >> same as our gstreamerqtopiavideosink.cpp etc..
> >> 
> >> If you would like to take a look at it, it would be nice.
> > 
> > Sure, I will do that.
> 
> The attached patch fixes this.

Oki applied this one too now. I think gstreamer should report position in 
callback automatically without need to poll it, but this can be done later...

Thanks for the patch!

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community