Jump to content


Photo

Physical CD/DVD support enigma2.

DVD UDF AUDIO CD ISO CDIO

  • Please log in to reply
162 replies to this topic

Re: Physical CD/DVD support enigma2. #41 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 13 September 2015 - 19:32

Merged it. I don't have a DVD drive to test with at the moment, so i'll take your word for it that it works better than before :)

 

It would have looked nicer to "amend" the commits instead of adding more commits though, but that'll be for next time.


Real musicians never die - they just decompose

Re: Physical CD/DVD support enigma2. #42 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 14 September 2015 - 06:04

Thank's I .

 

Now i'm starting the work on the audio cd issue. I noticed that the current cdfs kernel module is not really stable. At least not by dm8000. The problem has been reported already by others, cd stops playing after a certain time add random.

 

By gst-1.0 for example and my dm8000 . If I rebuild the cdfs-kernel-module with as last patch that for kernel 3.2. Then do not use the gstreamer1.0-plugin-ugly-libcdio (uninstall it) But use gstreamer1.0-plugin-base-cdparanoia,

the libcdparanoia is installed automatically when the gstreamer1.0-plugin-base-cdparanoia is installed. It works fine.

 

I first looked up how excatly it is done on my ubuntu 14.04 desktop. They had as well problems with audio cd's when the kernel cdfs kernel module was taken out of linux kernels. You can see that through the ubuntu evolutions there was even a time that they used another base media player instead off the rhythmbox. Now its all solved.

 

What they do the audio cd is not mounted anymore . They create well a virtual file system in user space using gvfs. Thank's to this You can browse the contents of audio cd by clicking on the cd icon in nautilus browser if audio cd is inserted. Or just open 

cdda://sr0  in nautilus . They base player rhythmbox can work with that vlc also. Bassically it's a not mounted working network map link which is made when a cd is installed. They also use cdparanoia to play cd's.

/run/user/1000/gvfs/cdda:host=sr0

In the map You find the track's on the cd in form Track 1.wav   Track 2.wav ....

 

We do not have gvfs on openembedded. But I found an old source off fuse-cdfs. Now i'm trying to adapt it and let it run on a mipsel stb. It does about the same as gfvs using fuse and sqlite3 . Fuse and sqlite are installed by default . That's using libcdio and paranoia. Required is well to update libcdio to the last version. Since paranoia is not included by libcdio >= 9.0 . It is avbl as a separate lib libcdio-paranoia 10.2. 

I'll hope this will be a good solution then we can be rid off the unstable cdfs-kernel-module.


Edited by christophecvr, 14 September 2015 - 06:09.


Re: Physical CD/DVD support enigma2. #43 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 14 September 2015 - 06:32

Getting rid of cdfs is certainly good.

Maybe we can do without any filesystem at all, and just call some library or so directly from within Enigma2 to playback audio? After all, if it runs through fuse, the implementation is in user-space anyway.
Real musicians never die - they just decompose

Re: Physical CD/DVD support enigma2. #44 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 14 September 2015 - 07:08

Getting rid of cdfs is certainly good.

Maybe we can do without any filesystem at all, and just call some library or so directly from within Enigma2 to playback audio? After all, if it runs through fuse, the implementation is in user-space anyway.

Yes a thaught at that.  But still we will have to first read out the cd contents table track info , start end. Creating a playlist . Then adapt mediaplayer to read that playlist. next scan for detailed track info with cddb ....

The cd will not be shown in pvr locations list .

 

I'll see (if I can get it light weight and work with an own fuse-cdfs ) it will be few adaptations to enigma2 to use it , and it will show up in pvr locations list also when a cd is inserted location will be gone if cd is removed.

 

I also just found out that into the enigma2/hotplug-e2-helper.bb the srcrev is not adapted to new one after the migration of my commits.

 

it's still

DESCIPTION = "helper tool to deliver hotplug events to e2"
MAINTAINER = "PLi team"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://bdpoll.c;startline=9;endline=20;md5=d903287e43d72c0f608fd5b718e88450"

inherit gitpkgv

PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"

SRCREV = "02e6879ffcf2a0aa9c83b355b52108f1e5f4f56c"

the new srcrev is

SRCREV = "b2e066ba9813bd11a3e643c2f11b4a1f28def2d4"


Re: Physical CD/DVD support enigma2. #45 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 14 September 2015 - 13:54

@MiLo

 

I just added push request for update hotplug-e2-helper.bb to current SRCREV .

 

For gst-1.0 think it's best to merge.



Re: Physical CD/DVD support enigma2. #46 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 15 September 2015 - 07:40

About audio cd which stops ad random.

 

- It is not the cdfs file system.

- It is not gstreamer on itself !

 

The problem is the async run off audiosink against pcm decoding and dvbdriver which set the dvb automatically in sync mode.

ep 15 08:18:17 dm8000 user.warn kernel: audio: xpt stop(0)
Sep 15 08:18:17 dm8000 user.warn kernel: unpause
Sep 15 08:18:17 dm8000 user.warn kernel: audio: decoder stop
Sep 15 08:18:17 dm8000 user.warn kernel: no decoder left in sync handling so disable xpt_sync
Sep 15 08:18:17 dm8000 user.warn kernel: bcm_audio_channel_stop(0) done
Sep 15 08:18:25 dm8000 user.warn kernel: audio xpt start
Sep 15 08:18:25 dm8000 user.warn kernel: sync is off so we enable it
Sep 15 08:18:25 dm8000 user.warn kernel: playback!
Sep 15 08:18:25 dm8000 user.warn kernel: PCM
Sep 15 08:18:25 dm8000 user.warn kernel: audio: decoder start 0
Sep 15 08:18:25 dm8000 user.warn kernel: video delay 0 (0 ms)
Sep 15 08:18:25 dm8000 user.warn kernel: total video delay: 0 (0 ms)
Sep 15 08:18:25 dm8000 user.warn kernel: ch0: lock
Sep 15 08:18:25 dm8000 user.warn kernel: RAP first pts 0x0, stc 0x183dc02, pcr invalid
Sep 15 08:18:25 dm8000 user.warn kernel: RAP first pts 0xa8c, stc 0x27a0, pcr invalid
Sep 15 08:18:25 dm8000 user.warn kernel: RAP sampling rate info isr (44100)

What happening in async mode , is sometimes at random : A little lateness (so little You can't even here it when You run in sync) But unfortunately the dvbdriver interrupts the audio, the all is screwed. To recover this , we only could do it with a full flush gstreamer and dvb . This to have the pcm gstreamer decoding (it's wav) back in sync with dvb. If this is not done gstreamer want's to play , unfortunately the dvb rejects (audio unlock). With a message no audio or pts error.

 

Well solution we could write a lot off code if cd audio and try to intercept the interruption signal do flush/seek with last pts and ....

 

I just found a very easy solution. Just set the base audiosink (since there is no video) in sync means.

static void gst_dvbaudiosink_init(GstDVBAudioSink *self)
{
	self->codec_data = NULL;
	self->bypass = AUDIOTYPE_UNKNOWN;
	self->fixed_buffersize = 0;
	self->fixed_bufferduration = GST_CLOCK_TIME_NONE;
	self->fixed_buffertimestamp = GST_CLOCK_TIME_NONE;
	self->aac_adts_header_valid = FALSE;
	self->pesheader_buffer = NULL;
	self->cache = NULL;
	self->playing = self->flushing = self->unlocking = self->paused = FALSE;
	self->pts_written = self->using_dts_downmix = FALSE;
	self->lastpts = 0;
	self->timestamp_offset = 0;
	self->queue = NULL;
	self->fd = -1;
	self->unlockfd[0] = self->unlockfd[1] = -1;
	self->rate = 1.0;
	self->timestamp = GST_CLOCK_TIME_NONE;

	gst_base_sink_set_sync(GST_BASE_SINK(self), TRUE);
	gst_base_sink_set_async_enabled(GST_BASE_SINK(self), FALSE);
}

Then the cd are playing perfect whitout any interuption. :)

 

I will now perform test If its' possible to set only the base audiosink always in sync in case we are playing audio only media. Case video/audio async.



Re: Physical CD/DVD support enigma2. #47 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 16 September 2015 - 06:03

It looks to me that you're working with raw audio stream, if that's the case then dvbaudiosink has already sync enabled - http://forums.openpl...indpost&p=50447.

Perhaps you should try to turn it off.



Re: Physical CD/DVD support enigma2. #48 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 09:10

It's trough that we are using raw audio  its pcm.  But in despit the fact that the audio cd is mounted as a filesystem using the cdfs-kernel-module we not really using the wav file. The audio cd is played by gstreamer using libcdio (libparanoia) depending on wich plugin is installed. Enigma2(mediaplayer) thinks it's playing track-xx.wav but servicemp3.h plays it with uri=//cdda/xx  .

 

Illustreated in log.

[SKIN] Parsing embedded skin <embedded-in-'MediaPlayerLCDScreen'>
[Skin] Attribute not implemented: id value: 1
<   968.793229> [ePicLoad] setPara max-X=150 max-Y=150 aspect_ratio=1.000000 cache=0 resize=1 bg=#00000000 auto_orient=0
[cdtext_scan] cdtextinfo -xalT
<   968.812878> [eConsoleAppContainer] Starting /bin/sh
[cddb_scan] cdtextinfo -xalD --cddb-port=8880 --cddb-server=freedb.freedb.org --cddb-timeout=20
<   968.821233> [eConsoleAppContainer] Starting /bin/sh
playing 4097:0:0:0:0:0:0:0:0:0:/media/sr0/track-01.wav
<   968.833734> [eServiceMP3] construct!
<   968.839901> [eServiceMP3] playbin uri=cdda://1
<   968.967471> [eServiceMP3] starting pipeline

But What's well, By moving the :

gst_base_sink_set_sync(GST_BASE_SINK(self), FALSE);

From : to

//from
static void gst_dvbaudiosink_init(GstDVBAudioSink *self)

//to
	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;
		gst_base_sink_set_sync(GST_BASE_SINK(self), FALSE);
		break;

It's indeed working same like I tried before by setting it to :

gst_base_sink_set_sync(GST_BASE_SINK(self), TRUE);

In previous location :)

 

I'm also on another trace Still testing but at this time already a cd which never could be played full from begin to end does it now.

 

With You're latest chnage , an wit an extra setting into :

static void gst_dvbaudiosink_init(GstDVBAudioSink *self)
{
	self->codec_data = NULL;
	self->bypass = AUDIOTYPE_UNKNOWN;
	self->fixed_buffersize = 0;
	self->fixed_bufferduration = GST_CLOCK_TIME_NONE;
	self->fixed_buffertimestamp = GST_CLOCK_TIME_NONE;
	self->aac_adts_header_valid = FALSE;
	self->pesheader_buffer = NULL;
	self->cache = NULL;
	self->playing = self->flushing = self->unlocking = self->paused = FALSE;
	self->pts_written = self->using_dts_downmix = FALSE;
	self->lastpts = 0;
	self->timestamp_offset = 0;
	self->queue = NULL;
	self->fd = -1;
	self->unlockfd[0] = self->unlockfd[1] = -1;
	self->rate = 1.0;
	self->timestamp = GST_CLOCK_TIME_NONE;

	gst_base_sink_set_async_enabled(GST_BASE_SINK(self), TRUE);
        // default buffer is 4096. However for audio cd (in despit the fact that a standard
        // frame is 2048. It's just works perfect when set to 512 by audio cd
	gst_base_sink_set_blocksize(GST_BASE_SINK(self), 512);
}

How this is obtained :

Yes trial and error .

 

Fun how can I follow it with my drive. Well the blinking let .

Standard audio cd (cdrom1) has data in frames off 2048 bytes. The cd is readed frame by frame. (depending on drive possibility also an onboards drive buffer could be used but not all drives have this possibility). 

 

Each fream read out when there is no error in reading the cd gives 3 leds blink by my drive. If there is an error in reading You see 6 to 9 blinkings for  frame.

Before i setted the blocksize to 512 (instead off the default gstreamers off 4096) Each time there where more blinkings, that was where cd stopped playing.

 

With 512 it does not stop : The only thing which well happens is the mediaplayer playbar. Each time that a frame readout requires more then 3 blinks for a frame, the timings on the bar do stop for a while the upcounting <bar> downcounting.

The cd just continu playing. By the first frame where normal reading is resumed (3 blinks frame) thee counters jump to the position normal counting is resumed. You can't here anything off it. The cd stays playing just like nothing happened.


Edited by christophecvr, 16 September 2015 - 09:12.


Re: Physical CD/DVD support enigma2. #49 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 16 September 2015 - 09:54

Sorry, I'm not sure if I understand, so turning off sync in dvbaudiosink in READY to PAUSED helped?

Edit: ok now it's clear, checked in gstreamer1.0 forum ;)

 

 

It's trough that we are using raw audio  its pcm.  But in despit the fact that the audio cd is mounted as a filesystem using the cdfs-kernel-module we not really using the wav file. The audio cd is played by gstreamer using libcdio (libparanoia) depending on wich plugin is installed. Enigma2(mediaplayer) thinks it's playing track-xx.wav but servicemp3.h plays it with uri=//cdda/xx  .

I was just using wav file as example, as long as decodebin doesn't find dvbaudiosink earlier(when it has compatible non-raw caps) then creating decode chain to raw -> dvbaudiosink will always operate in sync, without suggested change.

So this could help not only for wav, but always when we deal with raw audio stream or when dvbaudiosink doens't support some non-raw caps(wma sw decoding).


Edited by mx3L, 16 September 2015 - 09:57.


Re: Physical CD/DVD support enigma2. #50 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 10:09

Three cd's played perfect now from start till end whitout any hickup (inclusif the one with a big scratch on it, and has problems when playing in modern dvd players).

 

@mx3L :

 

 

Sorry, I'm not sure if I understand, so turning off sync in dvbaudiosink in READY to PAUSED helped?

 

Yes it did. I will adapt this in :

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



Re: Physical CD/DVD support enigma2. #51 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 16 September 2015 - 10:45

Good to hear :)

 

gst_base_sink_set_blocksize function cannot have any effect, since it is used only when sink operates in pull mode, which is not.



Re: Physical CD/DVD support enigma2. #52 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 12:00

Good to hear :)

 

gst_base_sink_set_blocksize function cannot have any effect, since it is used only when sink operates in pull mode, which is not.

Indeed also there You're right,

 

I cleaned out all my trials , just used the dvbmediasink adapted with You're change. (Already set in master https://github.com/c...x-dvbmediasink)

 

And yes all audio cd's are now playing whitout any hickup (even those with a lot off greasy fingers on it or even the one with a big scratch).

 

With other words a cd in a state like the kids cd's of k3 or so are (ussually) do play perfect actually better then in a modern dvd player. :)

 

My current image (self build)

 

Latest gst-1 (but with latest hotplug-e2-helper out off master not merged in gst-1 branch yet).

gstreamer git head (from a week ago) is 1.5.9 + xx commits.

gstreamer1.0-plugins-base-cdparanoia - 1.5.9+git14552+86a1092-r0

libcdparanoia - 10.2+svnr17289-r1

libcdio++0 - 0.93-r0
libcdio16 - 0.93-r0

last two are only used by cddb. since gstreamer by me uses cdparanoia.

 

I now will also test with :

 

gstreamer1.0-plugins-ugly-libcdio (and check if it works ok whitout cd paranoia).

 

Goal reducing base needed libs. The current cddb do require libcdio. For that it needs to be installed anyway, but version 0.93 is required !! for gst-1.0

This means that cdtextinfo needs to be patched.



Re: Physical CD/DVD support enigma2. #53 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 12:28

Could some dev merge master git into gst-1 ? thanks



Re: Physical CD/DVD support enigma2. #54 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 12:46

@MiLo ,

 

Is the master-next already that far that A build try out can be done ?



Re: Physical CD/DVD support enigma2. #55 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 13:28

@DeBeeker

 

As far I understand you do have a physical dvd drive in You're dm8000.

 

Can You test on You're dm8000 with gts-1.0 image which has :

 

dvbmediasink last revision from to day  https://github.com/c...ox-dvbmediasink .

The last hotplug-e2-helper (on gst-1.0 branch the still have https://github.com/O...ug-e2-helper.bb ) rev 02e6879ffcf2a0aa9c83b355b52108f1e5f4f56c .

This must be b2e066ba9813bd11a3e643c2f11b4a1f28def2d4 .

 

On box installed :

 

gstreamer1.0-plugins-ugly-cdio
libcdio16 - 0.93-r0
cdtextinfo (patched for libcdio > 0.9)

libcddb

cdfs

enigma2 last version + optional enigma2-plugin-extensions-dvdplayer

 

Audio cd should work 100 % (it does by me now)

STANDARD VIDEO DVD almost 100 % (by some still fidelled around needed due to menu issues but it's same like by iso dvd's problems come from libdreamdvd which is still not 100 %).


Edited by christophecvr, 16 September 2015 - 13:29.


Re: Physical CD/DVD support enigma2. #56 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 16 September 2015 - 13:49

A correction of line in message above.

 

STANDARD VIDEO DVD almost 100 % (by some still fidelled around needed due to menu issues but it's same like by iso dvd's problems come from libdreamdvd which is still not 100 %)

 

Must be

 

STANDARD VIDEO DVD almost 100 % by some still fidelling around needed due to menu issues but it's same like by iso dvd's problems come from libdreamdvd or servicedvd.cpp or interaction between libdreamdv/servicedvd.cpp or interaction between libreamdvd/dvdread or all togheter. Will not be easy to find.



Re: Physical CD/DVD support enigma2. #57 Beeker

  • PLi® Contributor
  • 1,476 posts

+197
Excellent

Posted 16 September 2015 - 17:18

@DeBeeker

 

As far I understand you do have a physical dvd drive in You're dm8000.

 

Can You test on You're dm8000 with gts-1.0 image which has :

 

dvbmediasink last revision from to day  https://github.com/c...ox-dvbmediasink .

The last hotplug-e2-helper (on gst-1.0 branch the still have https://github.com/O...ug-e2-helper.bb ) rev 02e6879ffcf2a0aa9c83b355b52108f1e5f4f56c .

This must be b2e066ba9813bd11a3e643c2f11b4a1f28def2d4 .

 

On box installed :

 

gstreamer1.0-plugins-ugly-cdio
libcdio16 - 0.93-r0
cdtextinfo (patched for libcdio > 0.9)

libcddb

cdfs

enigma2 last version + optional enigma2-plugin-extensions-dvdplayer

 

Audio cd should work 100 % (it does by me now)

STANDARD VIDEO DVD almost 100 % (by some still fidelled around needed due to menu issues but it's same like by iso dvd's problems come from libdreamdvd which is still not 100 %).

 

Yes i have all. I'm testing audio CD now.


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


Re: Physical CD/DVD support enigma2. #58 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 17 September 2015 - 11:01

@Beeker,

 

does the audio cd plays ok now be you like by me ?



Re: Physical CD/DVD support enigma2. #59 Beeker

  • PLi® Contributor
  • 1,476 posts

+197
Excellent

Posted 17 September 2015 - 17:01

Tested 3 CD's. No problem. No interuption. Thanks for your work.


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


Re: Physical CD/DVD support enigma2. #60 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 17 September 2015 - 18:02

@MiLo ,

 

Is the master-next already that far that A build try out can be done ?

 

It needs some more TLC and some stuff that I'm trying to get upstreamed. A last patch to OE is pending in their master-next, guess that'll arrive in master one of these days, that'll fix the webif.

 

If you take master-next and manually pull the three OE repos to their current masters, the image should be able to build (if their kernels were fixed).


Real musicians never die - they just decompose



Also tagged with one or more of these keywords: DVD, UDF, AUDIO CD, ISO, CDIO

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users