Jump to content


Photo

GStreamer 1.0

gstreamer 1.0 openpli

  • Please log in to reply
2520 replies to this topic

Re: GStreamer 1.0 #1621 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 14 August 2015 - 09:22

Thanks Chris,

 

Now I can kick out the .bbappend :-)



Re: GStreamer 1.0 #1622 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 15 August 2015 - 11:53

In gstreamer 1.5.1 there is an issue with mkv playback. Some files don't work. As quick workaround you can revert one commit like here:

https://github.com/o...012208e9e3e6559

 

I have informed gstreamer guys and it seems they can reproduce the issue:

https://bugzilla.gno...g.cgi?id=738237


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: GStreamer 1.0 #1623 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 15 August 2015 - 12:14

Bug is now fixed in the git:
http://cgit.freedesk...8476f3e9b486ec5


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: GStreamer 1.0 #1624 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 16 August 2015 - 19:59

Thanks for reporting this betacentauri.
I'll check this in as well :-)

Re: GStreamer 1.0 #1625 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 17 August 2015 - 17:00

Hi,

Is there any reason why we are passing FLUSH start and FLUSH stop event to basesink only if we are in paused state? Why we are not passing SEGMENT event to basesink?

I don't see reason for it, basesink should be informed about every event so it can handle it's state properly. Only exception I can see is handling of EOS event, where we should only pass this event when driver buffer is empty.

What do you think?

diff --git a/gstdvbaudiosink.c b/gstdvbaudiosink.c
index 8aef625..f868345 100644
--- a/gstdvbaudiosink.c
+++ b/gstdvbaudiosink.c
@@ -813,7 +813,7 @@ static gboolean gst_dvbaudiosink_event(GstBaseSink *sink, GstEvent *event)
 		self->flushing = TRUE;
 		/* wakeup the poll */
 		write(self->unlockfd[1], "\x01", 1);
-		if(self->paused) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	case GST_EVENT_FLUSH_STOP:
 		if (self->fd >= 0) ioctl(self->fd, AUDIO_CLEAR_BUFFER);
@@ -831,7 +831,7 @@ static gboolean gst_dvbaudiosink_event(GstBaseSink *sink, GstEvent *event)
 			self->cache = NULL;
 		}
 		GST_OBJECT_UNLOCK(self);
-		if(self->paused) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	case GST_EVENT_EOS:
 	{
@@ -882,6 +882,7 @@ static gboolean gst_dvbaudiosink_event(GstBaseSink *sink, GstEvent *event)
 		GST_BASE_SINK_PREROLL_LOCK(sink);
 #endif
 		if (ret) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		else gst_event_unref(event);
 		break;
 	}
 #if GST_VERSION_MAJOR < 1
@@ -934,6 +935,7 @@ static gboolean gst_dvbaudiosink_event(GstBaseSink *sink, GstEvent *event)
 				self->rate = rate;
 			}
 		}
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	}
 	default:
diff --git a/gstdvbvideosink.c b/gstdvbvideosink.c
index d3f6cf8..e147bc7 100644
--- a/gstdvbvideosink.c
+++ b/gstdvbvideosink.c
@@ -402,7 +402,7 @@ static gboolean gst_dvbvideosink_event(GstBaseSink *sink, GstEvent *event)
 		self->flushing = TRUE;
 		/* wakeup the poll */
 		write(self->unlockfd[1], "\x01", 1);
-		if(self->paused) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	case GST_EVENT_FLUSH_STOP:
 		if (self->fd >= 0) ioctl(self->fd, VIDEO_CLEAR_BUFFER);
@@ -414,7 +414,7 @@ static gboolean gst_dvbvideosink_event(GstBaseSink *sink, GstEvent *event)
 		}
 		self->flushing = FALSE;
 		GST_OBJECT_UNLOCK(self);
-		if(self->paused) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	case GST_EVENT_EOS:
 	{
@@ -465,6 +465,7 @@ static gboolean gst_dvbvideosink_event(GstBaseSink *sink, GstEvent *event)
 		GST_BASE_SINK_PREROLL_LOCK(sink);
 #endif
 		if (ret) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+		else gst_event_unref(event);
 		break;
 	}
 #if GST_VERSION_MAJOR < 1
@@ -510,6 +511,7 @@ static gboolean gst_dvbvideosink_event(GstBaseSink *sink, GstEvent *event)
 				self->rate = rate;
 			}
 		}
+		ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
 		break;
 	}
 	default:
--

With this modification I can see little improvement in seeking and unpausing on vusolose - audio-video sync is slightly quicker.

 

Attached Files



Re: GStreamer 1.0 #1626 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 17 August 2015 - 17:37

Couldn't you push this a few hours earlier ;-)
Thanks for the patch !

Re: GStreamer 1.0 #1627 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 17 August 2015 - 18:38

It would be great if you could add also this one, it's still work in progress but it significantly improves unpause performance

Attached Files



Re: GStreamer 1.0 #1628 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 17 August 2015 - 18:43

If You use my multiboxsink  there is no new segment or flush if you go to pause or unpause.



Re: GStreamer 1.0 #1629 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 17 August 2015 - 18:56

Yes but I only use your sink for dreambox receivers..
Wouldn't it be better to just merge your sink into PLi's?
Or switch over the gst-1 to your sink?

Re: GStreamer 1.0 #1630 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 17 August 2015 - 19:13

Hi,
Is there any reason why we are passing FLUSH start and FLUSH stop event to basesink only if we are in paused state? Why we are not passing SEGMENT event to basesink?
I don't see reason for it, basesink should be informed about every event so it can handle it's state properly. Only exception I can see is handling of EOS event, where we should only pass this event when driver buffer is empty.
What do you think?


I think it should be ok!

Before 27b18f56 there was no event to basesink and when seeking from paused state deadlock was happening.

commit 27b18f56cfbe2c5d23f194fca882ea387378c105
Author: Athanasios Oikonomou <athoik@gmail.com>
Date:   Fri Oct 31 19:21:01 2014 +0200

    dvbmediasink: fix deadlock when seeking from paused state

    When seeking from paused state we need to inform the parent sink else we are getting deadlock

    Signed-off-by: Erik Slagter <erik@openpli.org>

commit 9eda43560bfc748f9bc425591fe8c01d48e56e5d
Author: Athanasios Oikonomou <athoik@gmail.com>
Date:   Sat Oct 18 10:26:27 2014 +0300

    sink_event: update for basesink event handler changes

    updating basesink event handler fixes GST_EVENT_EOS not received by bus

    Signed-off-by: pieterg <pieterg@users.sourceforge.net>
I also think that simply removing those will be ok since we are checking the following (your commit c01d599392ab3080b69d9016f86e74d4e69d76fa):

                if (ret) ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
                break;

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: GStreamer 1.0 #1631 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 17 August 2015 - 19:43

Yes but I only use your sink for dreambox receivers..
Wouldn't it be better to just merge your sink into PLi's?
Or switch over the gst-1 to your sink?

The sink work for all boxes not only for dreambox and much better since at base already all non needed code is removed.



Re: GStreamer 1.0 #1632 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 18 August 2015 - 18:32

@athoik

Thanks for clarification, I did more tests and with this patch it's not possible to do fast forward, at least on vusolose, so not alright..



Re: GStreamer 1.0 #1633 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 19 August 2015 - 07:50

I'm using the gstreamer1.0-plugin-dvbmediasink without any patches atm, and I also have some issues with resuming from a paused state.

A good example is the subtitle downloader in TSMedia, which will automatically pause the movie.

Then when you close the subtitle downloader, the movie sometimes doesn't continue playing.

 

Which of the two patches causes fast forward to fail?

The one for the mediasink or for servicemp3.cpp?



Re: GStreamer 1.0 #1634 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 19 August 2015 - 08:03

To all If You use by gst-1.0 the :

 

https://github.com/c...ox-dvbmediasink

 

There is no problem with pause unpause. There is no flush when you pause or unpause.

 

Included log GST_DEBUG=dvbaudiosink:4,dtsdownmix:4 vuduo2 (latest gst-1 git latest enigma2) mediasink config by build:

DVBMEDIASINK_CONFIG = "--with-wmv --with-pcm --with-eac3"

Attached Files



Re: GStreamer 1.0 #1635 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 19 August 2015 - 08:08

I'll completely move over to multiox in my next build.

@christophecvr could you maybe verify whether adding 0001-servicemp3-improve-unpause-performance-in-gstreamer1.patch would benefit?



Re: GStreamer 1.0 #1636 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 19 August 2015 - 08:25

I'm using the gstreamer1.0-plugin-dvbmediasink without any patches atm, and I also have some issues with resuming from a paused state.

A good example is the subtitle downloader in TSMedia, which will automatically pause the movie.

Then when you close the subtitle downloader, the movie sometimes doesn't continue playing.

 

Which of the two patches causes fast forward to fail?

The one for the mediasink or for servicemp3.cpp?

mediasink



Re: GStreamer 1.0 #1637 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 19 August 2015 - 08:28

I'll completely move over to multiox in my next build.

@christophecvr could you maybe verify whether adding 0001-servicemp3-improve-unpause-performance-in-gstreamer1.patch would benefit?

If someone gives me the streams who have this problem I'll prepared to try it out.

 

As far I looked up in future we should even be able with latest gstreamer to do fast back search (<<) . Which now is not possible yet.

 

Some extra inf for building. dvb mediasink config:

dm8000.

DVBMEDIASINK_CONFIG = "--with-dreambox --with-pcm --with-wma --with-dtsdownmix --with-wmv --with-eac3 --with-limited-mpeg4v2"

dm800se

DVBMEDIASINK_CONFIG = "--with-dreambox --with-pcm --with-wma --with-dtsdownmix --with-wmv --with-eac3"

For all other boxes use that one which was used by pli4's gst-1.0 sink.


Re: GStreamer 1.0 #1638 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 19 August 2015 - 08:35

Ah thanks guys,

 

Well I'll switch over all receivers to christopher's sink for the next build.

I was already using it for all dreambox receivers (and my experimental spark7162 build), where I've never experienced troubles with pause/unpause and seeking.

Now with my new not-allowed-to-talk-about unsupported receiver I'm having troubles resuming from a paused state using the default mediasink from pli.

 

However I'll add in the servicemp3 patch from mx3L as well, just for testing purposes :-)



Re: GStreamer 1.0 #1639 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 19 August 2015 - 09:04

@christophecvr

How did you achieve non-flushing unpause without modification of servicemp3? As it is now unpause is done by calling trickSeek(1.0) which will set pipeline to playing state and then do flushing seek to current position, do you intercept this somehow in dvbmediasink?



Re: GStreamer 1.0 #1640 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 19 August 2015 - 09:13

I'll stop the audio play.

 

by settings self-playing = false. by the audio.

static GstStateChangeReturn gst_dvbaudiosink_change_state(GstElement *element, GstStateChange transition)
{
	GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
	GstDVBAudioSink *self = GST_DVBAUDIOSINK(element);
	FILE *f;

	switch(transition)
	{
	case GST_STATE_CHANGE_NULL_TO_READY:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_NULL_TO_READY");
		self->m_paused = FALSE;
		self->ok_to_write = 1;
		break;
	case GST_STATE_CHANGE_READY_TO_PAUSED:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_READY_TO_PAUSED");
		self->paused = TRUE;
		if (self->fd >= 0)
		{
			ioctl(self->fd, AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY);
			ioctl(self->fd, AUDIO_PAUSE);
		}
		if(get_downmix_ready())
			self->using_dts_downmix = TRUE;
		break;
	case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_PAUSED_TO_PLAYING");
		if(!self->m_paused) // first play all boxes
		{
			if (self->fd >= 0) ioctl(self->fd, AUDIO_CONTINUE);
			self->paused = FALSE;
		}
		else // standard unpause all boxes
		{
			if (self->fd >= 0) ioctl(self->fd, AUDIO_CONTINUE);
			self->playing = TRUE;
			self->paused = FALSE;
		}
		break;
	default:
		break;
	}

	ret = GST_ELEMENT_CLASS(parent_class)->change_state(element, transition);

	switch(transition)
	{
	case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_PLAYING_TO_PAUSED");
		self->paused = TRUE;
		self->m_paused = TRUE;

		if (self->fd >= 0)
		{
			ioctl(self->fd, AUDIO_PAUSE);
		}
		/* wakeup the poll */
		write(self->unlockfd[1], "\x01", 1);
		self->playing = FALSE;
		break;
	case GST_STATE_CHANGE_PAUSED_TO_READY:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_PAUSED_TO_READY");
		break;
	case GST_STATE_CHANGE_READY_TO_NULL:
		GST_INFO_OBJECT(self,"GST_STATE_CHANGE_READY_TO_NULL");
		break;
	default:
		break;
	}

	return ret;
}




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users