Jump to content


Photo

OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05


  • Please log in to reply
172 replies to this topic

Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #121 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 29 January 2016 - 22:00

Yes, and taapat's isn't using it either, so I guess I'll drop it for now :)

However I'm still getting the infinite spinner when I stop playing a video (after it runs for a minute or longer).

 

[eServiceMP3] stop /run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding High/A.Bronx.Tale.1993.720p.x264.AC3-Riding High.mkv
[gRC] main thread is non-idle! display spinner!

 

I guess it must be the flush in the mediasink or something..



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #122 lostman

  • Member
  • 16 posts

0
Neutral

Posted 30 January 2016 - 00:57

cant wait until it ready :rolleyes:



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #123 hyperonex

  • Senior Member
  • 82 posts

+7
Neutral

Posted 1 February 2016 - 09:03

@MastaG

Thank you very much for your effort.

By the way is there any link to your build system ???

I'm interested on your work for STi7162 STB.

Thank you very much



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #124 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 1 February 2016 - 09:41

hyperonex, I'm using taapats build system: https://github.com/T...openpli-oe-core (which uses https://github.com/T...openpli-fulan).

With only a small patch on top of his Enigma2 to bring it in shape for PLi-4 a bit (see attachment).

Also I've edited the stlirc recipe to use a different lirc.conf for the 7162, this one: https://github.com/o...ircd_spark.conf

Furthermore I'm building both libeplayer and gstreamer 1.7 builds now. (simply add/remove libeplayer from MACHINE_FEATURES in meta-fulan/conf/machine/include/oem-fulan.inc).

 

My experience with libeplayer is that it sometimes crashses enigma2 when activating external .srt subtitles.

However with gstreamer 1.7 I'm currently facing a nasty bug where I get an infinite spinner when I stop playing a video file (with or without subtitles).

I'm still looking into this (currently setting up a debug environment).

 

 

Attached Files



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #125 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 1 February 2016 - 10:38

With gstreamer git head, you need to update opencore-amr to 0.1.3. Otherwise

 

gstreamer1.0-plugins-ugly-amrnb

 

and

 

gstreamer1.0-plugins-ugly-amrwbdec

 

does not build.

 

I don't know if this is related to problem, or you already noticed this...But just in case.


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #126 hyperonex

  • Senior Member
  • 82 posts

+7
Neutral

Posted 1 February 2016 - 11:24

hyperonex, I'm using taapats build system: https://github.com/T...openpli-oe-core (which uses https://github.com/T...openpli-fulan).

With only a small patch on top of his Enigma2 to bring it in shape for PLi-4 a bit (see attachment).

Also I've edited the stlirc recipe to use a different lirc.conf for the 7162, this one: https://github.com/o...ircd_spark.conf

Furthermore I'm building both libeplayer and gstreamer 1.7 builds now. (simply add/remove libeplayer from MACHINE_FEATURES in meta-fulan/conf/machine/include/oem-fulan.inc).

 

My experience with libeplayer is that it sometimes crashses enigma2 when activating external .srt subtitles.

However with gstreamer 1.7 I'm currently facing a nasty bug where I get an infinite spinner when I stop playing a video file (with or without subtitles).

I'm still looking into this (currently setting up a debug environment).

 

Thank you very much for all these details.



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #127 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 1 February 2016 - 11:55

Thank you Beeker, this really helps me out since I don't have much time to spend on this lately.

I didn't noticed the amrnb plugins not being built anymore myself.

 

Regarding the gstreamer issue, it only happens on spark.

When a h264 video is playing for more than 2 or 3 minutes, I'm getting an infinite spinner once I stop it.

[eServiceMP3] stop /run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding High/A.Bronx.Tale.1993.720p.x264.AC3-Riding High.mkv
[gRC] main thread is non-idle! display spinner!

The CPU load goes up to 150% and enigma2 will turn into a zombie when I kill it.

However when I stop playing to movie within a minute or so this won't happen.

 

The exact same build for dm800, dm800se, zgemma h2h and h3 don't have this issue.

 

The only difference between the builds are the receivers' drivers and the mediasink patch.
This patch: https://raw.githubus...k_sh4_fix.patch

Maybe Christophecvr can have a quick look at the patch.

 

Also there's a small difference between the spark's servicemp3.cpp and PLi's servicemp3.cpp:

--- servicemp3.cpp    2016-02-01 11:52:18.908161688 +0100
+++ servicemp3.cpp.spark    2016-02-01 11:53:10.053808971 +0100
@@ -21,7 +21,11 @@
 #include <gst/pbutils/missing-plugins.h>
 #include <sys/stat.h>
 
+#if defined(__sh__)
+#define HTTP_TIMEOUT 60
+#else
 #define HTTP_TIMEOUT 30
+#endif
 
 /*
  * UNUSED variable from service reference is now used as buffer flag for gstreamer
@@ -108,6 +112,20 @@
         extensions.push_back("wmv");
         extensions.push_back("wma");
         extensions.push_back("stream");
+#if defined(__sh__)
+        extensions.push_back("mpeg");
+        extensions.push_back("m2ts");
+        extensions.push_back("trp");
+        extensions.push_back("vdr");
+        extensions.push_back("wma");
+        extensions.push_back("mts");
+        extensions.push_back("flv");
+        extensions.push_back("rar");
+        extensions.push_back("img");
+        extensions.push_back("iso");
+        extensions.push_back("ifo");
+        extensions.push_back("wmv");
+#endif
         sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions);
     }

 

 

Anyways I hope to do some gdb debugging tonight.

Any tips or advice is welcome :)



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #128 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 1 February 2016 - 18:55

@MastaG

I would suggest you to do remote debugging, since then you don't need to install dbg packages, also symbols are loaded on host, so you will certainly not run out of memory.

 

On target:

1. install gdbserver

opkg install gdbserver

2. start gdbserver

gdbserver localhost:2345 /usr/bin/enigma2

On host:

1. setup cross-development environment, toolchain, and sysroot:

MACHINE=machine bitbake image_name -c populate_sdk
cd openpli-oe-core/build/tmp/sdk
./oecore-x86_64-mips32el-toolchain-nodistro.0.sh #select your $SDK directory

2. setup your environment

source $SDK/environment-setup-mips32el-oe-linux

3. enter directory with enigma2 with debugging symbols

cd $SDK/sysroots/mips32el-oe-linux/usr/bin/.debug

4. create .gdbinit file with sysroot set at $SDK/sysroots/mips32el-oe-linux

echo "set sysroot $SDK/sysroots/mips32el-nf-oe-linux/" > .gdbinit

5. start gdb

mipsel-oe-linux-gdb enigma2

6. in gdb connect to target

(gdb) target remote target-host:2345
(gdb) continue

Hope it helps :),

http://www.yoctoproj...gdb-remotedebug



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #129 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 1 February 2016 - 19:31

Thanks a million mx3L.
Your post made my day ! :-)

Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #130 lostman

  • Member
  • 16 posts

0
Neutral

Posted 4 February 2016 - 15:27

any expected date for the new image ?



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #131 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 4 February 2016 - 15:29

Soon my friend, I just need to have the spark freeze solved ^_^



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #132 oxejatte

  • Senior Member
  • 80 posts

+1
Neutral

Posted 4 February 2016 - 16:48

MastaG could you implement VFD-Controls on next release for Spark (Sti 7111) your image is really great on web streams for low ressources boxes.

 

Regards



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #133 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 4 February 2016 - 17:17

mx3L, I've followed the guide but I don't seem to get much useful information.

 

On my receiver where I run gdbserver:

playing 4097:0:0:0:0:0:0:0:0:0:/run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding High/A.Bronx.Tale.1993.720p.x264.AC3-Riding High.mkv:A Bronx Tale
[eServiceMP3] construct!
[eServiceMP3] playbin uri=file:///run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding%20High/A.Bronx.Tale.1993.720p.x264.AC3-Riding%20High.mkv
[eServiceMP3] subtitle uri: file:///run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding%20High/A.Bronx.Tale.1993.720p.x264.AC3-Riding%20High.srt
[eServiceMP3] starting pipeline
[eServiceMP3] state transition NULL -> READY
resolved to PLAY
RemovePopup, id = ZapError
[eServiceMP3] state transition READY -> PAUSED
[eServiceMP3] subsink properties set!
[eServiceMP3] loading cuesheet
[eServiceMP3] cutfile not found!

** (enigma2:21916): WARNING **: unhandled DVBAPI Video Event 9
[eServiceMP3] async-done - 1 video, 1 audio, 1 subtitle
[eServiceMP3] AUDIO STRUCT=audio/x-ac3
[eServiceMP3] audio stream=0 codec=AC-3 audio language=und
[eServiceMP3] subtitle stream=0 language=und codec=SubRip
[eServiceMP3] getSubtitleType::subtitle probe caps type=text/x-raw
[eServiceMP3] switched to subtitle stream 0
[eServiceMP3] state transition PAUSED -> PLAYING
authHeaderPartOne {}
... same authHeaderPartOne {} message over and over....
authHeaderPartOne {}
action ->  DPS_Player exitFunction
authHeaderPartOne {}
[eServiceMP3] stop /run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding High/A.Bronx.Tale.1993.720p.x264.AC3-Riding High.mkv
[gRC] main thread is non-idle! display spinner!

 

On my host where I connect using gdb:

[mastag@intel5960x .debug]$ sh4-oe-linux-gdb enigma2
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-oesdk-linux --target=sh4-oe-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from enigma2...done.
(gdb) target remote 192.168.1.158:2345
Remote debugging using 192.168.1.158:2345
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x29558da0 in ?? ()
(gdb) continue
Continuing.
[New Thread 22019]

 

So I was hoping to see where it actually stalls...

 

Anways when I stop the video within a minute, every is all good, it only happens when I play a video for a longer time.

So here's an example of a video which exits normally:

playing 4097:0:0:0:0:0:0:0:0:0:/run/movies/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT.mkv:Bridge of Spies
[eServiceMP3] construct!
[eServiceMP3] playbin uri=file:///run/movies/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT.mkv
[eServiceMP3] subtitle uri: file:///run/movies/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT.srt
[eServiceMP3] starting pipeline
[eServiceMP3] state transition NULL -> READY
resolved to PLAY
RemovePopup, id = ZapError

** (enigma2:21916): WARNING **: unhandled DVBAPI Video Event 9
[eServiceMP3] state transition READY -> PAUSED
[eServiceMP3] subsink properties set!
[eServiceMP3] loading cuesheet

** (enigma2:21916): WARNING **: unhandled DVBAPI Video Event 12

** (enigma2:21916): WARNING **: unhandled DVBAPI Video Event 12
[eServiceMP3] cutfile not found!
[eServiceMP3] async-done - 1 video, 1 audio, 1 subtitle
[eServiceMP3] AUDIO STRUCT=audio/x-ac3
[eServiceMP3] audio stream=0 codec=AC-3 audio language=und
[eServiceMP3] subtitle stream=0 language=und codec=SubRip
[eServiceMP3] getSubtitleType::subtitle probe caps type=text/x-raw
[eServiceMP3] switched to subtitle stream 0
[eServiceMP3] state transition PAUSED -> PLAYING
authHeaderPartOne {}
authHeaderPartOne {}
action ->  DPS_Player exitFunction
authHeaderPartOne {}
[eServiceMP3] stop /run/movies/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT/Bridge.of.Spies.2015.720p.BRRip.x264.AC3-iFT.mkv
[eDVBDB] getBouquet failed.. no path given!
service end!
resolved to PLAY
[eServiceMP3] destruct!

 

You see "service end!" and "resolved to PLAY" and it returns to the main menu.



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #134 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 4 February 2016 - 22:37

Alright so I've loaded up the movie multiple times in gst-launch-1.0's playbin and doesn't lock up there.

So the problem must be within servicemp3.cpp.

Only it's a bit hard to use gdb on enigma2 since it spawns multiple threads and I have to know the function which is stalling when I stop a movie which is playing...



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #135 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 4 February 2016 - 22:54

@MastaG

You have to stop execution once there are spinners by pressing CTRL+C with focused terminal window where you're running gdb.

then use command:

thread apply all bt

It should show you backtrace of all threads



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #136 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 4 February 2016 - 23:55

Thank you mx3L, I was going through all the gdb docs but couldn't find a good example.

So anyways, I think I've found out one of your experimental patches will cause the freeze way more often when stopping a movie.

However it does speed up iptv zapping on all of my other receivers.

diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index 7559042..fd59b62 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -782,14 +782,6 @@ RESULT eServiceMP3::stop()
    m_state = stStopped;

    GstStateChangeReturn ret;
-    GstState state, pending;
-    /* make sure that last state change was successfull */
-    ret = gst_element_get_state(m_gst_playbin, &state, &pending, 5 * GST_SECOND);
-    eDebug("[eServiceMP3] stop state:%s pending:%s ret:%s",
-        gst_element_state_get_name(state),
-        gst_element_state_get_name(pending),
-        gst_element_state_change_return_get_name(ret));
-
    ret = gst_element_set_state(m_gst_playbin, GST_STATE_NULL);
    if (ret != GST_STATE_CHANGE_SUCCESS)
        eDebug("[eServiceMP3] stop GST_STATE_NULL failure");

I was so caught up in comparing the servicemp3 source code from OpenPLi, OpenATV and Taapat's enigma2 tree that I totally forgot about the patches I was applying myself.

If I don't use the above patch, I can stop my movie and it will go back to the main menu most of the time.

 

Still I got it to freeze once (I had to play and stop my movie many times though).

action ->  DPS_Player exitFunction
authHeaderPartOne {}
[eServiceMP3] stop /run/movies/A.Bronx.Tale.1993.720p.x264.AC3-Riding High/A.Bronx.Tale.1993.720p.x264.AC3-Riding High.mkv
[eServiceMP3] stop state:PLAYING pending:VOID_PENDING ret:SUCCESS
[gRC] main thread is non-idle! display spinner!

But unfortunately I can't debug it once the spinner comes up since gdb will not go back to the prompt when I press CTRL+C.

I believe this is because enigma2 is using 150% CPU at this time and gdb is unable to halt it.

 

However when I press CTRL+C a second time it will go back to the prompt but I cannot do a backtrace (for the above reason):

(gdb) c
Continuing.
^C
^CQuit
(gdb) thread apply all bt
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.

 

Now I guess the spark receiver (which is a bit of a slow one) just needs some more time to stop and flush.

I think what happens is that there is a timing problem between the dvbmediasink and enigma2's servicemp3.cpp.

Here's the code in the gstdvbvideosink.c

case GST_EVENT_FLUSH_STOP:
    #ifdef VIDEO_FLUSH
        /* required for spark drivers */
        ioctl(self->fd, VIDEO_FLUSH, 1/*NONBLOCK*/); //Notify the player that no addionional data will be injected
    #endif
    if (self->fd >= 0) ioctl(self->fd, VIDEO_CLEAR_BUFFER);
    GST_OBJECT_LOCK(self);
    self->must_send_header = TRUE;
    while (self->queue)
    {
        queue_pop(&self->queue);
    }
    self->flushing = FALSE;
    GST_OBJECT_UNLOCK(self);
    /* flush while media is playing requires a delay before rendering */
    if (self->using_dts_downmix)
    {
        self->ok_to_write = 0;
        self->playing = FALSE;
    }
    self->flushed = TRUE;
    break;

I guess setting VIDEO_FLUSH to 1 in the spark driver needs a little bit more time.

I'll try and modify servicemp3.cpp to include a little 100 ms sleep and see where it gets me :-)



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #137 lostman

  • Member
  • 16 posts

0
Neutral

Posted 5 February 2016 - 07:12

for me the last image super just need to fix standby and shutdown

i try pkt- openatv- hdmu - eurosat - vix4 - taapat - opendroid and your openpli on my spark sti7111 your image is the best in sharing cccam server and the best in playing iptv but as i say need just to fix the shutdown and standby



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #138 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 5 February 2016 - 11:38

@lostman, the shutdown and standby have been fixed already.

I just need to fix the freezing when stopping a movie before I can release new images.



Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #139 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 5 February 2016 - 12:03

@MastaG

 

Try once to change the spark driver patch:

 

from:

ioctl(self->fd, VIDEO_FLUSH, 1/*NONBLOCK*/); //Notify the player that no addionional data will be injected

to:

if (self->fd >= 0) ioctl(self->fd, VIDEO_FLUSH, 1/*NONBLOCK*/); //Notify the player that no addionional data will be injected

Edited by christophecvr, 5 February 2016 - 12:05.


Re: OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05 #140 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 5 February 2016 - 13:10

christophecvr thank you.

if it solves the problem for good I'll create a nice patch for your sink with a nice "--with-spark" configure option :)

Will try asap.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users