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 #141 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 5 February 2016 - 13:39

Nice when I have the patch I will push it to  multiboxmediasink :)


Edited by christophecvr, 5 February 2016 - 13:41.


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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 5 February 2016 - 15:49

Thank you my friend.

So far I have this:

--- a/gstdvbaudiosink.h    2016-02-02 23:49:58.384026363 +0100
+++ b/gstdvbaudiosink.h    2016-02-02 23:50:26.742251563 +0100
@@ -134,6 +134,8 @@
     gint64 timestamp_offset;
     gint8 ok_to_write;
 
+    gboolean use_set_encoding;
+
     queue_entry_t *queue;
 };
 
--- a/gstdvbvideosink.h    2016-02-02 23:49:58.384026363 +0100
+++ b/gstdvbvideosink.h    2016-02-02 23:50:26.742251563 +0100
@@ -136,6 +136,8 @@
     gboolean must_send_header, wmv_asf;
     gint8 ok_to_write;
 
+    gboolean use_set_encoding;
+
     queue_entry_t *queue;
 };
 
--- a/configure.ac    2016-02-04 21:50:01.122507363 +0100
+++ b/configure.ac    2016-02-04 21:52:08.071026123 +0100
@@ -236,6 +236,13 @@
     AC_DEFINE([VUPLUS],[1],[Define to 1 for vuplus ])
 fi
 
+AC_ARG_WITH(spark,
+    AS_HELP_STRING([--with-spark],[build for spark, yes or no]),
+    [spark=$withval],[spark=no])
+if test "$spark" = "yes"; then
+    AC_DEFINE([SPARK],[1],[Define to 1 for spark ])
+fi
+
 AC_ARG_WITH(dreambox,
     AS_HELP_STRING([--with-dreambox],[build for dreambox, yes or no]),
     [dreambox=$withval],[dreambox=no])
--- a/gstdvbvideosink.c    2016-02-04 21:42:39.982609460 +0100
+++ b/gstdvbvideosink.c    2016-02-05 00:20:39.646901581 +0100
@@ -64,6 +64,10 @@
 #include <config.h>
 #endif
 
+#ifdef __sh__
+#include <linux/dvb/stm_ioctls.h>
+#endif
+
 #include <gst/gst.h>
 #include <gst/base/gstbasesink.h>
 
@@ -275,6 +279,42 @@
     )
 );
 
+#define VIDEO_ENCODING_UNKNOWN  0xFF
+
+unsigned int streamtype_to_encoding(unsigned int streamtype)
+{
+#ifdef VIDEO_SET_ENCODING
+    switch(streamtype)
+    {
+    case STREAMTYPE_MPEG2:
+        return VIDEO_ENCODING_AUTO;
+    case STREAMTYPE_MPEG4_H264:
+        return VIDEO_ENCODING_H264;
+    case STREAMTYPE_H263:
+        return VIDEO_ENCODING_H263;
+    case STREAMTYPE_MPEG4_Part2:
+        return VIDEO_ENCODING_MPEG4P2;
+    case STREAMTYPE_MPEG1:
+        return VIDEO_ENCODING_AUTO;
+    case STREAMTYPE_XVID:
+        return VIDEO_ENCODING_MPEG4P2;
+    case STREAMTYPE_DIVX311:
+        return VIDEO_ENCODING_MPEG4P2;
+    case STREAMTYPE_DIVX4:
+        return VIDEO_ENCODING_MPEG4P2;
+    case STREAMTYPE_DIVX5:
+        return VIDEO_ENCODING_MPEG4P2;
+    case STREAMTYPE_VC1:
+        return VIDEO_ENCODING_VC1;
+    case STREAMTYPE_VC1_SM:
+        return VIDEO_ENCODING_WMV;
+    default:
+        return VIDEO_ENCODING_UNKNOWN;
+    }
+#endif
+    return VIDEO_ENCODING_UNKNOWN;
+}
+
 static void gst_dvbvideosink_init(GstDVBVideoSink *self);
 static void gst_dvbvideosink_dispose(GObject *obj);
 static void gst_dvbvideosink_reset(GObject *obj);
@@ -373,6 +413,11 @@
     self->saved_fallback_framerate[0] = 0;
     self->rate = 1.0;
     self->wmv_asf = FALSE;
+#ifdef VIDEO_SET_ENCODING
+    self->use_set_encoding = TRUE;
+#else
+    self->use_set_encoding = FALSE;
+#endif
 
 #ifdef VUPLUS
     gst_base_sink_set_sync(GST_BASE_SINK(self), FALSE);
@@ -510,6 +555,10 @@
         pfd[1].fd = self->fd;
         pfd[1].events = POLLIN;
 
+#ifdef VIDEO_FLUSH
+        gst_sleepms(100);
+        if (self->fd >= 0) ioctl(self->fd, VIDEO_FLUSH, 1/*NONBLOCK*/); //Notify the player that no addionional data will be injected
+#endif
         GST_BASE_SINK_PREROLL_UNLOCK(sink);
         while (1)
         {
@@ -1680,9 +1729,22 @@
             if (self->fd >= 0) ioctl(self->fd, VIDEO_STOP, 0);
             self->playing = FALSE;
         }
-        if (!self->playing && (self->fd < 0 || ioctl(self->fd, VIDEO_SET_STREAMTYPE, self->stream_type) < 0))
+        if (self->use_set_encoding)
+        {
+#ifdef VIDEO_SET_ENCODING
+            unsigned int encoding = streamtype_to_encoding(self->stream_type);
+            if (!self->playing && (self->fd < 0 || ioctl(self->fd, VIDEO_SET_ENCODING, encoding) < 0))
+            {
+                GST_ELEMENT_ERROR(self, STREAM, DECODE, (NULL), ("hardware decoder can't be set to encoding %i", encoding));
+            }
+#endif
+        }
+        else
         {
-            GST_ELEMENT_ERROR(self, STREAM, CODEC_NOT_FOUND, (NULL), ("hardware decoder can't handle streamtype %i", self->stream_type));
+            if (!self->playing && (self->fd < 0 || ioctl(self->fd, VIDEO_SET_STREAMTYPE, self->stream_type) < 0))
+            {
+                GST_ELEMENT_ERROR(self, STREAM, CODEC_NOT_FOUND, (NULL), ("hardware decoder can't handle streamtype %i", self->stream_type));
+            }
         }
         if (self->fd >= 0)
         {
--- a/gstdvbaudiosink.c    2016-02-05 00:25:12.736570814 +0100
+++ b/gstdvbaudiosink.c    2016-02-05 00:28:06.715938682 +0100
@@ -64,6 +64,10 @@
 #include <config.h>
 #endif
 
+#ifdef __sh__
+#include <linux/dvb/stm_ioctls.h>
+#endif
+
 #include <gst/gst.h>
 #include <gst/audio/audio.h>
 #include <gst/base/gstbasesink.h>
@@ -188,6 +192,36 @@
     )
 );
 
+#define AUDIO_ENCODING_UNKNOWN  0xFF
+
+unsigned int bypass_to_encoding (unsigned int bypass)
+{
+#ifdef AUDIO_SET_ENCODING
+    switch(bypass)
+    {
+    case AUDIOTYPE_AC3:
+    case AUDIOTYPE_AC3_PLUS:
+        return AUDIO_ENCODING_AC3;
+    case AUDIOTYPE_MPEG:
+        return AUDIO_ENCODING_MPEG1;
+    case AUDIOTYPE_DTS:
+        return AUDIO_ENCODING_DTS;
+    case AUDIOTYPE_LPCM:
+        return AUDIO_ENCODING_LPCMA;
+    case AUDIOTYPE_MP3:
+        return AUDIO_ENCODING_MP3;
+    case AUDIOTYPE_AAC_PLUS:
+        return AUDIO_ENCODING_AAC;
+    case AUDIOTYPE_WMA:
+    case AUDIOTYPE_WMA_PRO:
+        return AUDIO_ENCODING_WMA;
+    default:
+        return AUDIO_ENCODING_UNKNOWN;
+    }
+#endif
+    return AUDIO_ENCODING_UNKNOWN;
+}
+
 static void gst_dvbaudiosink_init(GstDVBAudioSink *self);
 static void gst_dvbaudiosink_dispose(GObject *obj);
 static void gst_dvbaudiosink_reset(GObject *obj);
@@ -282,6 +316,11 @@
     self->unlockfd[0] = self->unlockfd[1] = -1;
     self->rate = 1.0;
     self->timestamp = GST_CLOCK_TIME_NONE;
+#ifdef AUDIO_SET_ENCODING
+    self->use_set_encoding = TRUE;
+#else
+    self->use_set_encoding = FALSE;
+#endif
 #ifdef VUPLUS
     gst_base_sink_set_sync(GST_BASE_SINK(self), FALSE);
     gst_base_sink_set_async_enabled(GST_BASE_SINK(self), FALSE);
@@ -720,10 +759,23 @@
         if (self->fd >= 0) ioctl(self->fd, AUDIO_STOP, 0);
         self->playing = FALSE;
     }
-    if (self->fd < 0 || ioctl(self->fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
+    if (self->use_set_encoding)
     {
-        GST_ELEMENT_ERROR(self, STREAM, TYPE_NOT_FOUND,(NULL),("hardware decoder can't be set to bypass mode type %s", type));
-        return FALSE;
+#ifdef AUDIO_SET_ENCODING
+        unsigned int encoding = bypass_to_encoding(bypass);
+        if (self->fd < 0 || ioctl(self->fd, AUDIO_SET_ENCODING, encoding) < 0)
+        {
+            GST_ELEMENT_WARNING(self, STREAM, DECODE,(NULL),("hardware decoder can't be set to encoding %i", encoding));
+        }
+#endif
+    }
+    else
+    {
+        if (self->fd < 0 || ioctl(self->fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
+        {
+            GST_ELEMENT_ERROR(self, STREAM, TYPE_NOT_FOUND,(NULL),("hardware decoder can't be set to bypass mode type %s", type));
+            return FALSE;
+        }
     }
     if (self->fd >= 0) ioctl(self->fd, AUDIO_PLAY);
     self->playing = TRUE;
@@ -779,6 +831,10 @@
     {
         gboolean pass_eos = FALSE;
         struct pollfd pfd[2];
+#ifdef AUDIO_FLUSH
+        gst_sleepms(100);
+        if (self->fd >= 0) ioctl(self->fd, AUDIO_FLUSH, 1/*NONBLOCK*/); //Notify the player that no addionional data will be injected
+#endif
         pfd[0].fd = self->unlockfd[0];
         pfd[0].events = POLLIN;
         pfd[1].fd = self->fd;
@@ -916,12 +972,16 @@
         {
             GST_LOG_OBJECT(self, "going into poll, have %d bytes to write", len - written);
         }
+#if CHECK_DRAIN
         if (poll(pfd, 2, -1) < 0)
         {
             if (errno == EINTR) continue;
             retval = -1;
             break;
         }
+#else
+        pfd[1].revents = POLLOUT;
+#endif
         if (pfd[0].revents & POLLIN)
         {
             /* read all stop commands */

I've added your gst_sleepms right before the video flush.

So far I couldn't get it to freeze up, but I just tried it 3 or 4 times (playing +5minutes and stopping).

 

However I've moved spark FLUSH (for both video and audio) back to "case GST_EVENT_EOS", because that's where it's at in the original sh4 patch.

Still what's not clear to me is whether it's better to place it under GST_EVENT_FLUSH_STOP right before the: "if (self->fd >= 0) ioctl(self->fd, VIDEO_CLEAR_BUFFER)" or not.

 

But if the 100ms indeed fixes the freezing for good, then I'll wrap the rest of the changes into #ifdef SPARK statements.


Edited by MastaG, 5 February 2016 - 15:53.


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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 5 February 2016 - 16:07

I think the 100ms delay before the VIDEO_FLUSH and AUDIO_FLUSH has possitive effect for now.

So far it succesfully returns from playing back to the main menu everytime using both DreamPlex and the internal enigma2 movie player.

 

It only makes me wonder why it would never freeze up when playing and stopping the movie using gst-launch's playbin (with or without the 100ms delay).

And since I didn't make any changes to enigma2's servicemp3.cpp at all.. I'm wondering why adding a delay before the flush in the dvbmediasink fixes a freeze which only happens when stopping a video file in enigma2.

 

But so far my little spark cinema is looking good :-)

Attached Files


Edited by MastaG, 5 February 2016 - 16:09.


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

  • Senior Member
  • 1,699 posts

+46
Good

Posted 5 February 2016 - 19:08

To paraphrase Croatian Canadian PM: "Stay calm and code on..." :D


<span style='font-family: comic sans ms,cursive'>"Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!</span><br /> <br /><span style='font-family: comic sans ms,cursive'>Laziness and cowardice are the reasons why such a large proportion of men, even when nature has long emancipated them from alien guidance..." I. Kant, "Political writings" (1784)</span><br /> <br /><span style='font-family: comic sans ms,cursive'><a class='bbc_url' href='<a class='bbc_url' href='http://eserver.org/p...lightenment.txt'>http://eserver.org/p...ent.txt</a>'><a class='bbc_url' href='http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a>'>http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a></a> - the jolly text on Enlightenment, at the basis of Modernity...</span>

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

  • Member
  • 16 posts

0
Neutral

Posted 5 February 2016 - 19:20

@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.

how i will apply this fix ?

do i need to redownload the image here and install it or what ?



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

  • Member
  • 15 posts

0
Neutral

Posted 6 February 2016 - 12:28

where to get the bad-fragmented for Gstreamer 1.7.1



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

  • Member
  • 16 posts

0
Neutral

Posted 7 February 2016 - 14:53

Why can't input letters with remote control ? I don' want to use virtual keyboard. Because it's much faster with number keys.

For example with YouTube Plugin search function.

In the original openPli image it's working fine !



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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 7 February 2016 - 20:56

@lostman

You'll have to wait for me to release new images and push my changes to the feed.

I'm still working out the nasty freeze when stopping a movie but this weekend I had to do family stuff.

You can also try Taapat's PLi5 image, he works very hard on his image to ensure perfection.

He uses ePlayer which pretty much works for everything, I've tested it last week for myself.

However I'd like to continue using gstreamer.

 

@cornetster

It should be in the feeds for every receiver.

 

@odokrim

I purposely break the number keys just to annoy the testers :P



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

  • Member
  • 16 posts

0
Neutral

Posted 7 February 2016 - 21:21

@lostman

You'll have to wait for me to release new images and push my changes to the feed.

I'm still working out the nasty freeze when stopping a movie but this weekend I had to do family stuff.

You can also try Taapat's PLi5 image, he works very hard on his image to ensure perfection.

He uses ePlayer which pretty much works for everything, I've tested it last week for myself.

However I'd like to continue using gstreamer.

 

@cornetster

It should be in the feeds for every receiver.

 

@odokrim

I purposely break the number keys just to annoy the testers :P

ok i am waiting

i already use taapat`s image , but your image faster when change between encrypted channels  ;) i dont know if its right or not but i feel it work better with sharing server 



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

  • Senior Member
  • 37 posts

0
Neutral

Posted 8 February 2016 - 04:32

are there any updates for this one ..

 

Firmware versie: 4.0 Driver date: 4.0.1+20151109-r0 Kernel versie: 4.0.1 Gui versie: 2016-01-04-(HEAD detached at 83f9ba2)

 

http://jam.japhar.co...all/Packages.gz

Installed this on a Formuler F1, works extremely well now

only auttimer settings gives me error via WebIF

"html><head><title>web.Server Traceback (most recent call last)</title></head><body><b>web.Server Traceback (most recent call last):</b> <div> <style type="text/css"> div.error { color: red; font-family: Verdana, Arial, helvetica, sans-serif; font-weight: bold; } div { font-family: Verdana, Arial, helvetica, sans-serif; } div.stackTrace { } div.frame { padding: 1em; background: white; border-bottom: thin black dashed; } div.frame:first-child { padding: 1em; background: white; border-top: thin black "



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

  • Member
  • 1 posts

0
Neutral

Posted 8 February 2016 - 20:57

hi MastaG

with your image when i switch between dvb-s2 channels to dvb-t channels my reciver crash and hang up.if my hdd in standby i have this crash otherwise everythings is fine.is this a bug?



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

  • Member
  • 9 posts

0
Neutral

Posted 10 February 2016 - 07:15

hi MastaG
Is it possible add meta-odin (e3hd) from oe-alliance.
Thank you



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

  • Senior Member
  • 154 posts

+1
Neutral

Posted 12 February 2016 - 01:13

did u relase the latest image. where is the link :D



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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 12 February 2016 - 12:27

Almost done... really almost..
Just finishing up some user requests.

The spark image is working perfectly fine now (thx to taapat for the most). It's faster than ever and 100% like an original PLi image.



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

  • Senior Member
  • 1,699 posts

+46
Good

Posted 12 February 2016 - 14:29

Looking forward to testing it...

 

Sorted out the WLAN issues?


<span style='font-family: comic sans ms,cursive'>"Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!</span><br /> <br /><span style='font-family: comic sans ms,cursive'>Laziness and cowardice are the reasons why such a large proportion of men, even when nature has long emancipated them from alien guidance..." I. Kant, "Political writings" (1784)</span><br /> <br /><span style='font-family: comic sans ms,cursive'><a class='bbc_url' href='<a class='bbc_url' href='http://eserver.org/p...lightenment.txt'>http://eserver.org/p...ent.txt</a>'><a class='bbc_url' href='http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a>'>http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a></a> - the jolly text on Enlightenment, at the basis of Modernity...</span>

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

  • Senior Member
  • 80 posts

+1
Neutral

Posted 12 February 2016 - 18:12

Is there an up to date image for Spark 7111 or do we have to download from first post then update online ?

Regards

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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 12 February 2016 - 18:13

Yes I believe so.

The firmware files and rt configuration file for wpa_supplicant were missing in the last image.

Taapat showed me the files I needed to add, and I did.

However I couldnt test this myself since I have no such wifi usb stick.

 

Also I'm shipping the latest ffmpeg as well and I'll also upload a libeplayer version of my image with a sepperate feed for the ones that were asking for it.



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

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 12 February 2016 - 20:35

Zram was argued against by none other than Graugans and Delfi, m8.... Just so you know... ;)


We tried zram years ago, and it only made things worse, not better. I'd suggest digging up the history of that from the commit logs and forum comments.

(Maybe it helps when most of the system's memory is occupied by copies of unused Java code.)

Edited by MiLo, 12 February 2016 - 20:35.

Real musicians never die - they just decompose

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

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 12 February 2016 - 20:40

Yes its much faster without zram.
I made it so you can just do:
touch /etc/gimme-zram if you want to use it.
But its disabled by default.

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

  • Senior Member
  • 171 posts

+21
Neutral

Posted 13 February 2016 - 12:23

When will the image be available for test DM 800HD SE ?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users