maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [ANNOUNCE] Alpha release of Open Media Player (https://talk.maemo.org/showthread.php?t=72156)

gidzzz 2014-01-02 23:16

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by sixwheeledbeast (Post 1403225)
I would guess it's the same package but thumb compiled.

That's right, the purpose of my repository is to provide easily installable Thumb-compiled packages from extras-devel.

Edit:

Quote:

Originally Posted by xes (Post 1403230)
Just verified the latest update. Sorry, the problem is still there.
Now the message concerning the position has disappeared but some video still can't be played and when it happens syslog reports:

That's to be expected, as I have not yet done anything about the playback failure. As you have observed, it also affects the stock player, thus I believe it is a problem in MAFW and it might be impossible to work around it in OMP.

I cannot play some videos from time to time, but IIRC both players should immediately show an error in that case and rebooting helps. No 30-second delays or endless dots. Maybe reinstalling some MAFW-related packages would help? Or resetting Tracker database? Oh, and I don't have the HD codecs installed (using N900 mainly for music).

xes 2014-01-03 00:07

Re: [ANNOUNCE] Alpha release of Open Media Player
 
@gidzzz
Btw, with the position fix it seems to work better.. and the number of retries you are required to do before obtain the video are really decreased.

xes 2014-01-03 10:15

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Further tests..

"stracing" openmediaplayer i have discovered that when a video does not starts there is an error "resource not available" calling mafw-gst-renderer.

Instead reboot, i have killed mafw-gst-renderer and tryed again the play.
Voilą! Video is working!

Until the thing is fixed, (WARNING: quick and dirty solution..) i have replaced openmediaplayer with a script that kills mafw-gst-renderer at every start, something like:


#!/bin/sh
kill -9 $(busybox ps |grep mafw-gst-renderer | grep -v grep | awk '{ print $1}')
openmediaplayer.orig $@
kill -9 $(busybox ps |grep mafw-gst-renderer | grep -v grep | awk '{ print $1}')



EDIT:
Now the scripts kills mafw-gst-renderer also after OMP exits.
This avoids that a monster mafw-gst-renderer process of 30/40MB remains loaded in memory (when hanged)

Estel 2014-01-03 19:31

Re: [ANNOUNCE] Alpha release of Open Media Player
 
As I reported some time ago, kill mafw-dbus-wrapper also does the trick, i.e. makes unplayable videos playable without rebooting. Of course xes's solution got much more sense (I think), just wanted to note it, in case it could be important.

/Estel

pali 2014-01-08 20:14

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by freemangordon (Post 1393738)

This is only half solution. MAFW will for each log line call function via pointer - which is IMHO slow and using CPU... This will only reduce IO for syslog file.

Quote:

Originally Posted by gidzzz (Post 1403086)
A small update (20140102; should enter extras-devel shortly, Thumb version already available):
  • Disabled radio mode fallback for local videos.
  • Stricter checks regarding starting/stopping of media position polling.
  • Updated translations.



OMP did not perform enough checks to properly decide when to start/stop position polling, but I've just fixed this. I am pretty sure this problem was much older than one year.

However, recent changes do not prevent OMP from appearing in syslog, they only make it appear there when polling is really required. To make it disappear completely, g_debug()s in mafw-dbus.c have to be disabled, as all requests to MAFW from applications using mafw-shared for that seem to go through functions like mafw_dbus_send_async() and are logged there.

IMO recompiling libmafw-shared0 is a good idea, as I have never found those messages to be useful, and other applications would also be silenced. If recompiling poses a problem, I can disable OMP's messages by merging this (what freemangordon suggested): https://gitorious.org/qt-mediaplayer...452da041988600.



Is it not possible or not desired to upload the modified version to extras?

P.S. Sorry for being so absent lately, I still don't have my laptop. :(

Still recompiling MAFW without DEBUG is not final solution. There still will be lot of dbus calls (because that functions between MAFW daemon and OMP using dbus) which consume CPU... and dbus is slow. I think that polling should not be used over dbus.

freemangordon 2014-01-08 20:53

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by pali (Post 1404923)
This is only half solution. MAFW will for each log line call function via pointer - which is IMHO slow and using CPU... This will only reduce IO for syslog file.

TBH I don't think 10 or even 100 calls per minute will eat that much CPU. That call through a function pointer will be about 20 instructions at most, includeing the final BX LR - so 20-30 CPU cycles. Syslog IO won't be increased as glib checks the log flags and simply returns without doing any IO. In that regard - we should revert PA log to syslog patch in CSSU :P

Quote:

Still recompiling MAFW without DEBUG is not final solution. There still will be lot of dbus calls (because that functions between MAFW daemon and OMP using dbus) which consume CPU... and dbus is slow. I think that polling should not be used over dbus.
Now, what I miss so far is *why* mafw spits to syslog when called from OMP, but does not when stock MP uses it. I think this is the question to be answered first, I bet the solution to the problem will become clear once we have that.

gidzzz 2014-01-08 23:45

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by pali (Post 1404923)
Still recompiling MAFW without DEBUG is not final solution. There still will be lot of dbus calls (because that functions between MAFW daemon and OMP using dbus) which consume CPU... and dbus is slow. I think that polling should not be used over dbus.

If not over D-Bus, then how? I believe there is no other sensible way to check playback position. Stock MP also uses D-Bus for that.

And do you really think that exchanging an integer over D-Bus once per second has any noticeable impact when watching a movie or listening to music? Polling is enabled only when the screen is unlocked AND there's something playing AND you are in Now Playing window AND position slider is visible.

IMO the only possible tweak is to reduce the frequency of polling and predict what the playback time should look like in between. Polling still has to take place in case there's some delay in playback and doing it every 5 seconds instead of 1 is a negligible saving to an already negligible matter. Moreover, it comes at the cost of worse synchronization and increased complexity.

xes 2014-01-09 00:40

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Anyway, please don't forget that the syslog messages are just the secondary effect that apperared evident while checking why the playback wasn't starting.
In that situation the phone hasn't an high cpu load and seems to react pretty well. (in fact, the polling doesn't seems to create too much speed problems)

The first and real trouble is with mafw-gst-renderer that sometime is freezed not allowing the playback.

pali 2014-01-09 06:56

Re: [ANNOUNCE] Alpha release of Open Media Player
 
I remember memory leak in dbus-daemon which appeared some years ago which does not free memory for every dbus call. When I called some dbus function every 0.5s after 2 days dbus-daemon has eaten 200MB. Maybe this is fixed, but I do not trust dbus anymore and I will never use it for polling...

freemangordon 2014-01-09 07:08

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by pali (Post 1405027)
I remember memory leak in dbus-daemon which appeared some years ago which does not free memory for every dbus call. When I called some dbus function every 0.5s after 2 days dbus-daemon has eaten 200MB. Maybe this is fixed, but I do not trust dbus anymore and I will never use it for polling...

I am almost sure (it is a while since I looked in mafw sources for the last time) that there is a "position changed" callback (or similar dbus signal)

gidzzz 2014-01-09 19:36

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Something undocumented? Grepping for conjunction of "position" and "change" in the sources of libmafw, mafw-gst-renderer and mafw-shared yields nothing interesting. The only position callback is for responding to "get position" request, and that's what OMP uses (and the stock MP too).


Quote:

Originally Posted by xes (Post 1404990)
The first and real trouble is with mafw-gst-renderer that sometime is freezed not allowing the playback.

I tried to reproduce the playback failure for 15 minutes by playing lots of videos from local storage and YouTube, to no avail, and I put away the N900. However, after going back to it some time later, I noticed that OMP is no longer open, and core dumps were saved for OMP and mafw-dbus-wrapper.

After that, upon the first attemp to play a video, the screen was black and nothing was happening. A few attempts later I got an error popup ("Unable to play media/Unsupported media") and that's what I 'm getting every time since then (have not restarted the device yet, killing mafw-dbus-wrapper does not help).

The error reported by the renderer on D-Bus is "couldn't start node", which apparently has its origin in "/usr/lib/gstreamer-0.10/libgstdsp.so". I have no idea what it means, but the problem does not seem tie lie in MAFW (unless it was the renderer doing funny things and breaking DSP for the whole system), because the camera app was crashing when trying to record a video (now it does not crash anymore, but the view goes black when recording and it still produces broken videos).

The only other clue I have found so far is "procwrap_detach: deprecated dspbridge ioctl", which appears in dmesg (I do not remember seeing it before) when trying to play a video using MAFW or when recording.

CSSU-thumb, no HD codecs installed.

xes, if you started dbus-monitor before playing a video and pasted its output after a failure happens, we could check if that's the same thing or just gather more info. Also check if video recording works and look for anything interesting in dmesg output.

xes 2014-01-09 22:07

Re: [ANNOUNCE] Alpha release of Open Media Player
 
so...

when mafw-gst-renderer is ~freezed, it seems to continue doing something with the last video i tried to start. (and uses a lot of ram ..reserved: 30-40MB)

As soon as i start again openmediaplayer without killing mafw-gst-renderer, if i place an strace to mafw-gst-renderer, i obtain:

writev(3, [{"l\2\1\1\223\0\0\0\274\2\0\0\"\0\0\0\6\1s\0\6\0\0 \0:1.477\0\0\5\1u\0!\0\0\0\10\1g\0\4uuis\0\0\0\0\0 \0\0", 56}, {"\6\0\0\0\2\0\0\0\0\0\0\0\202\0\0\0localtagfs::vi deos/%2Fmedia%2Fmmc1%2FFILM%2FcuteTube%2FIron%20Maiden% 20-%20Fear%20of%20the%20Dark%20-%20Rock%20in%20Rio%202013.mp4\0", 147}], 2) = 203
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN}, {fd=3, events=POLLIN}], 5, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "l\4\1\1\24\0\0\0@\0\0\0\226\0\0\0\1\1o\0(\0\0 \0/com/nokia/mafw/source/upnpcontrolsource\0\0\0\0\0\0\0\0\2\1s\0\30\0\0\0c om.nokia.mafw.extension\0\0\0\0\0\0\0\0\3\1s\0\20\ 0\0\0property_changed\0\0\0\0\0\0\0\0\10\1g\0\2sv\ 0\7\1s\0\5\0\0\0:1.68\0\0\0\10\0\0\0activate\0\1b\ 0\1\0\0\0", 2048) = 188
read(3, 0x150fa0, 2048) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN}, {fd=3, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN}, {fd=3, events=POLLIN}], 5, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "l\1\0\1\0\0\0\0%\0\0\0\277\0\0\0\6\1s\0<\0\0\0com .nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer\0\0\0\0\1\1o\0$\0\0\0/com/nokia/mafw/renderer/gstrenderer\0\0\0\0\2\1s\0\27\0\0\0com.nokia.mafw. renderer\0\3\1s\0\n\0\0\0get_status\0\0\0\0\0\0\7\ 1s\0\6\0\0\0:1.477\0\0", 2048) = 208
read(3, 0x150fa0, 2048) = -1 EAGAIN (Resource temporarily unavailable)

Please note, i have just opened OMP and i'm still at the first window (music/video/radio/random)

In the meanwhile, dbus-monitor reports:

method call sender=:1.480 -> dest=com.nokia.mafw.playlist serial=53 path=/com/nokia/mafw/playlist/6; interface=com.nokia.mafw.playlist; member=get_size
method return sender=:1.152 -> dest=:1.480 reply_serial=53
uint32 53
method call sender=:1.480 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=54 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_status
method return sender=:1.327 -> dest=:1.480 reply_serial=54
uint32 6
uint32 2
int32 0
string "localtagfs::videos/%2Fmedia%2Fmmc1%2FFILM%2FcuteTube%2FIron%20Maiden% 20-%20Fear%20of%20the%20Dark%20-%20Rock%20in%20Rio%202013.mp4"


When everything works, dbus-monitor polls continuosly:

method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=121 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=121
uint32 62
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=122 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=122
uint32 63
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=123 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=123
uint32 64
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=124 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=124
uint32 65
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=125 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=125
uint32 66
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=126 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=126
uint32 67
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=127 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=127
uint32 68
method call sender=:1.484 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=128 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.481 -> dest=:1.484 reply_serial=128
uint32 69





........fear of the dark?


PS:
I'm using: cssu thumb hd codecs kp52git
Just changed the "quick and dirty" OMP start script here:
http://talk.maemo.org/showpost.php?p...postcount=1563

pali 2014-01-11 09:41

Re: [ANNOUNCE] Alpha release of Open Media Player
 
when playing flac audio and OMP is on background and xterm windows is visible I see this in dbus-monitor:

Code:

ethod call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1008 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1008
  uint32 61
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1009 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1009
  uint32 62
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1010 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1010
  uint32 63
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1011 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1011
  uint32 64
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1012 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1012
  uint32 65
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1013 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1013
  uint32 66
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1014 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1014
  uint32 67
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1015 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1015
  uint32 68
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1016 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1016
  uint32 69
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1017 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1017
  uint32 70
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1018 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1018
  uint32 71
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1019 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1019
  uint32 72
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1020 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1020
  uint32 73
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1021 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1021
  uint32 74
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1022 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1022
  uint32 75
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1023 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1023
  uint32 76
signal sender=:1.60 -> dest=(null destination) serial=4012 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=metadata_changed
  string "bitrate"
  uint32 1
  variant      int32 609537
method call sender=:1.397 -> dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer serial=1024 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.renderer; member=get_position
method return sender=:1.60 -> dest=:1.397 reply_serial=1024
  uint32 77

it calling get_position every second.

now I looked at stock media player and it not doing any polling. when windows is activated (from task manager or unlocked screen) it call get_position only once. so I think it using some timer to update internal position every second until som stop/pause/error/background/lockscreen signal is not received.

so can be this implemented in omp? (sorry I cannot look at it, my devel machine with scratchbox not working :-()

gidzzz 2014-01-11 12:38

Re: [ANNOUNCE] Alpha release of Open Media Player
 
xes, by "starting before playing a video" and "pasting after a failure" I meant the time span between starting a video and the moment at which you can be sure that the video which you just started will not be able to be played. What about camera recording and dmesg?

And as I have written before, I doubt it's a problem with OMP, so if I was you, I'd uninstall HD codecs, reinstall MAFW, GStreamer and any extra decoders, reset the Tracker database, and see if that fixes the problem.


Quote:

Originally Posted by pali (Post 1405591)
now I looked at stock media player and it not doing any polling. when windows is activated (from task manager or unlocked screen) it call get_position only once. so I think it using some timer to update internal position every second until som stop/pause/error/background/lockscreen signal is not received.

Did you have ssh with dbus-monitor running somewhere else? If you have it on the same N900 as stock MP, you will not see it polling when another window is active, because stock MP has a way to detect whether its window is visible. If you quickly switch between stock MP's and terminals's window, you can perceive it as a one-time position check on window activation, but it is not what really happens.

You can check this even without ssh: simply leave the task navigator open so that you can see both the terminal and the stock MP at the same time. You should see the terminal scrolling every second with the same kind of output that you have pasted for OMP.

Quote:

Originally Posted by pali (Post 1405591)
so can be this implemented in omp? (sorry I cannot look at it, my devel machine with scratchbox not working :-()

I have already written why I don't think it's such a good idea in the last paragraph here: http://talk.maemo.org/showpost.php?p...postcount=1567 (in the same post I have also written that a slider has to be visible for polling to occur, but I meant it in Qt terms, and was aware that OMP still does not behave exactly as the stock MP). What I think needs to be done is to find a way to detect visibility of OMP's window, and this should be sufficient.

xes 2014-01-11 14:21

Re: [ANNOUNCE] Alpha release of Open Media Player
 
@gidzzz
ok, i will start another debug session. (unfortunately, omp playing a video + dbus-monitor + tail syslog + strace... is a pretty hard set of tasks for the N900 cpu)

Talking directly about the problem, i don't think it's related to the hd codecs.
In fact, you said that you are experiencing the same behavior and you don't have the hd codecs installed.

My opinion is that there is a bug in mafw-gst-renderer or OMP sometimes leaves mafw-gst-renderer in a "strange" condition after the playback. ...But so far is just an idea.
Could you check the actions that omp does when closing a running video with the "back" arrow?

pali 2014-01-12 12:50

Re: [ANNOUNCE] Alpha release of Open Media Player
 
I started dbus-monitor in xterm and then activated OMP to foreground. I did same with stock MP. And in dbus-monitor there was no periodical polling when stock MP was activated and was playing flac files... Any idea?

gidzzz 2014-02-19 14:25

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by xes (Post 1405631)
ok, i will start another debug session. (unfortunately, omp playing a video + dbus-monitor + tail syslog + strace... is a pretty hard set of tasks for the N900 cpu)

Talking directly about the problem, i don't think it's related to the hd codecs.
In fact, you said that you are experiencing the same behavior and you don't have the hd codecs installed.

I do not know if it's the same thing, that's what I wanted to check by comparing:
  • output of dbus-monitor from the time when the playback failure occurs,
  • ability to record a video after the playback failure,
  • output of dmesg after the playback/recording failure,
but you have not provided any of that info. And I did not say a word about syslog or strace.

Quote:

Originally Posted by xes (Post 1405631)
My opinion is that there is a bug in mafw-gst-renderer or OMP sometimes leaves mafw-gst-renderer in a "strange" condition after the playback. ...But so far is just an idea.
Could you check the actions that omp does when closing a running video with the "back" arrow?

There are no obvious mistakes:
  • pause playback (to generate a thumbnail),
  • save current position,
  • stop playback,
  • restore renderer error policy to "skip-on-error",
  • restore window orientation policy.



Quote:

Originally Posted by pali (Post 1405819)
I started dbus-monitor in xterm and then activated OMP to foreground. I did same with stock MP. And in dbus-monitor there was no periodical polling when stock MP was activated and was playing flac files... Any idea?

The stock MP causes a lot more D-Bus activity than OMP. Maybe there's so much output with the stock MP when switching windows that you cannot find the lines for which position polling is responsible?

And why do you insist on on checking it the hardest way? Try with SSH or activate the task switcher and watch the windows side-by-side. Or at least pipe dbus-monitor to something like "grep get_position -A 2" and really, really carefully watch the numbers.



Open Media Player 20140219-1 is out. It features some significant changes that were needed for lyrics and video thumbnails to work at all times, and should also make it possible to cleanly implement some interesting stuff like tags via RDS or voice (eSpeak). However, I'm not sure if any of the latter should belong to the core and might be better handled by a plugin system or a customizable shell script.

Quote:

Originally Posted by sixwheeledbeast (Post 1369769)
Is there a possibly to add control of RDS text into the FM transmitter dialog?

Now that this feature can be implemented, I wonder if that's really necessary. Were you aware of this: http://talk.maemo.org/showthread.php?t=39452? I do not know if it works well, as I don't have an easy access to something that supports RDS.

The changelog:
  • UPnP widget uses whole screen width if playback indicator is hidden.
  • Bluetooth and ringtone dialogs stay open for as long as it takes to obtain file details and allow operation to be cancelled in the meantime.
  • Fixed paused video thumbnails being updated only when the video browser is open.
  • Downloading of lyrics happens in the background even if Now Playing has not been opened yet.
  • Improved reliability of media type detection in the UPnP browser.
  • Use a separate color for lyrics status messages.
  • Improved reliability of stop buttons and enabling/disabling of position sliders.
  • Lots of changes under the hood.
At the moment of this writing, Thumb version is already downloadable, and the standard version should reach extras-devel soon.

TomJ 2014-02-19 22:32

Re: [ANNOUNCE] Alpha release of Open Media Player
 
An issue that still exists in the latest thumb version: when gPodder tries to play a podcast when OMP is closed, OMP opens and plays the file that was open when it last closed; if OMP's open the correct file is played.

Android_808 2014-02-22 08:20

Re: [ANNOUNCE] Alpha release of Open Media Player
 
is omp able to play streams piped from stdout?

freemangordon 2014-03-03 12:18

Re: [ANNOUNCE] Alpha release of Open Media Player
 
@gidzzz - there is a long standing "feature" in OMP - trying to change the language while in playlist search mode (songs, etc) brings plyback window. That feature comes from https://gitorious.org/qt-mediaplayer...icator.cpp#L76

Now, my understanding is that no application should override system shortcuts unless really needed. Which is not the case here IMO.

Please advice on how to proceed (doing MR on gitorious seems too heavy for a one-liner patch)

gidzzz 2014-03-05 10:49

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by Android_808 (Post 1413753)
is omp able to play streams piped from stdout?

Nope, and it is impossible to take data from stdin and feed it directly to the renderer. I think the closest you can get is to use a named pipe and try to open it like a regular file. If it works, perhaps it could be automated.


Quote:

Originally Posted by freemangordon (Post 1415214)
@gidzzz - there is a long standing "feature" in OMP - trying to change the language while in playlist search mode (songs, etc) brings plyback window. That feature comes from https://gitorious.org/qt-mediaplayer...icator.cpp#L76

Now, my understanding is that no application should override system shortcuts unless really needed. Which is not the case here IMO.

I can't see anything wrong with language switching on my device. I did a few tests in the music window:
  • Search bar hidden -> Ctrl+Space opens Now Playing.
  • Search bar focused -> Ctrl+Space causes a notification saying "Input language switched to XXX" to appear.
  • Search bar visible, but not focused -> Ctrl+Space does nothing.
Am I misunderstanding something? Or where could the difference be coming from? I have not been messing with Qt libs.

freemangordon 2014-03-05 15:25

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by gidzzz (Post 1415522)

I can't see anything wrong with language switching on my device. I did a few tests in the music window:
[*]Search bar hidden -> Ctrl+Space opens Now Playing.

That one :)

Quote:

...[*]Search bar visible, but not focused -> Ctrl+Space does nothing.
That one too

Open Contacts for example, input language can be switched *before* you've typed anything. And that is more logical than OMP's behaviour, where you have to type something, switch the language, then clear what you've typed, then type again.

Not to say that a system-wide shortcut should not be overtaken by an application unless really needed. I don't see why OMP needs exactly ctrl-space for opening the "Now Playing" window. That one could be shift-space, shift-enter or ctrl-enter as well(or some other combo), without breaking language switching capability.

Quote:

Am I misunderstanding something? Or where could the difference be coming from?
The difference comes from the fact that OMP explicitly defines ctrl-space as application shortcut (see the link I posted in my previous post)

gidzzz 2014-03-05 17:24

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by freemangordon (Post 1415557)
Open Contacts for example, input language can be switched *before* you've typed anything. And that is more logical than OMP's behaviour, where you have to type something, switch the language, then clear what you've typed, then type again.

Not to say that a system-wide shortcut should not be overtaken by an application unless really needed. I don't see why OMP needs exactly ctrl-space for opening the "Now Playing" window. That one could be shift-space, shift-enter or ctrl-enter as well(or some other combo), without breaking language switching capability.

Now I see what you mean, but I wouldn't call it "overtaking" or "breaking something", as Contacts seems to be an exception here. Even Calendar, where pressing a letter key opens "New event" window with that letter typed, does not allow to change the input language unless an input field has the focus, let alone applications such as MicroB, the PDF viewer, or the stock media player.

Quote:

Originally Posted by freemangordon (Post 1415557)
The difference comes from the fact that OMP explicitly defines ctrl-space as application shortcut (see the link I posted in my previous post)

I think the difference comes from the fact that an application itself has to implement that behavior. For example, Ctrl+Space does nothing in Hamster Filer or cuteTube. That said, it is not just a matter of changing the shortcut, but also adding a new shortcut (although that should be pretty painless, as most windows share a custom common base class).

{Ctrl,Shift}+Enter are used for menus. I prefer most shortcuts with Ctrl rather than Shift, so I'd rather have Ctrl+P than Shift+Space. If there are no hard objections or better ideas, I think I can change all instances of Ctrl+Space to Ctrl+P (see http://wiki.maemo.org/Open_Media_Player#Controls for the list of affected contexts) and assign Ctrl+Space to toggle input language in most windows, of course provided I can find out how to do that (it doesn't look like it's as simple as calling something over D-Bus, any hints?). But doesn't that sound like a job for Qt, not individual applications?

freemangordon 2014-03-05 20:56

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by gidzzz (Post 1415565)
Now I see what you mean, but I wouldn't call it "overtaking" or "breaking something", as Contacts seems to be an exception here. Even Calendar, where pressing a letter key opens "New event" window with that letter typed, does not allow to change the input language unless an input field has the focus, let alone applications such as MicroB, the PDF viewer, or the stock media player.

My experience differs with yours - with all of the above applications, actually in every application I try - I can switch the input language no matter whether there is input filed focused or not, and no matter whether there is an input field at all. As long as ctrl-space is pressed, the language is switched. Excluding OMP ofc. I have ukeyboard installed, that might be the reason, though I doubt.

Try it:
1. open google in microb
2. click outside of the search field,
3. type something (so microb address field to appear and you to check your current language).
4. click somewhere on the page (so address field to disappear).
5. Press ctrl-space
6. go to 3

Quote:

I think the difference comes from the fact that an application itself has to implement that behavior.
I am afraid you don't grok what https://gitorious.org/qt-mediaplayer...icator.cpp#L76 does.

Code:

connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Space), this), SIGNAL(activated()), this, SLOT(openWindow()));
Let me try to elaborate:

ctrl-space is a system-wide shortcut handled by hildon-input-method framework (if I am not mistaken) which switches the currently active input language for the hardware keyboard. The above code makes that sequence be handled by the application(or rather NowPlayingIndicator) itself *when* an object of class NowPlayingIndicator (or its parent) is active(visible). IIUC. So, HIM does not have any chance to switch the language. From Qt help:

http://qt-project.org/doc/qt-4.7/qshortcut.html

Code:

A shortcut is "listened for" by Qt's event loop when the shortcut's parent widget is receiving events.
Quote:

For example, Ctrl+Space does nothing in Hamster Filer or cuteTube.
Wrong (at least for cuteTube), ctrl-space switches input language in cuteTube (which is the expected behaviour as Qt interacts with HIM). Don't have Hamster Filer so can't test, but I bet it is the same there. And in every other Qt application.

Quote:

That said, it is not just a matter of changing the shortcut, but also adding a new shortcut (although that should be pretty painless, as most windows share a custom common base class).
{Ctrl,Shift}+Enter are used for menus. I prefer most shortcuts with Ctrl rather than Shift, so I'd rather have Ctrl+P than Shift+Space. If there are no hard objections or better ideas, I think I can change all instances of Ctrl+Space to Ctrl+P (see http://wiki.maemo.org/Open_Media_Player#Controls for the list of affected contexts)
It is up to you to decide that, I was just trying to give an example of possible replacements

Quote:

and assign Ctrl+Space to toggle input language in most windows, of course provided I can find out how to do that (it doesn't look like it's as simple as calling something over D-Bus, any hints?).
You should do nothing, Qt already does it for you, unless the application overrides it (see the above code)

Quote:

But doesn't that sound like a job for Qt, not individual applications?
Exactly. And Qt does its job pretty well given we don't oversmart it.

gidzzz 2014-03-05 22:38

Re: [ANNOUNCE] Alpha release of Open Media Player
 
I understand what QShortcut does and what you're saying, but until now (the example with MicroB) I thought that you have based your claims on not enough apps. I'll install ukeyboard and try some other things tomorrow if I can find a free moment. It would be nice if in the meantime also somebody else could share their observations.

Below are some applications that I've checked, I can't see any interesting pattern here: :(
  • the desktop -
  • MicroB -
  • Media player -
  • Calendar -
  • Photos -
  • Contacts +
  • Phone +
  • Maps -
  • Camera -
  • E-mail +
  • Conversations +
  • Calculator -
  • Settings -
  • Backup -
  • PDF readerer -
  • RSS -
  • File manager +
  • FApMan -
  • App manager -
  • cuteTube -
  • Hamster Filer -
  • Qalendar -
  • gpSP -
  • gpSP GUI -
  • Marble -

mr_pingu 2014-03-06 12:04

Re: [ANNOUNCE] Alpha release of Open Media Player
 
You should try with default mediaplayer, it only starts and stops playing: The ctrl button is fully ignored as normal space does the same!

freemangordon 2014-03-07 00:02

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by mr_pingu (Post 1415679)
You should try with default mediaplayer, it only starts and stops playing: The ctrl button is fully ignored as normal space does the same!

Could you be more specific to whom is that post pointed to?

mr_pingu 2014-03-07 07:53

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Actually it is not pointed to anyone specific but you said that ctrl-space shouldn't be overriden by an application. Well, a good point, seems quite a good guideline and common sense. But, it's a non-existing real requirement as even the default player has not that behaviour and if you look at Gidzzz list, there are even more default application that dont follow that rule.

You, FMG, presented it as an Already existint rule but that's not the case, that rule doesn't exist. Though I agree it should be a rule, even if not all application allow that. It just is more logical; what if a application on desktop overrides all system shortcuts Like alt-tab, how should one switch an application?

So in short: That isnt an existing rule/guideline, but I agree it should be one

freemangordon 2014-03-07 08:02

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by mr_pingu (Post 1415776)
...But, it's a non-existing real requirement as even the default player has not that behaviour and if you look at Gidzzz list, there are even more default application that dont follow that rule.

Well, ctrl-space switches language here in default media player.

I wonder why is that difference (ukeyboard?).

Even if it is because of ukeyboard, I think we should treat it(the shortcut) as a stock system rule, because ukeyboard is the only way I know for non-stock languages to be supported.

mr_pingu 2014-03-07 08:38

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Also on my second N900 that shortcut doesn't work. None of these have Ukeyboard installed. So I suppose UKeyboard somehow fixes that

gidzzz 2014-03-07 16:20

Re: [ANNOUNCE] Alpha release of Open Media Player
 
I installed ukeyboard, rebooted, disabled QtLockscreen, Qalendar and camkeyd, but it made no difference. Camera Lens Launcher was probably the only non-standard thing running in the background at that time. After tinkering with ukeyboard settings I discovered that with some layouts Ctrl+Space language switching doesn't work at all, and that's it.

Seeing no objections to the new shortcut, I've uploaded an update, although it's Ctrl+L instead of Ctrl+P, because the related Ctrl+Shift+P would cause another collision. The changelog for OMP 20140307-1:
  • Fixed a bug that could cause incorrect opening of playlist files via mime_open and inability to restore the old music playlist.
  • Modified all shortcuts using Ctrl+Space to use Ctrl+L, to avoid confusion (and collision?) with a Maemo system shortcut.
  • Restored a phrase accidentally removed from the German translation.

Quote:

Originally Posted by TomJ (Post 1413425)
An issue that still exists in the latest thumb version: when gPodder tries to play a podcast when OMP is closed, OMP opens and plays the file that was open when it last closed; if OMP's open the correct file is played.

I think it actually depends on the kind of the assigned playlist rather than on whether OMP is running. For example, if you were listening to music and then decide to watch a video podcast, even without closing OMP, the transition would trigger the bug. If that's the case, the bug should be fixed now.

marmistrz 2014-03-18 17:52

Re: [ANNOUNCE] Alpha release of Open Media Player
 
A feature request: to download lyrics for track(s) from selected provider (if there exist). For some artists the lyrics on darklyrics are inaccurate, for other they are, but lyrics wiki is inaccurate. And changing the global settings isn't handy...

sixwheeledbeast 2014-03-18 19:11

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by marmistrz (Post 1417495)
A feature request: to download lyrics for track(s) from selected provider (if there exist). For some artists the lyrics on darklyrics are inaccurate, for other they are, but lyrics wiki is inaccurate. And changing the global settings isn't handy...

Sometimes it would be handy to only download Lyrics per track.
Maybe a "Get Lyrics" Action item in Now Playing could solve both problems.

skanky 2014-03-22 22:10

Re: [ANNOUNCE] Alpha release of Open Media Player
 
It used to be, when I pressed a song in a play-list, it started palying, and then continued to play the rest of the play-list.

Now, for about two(ish) versions, when I press a song in a play-list, nothing happens. This is for old and new play-lists.

The only workaround is to long press a song or play-list and select "Add to currently playing".

Is anyone else seeing this issue? Is there any way I can debug it?

Thanks.

TomJ 2014-03-23 22:59

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by skanky (Post 1418114)
It used to be, when I pressed a song in a play-list, it started palying, and then continued to play the rest of the play-list.

Now, for about two(ish) versions, when I press a song in a play-list, nothing happens. This is for old and new play-lists.

The only workaround is to long press a song or play-list and select "Add to currently playing".

Is anyone else seeing this issue? Is there any way I can debug it?

I was about to post just this problem.

sixwheeledbeast 2014-03-25 21:27

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by TomJ (Post 1418253)
I was about to post just this problem.

Same here, confirming this bug on two devices.

As a temporary workaround you can tap and highlight the first song then press up key and enter for shuffle or enter for play.

There is no debug information in a terminal.
It affects all automatic and saved playlists.

I have also noticed "Recently played" and "Most played" are stuck on "3 songs" in Playlist menu, but I have actually played "38 songs" when I open them which is correct. Not sure if this is tracker related issue.

Not sure if this is also related but my first saved playlist is now corrupt for some reason. 90 songs worth of "Information not available".

skanky 2014-03-26 08:37

Re: [ANNOUNCE] Alpha release of Open Media Player
 
After the last update, I had no music listed, and the play lists said similar. After I forced a tracker restart and did a reboot, it all came back as normal. You could see if the songs in that play list are listed, and/or try a tracker restart?

gidzzz 2014-03-26 12:47

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Quote:

Originally Posted by sixwheeledbeast (Post 1418494)
I have also noticed "Recently played" and "Most played" are stuck on "3 songs" in Playlist menu, but I have actually played "38 songs" when I open them which is correct. Not sure if this is tracker related issue.

Might be, I doubt it is OMP's fault.

Quote:

Originally Posted by sixwheeledbeast (Post 1418494)
Not sure if this is also related but my first saved playlist is now corrupt for some reason. 90 songs worth of "Information not available".

Songs are identified by their location in the filesystem rather than tags, so if this is an old playlist, perhaps simply the files no longer are where they used to be at the time of creating that playlist?



OMP 20140326-1:
  • Fixed item activation in the playlist browser.
  • Fixed total playlist time calculation in Now Playing.

skanky 2014-03-27 09:21

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Playlist bug confirmed fixed on my device (at least). Many thanks. :)

FlashInTheNight86 2014-04-08 19:20

Re: [ANNOUNCE] Alpha release of Open Media Player
 
Please add an option to stretch video to whole screen & ability to cycle between audio streams during video playback. Ability to use external audio stream (i.e. separate file) would be great as well. :rolleyes:


All times are GMT. The time now is 23:27.

vBulletin® Version 3.8.8