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. #61 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 18 September 2015 - 05:27

Ok I do have a build inclusif almost all feeds(only removed one mpd) and autofs upgrade to 5.1.1. ok I well used already gstreamer-1.5.9 +(xx ) (git head from a week ago)

 

Fo vu it will be waiting on a kernel patch.



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 18 September 2015 - 09:25

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

Thank's for testing. So I'm shure . (on the dm8000 even a brandnew dvdusbwriter works).

 

The main cause is actually found by mx3L . Was caused since the audiosink was set back to sync when changing from NULL-TO-READY . Now a plugin or any whatever can't modifie this setting anymore.

(it's already implemented by my multi box sink).

 

Since the base working for audio cd's is fine now it's wort to make a couple off new code in hotplug to work whitout cdfs file system mount. That's not required (the only use we made off it is by the start service play, but it just will cause a play through gstreamer uri=cdda://xxx  . )



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 18 September 2015 - 09:28

 

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

 

Thank's will first wait on updated BSP with gcc5 patches.

 

The dm8000 full build(with feeds) is already ok. I did not test that image yet.



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 21 September 2015 - 10:12

@MiLo, @Pieterg or any person who has a idea to solve a little but ennoying issue.

 

I'm currently working to let to audiocd play whitout the use off cdfs file system.

 

Background we only need the cd contents not a mounted file system since that is not used anyway.

Playing of audiocd was always with gstreamer using libcdio and playbin uri=cdda://<track>  . The cd add random stop issue is solved thanks to mx3L who found out that the audiosink reverted back to sync.

The working process before was once cd inserted the audio cd was "mounted using cdfs" thanks to that a mediaplayer playlist was made containing the tracks as it was a file system.

If cdtextinfo plugin was installed mediaplayer started cdtextinfo when first track was launched.

cdtext info uses cddb to :

 First poll the cd and create a disc id based on the cd contents.

 Then the cd was further analyzed to check if there was more media info avbl (some audio cd created after 2007 do have that)

 If not present it would check trough internet and find if there is an entry with detailed cd contents info based on the created discid.

 If in the database on internet there was no extra info it would create cd contents playlist called :  track-1 track-2 ...

 If there was extra info it would create a playlist with detailed cd info such as cd title the tracknames.

 In mediaplayer You can see that info. The media player started playing cd with serveceplay xxxx:0:0:0:0:track-<xx>.wav.

 But the track is played by gstreamer using uri=cdda://<tracknr> And gstreamer did not give anything anymore on the filesytem since its using libcdio.

 

The goal is now playing the audiocd whitout using cdfs. cdfs is deprecated in a certain way not really used and a lot off stb's do not support (even the patched) cdfs-kernel-module anymore.

 

General objectifs here:

 - Keeping openpli ways off work, which means if a audio cd is inserted it should be found like any other audio or video media when pressing pvr button on remote command.

   be gone if cd is removed.

 - Improving (the optional) DVD-player plugin to play not only DVD but also AUDIO CD'S. With the on it coupled main menu item which shows up when a CD/DVD is inserted.

 

Way off work without cdfs.

 With the standard hotplug-e2-helper just like before we detect the add and removal off cd/dvd it uses base linux libcdrom to obtain media info using ioctl commands.

 Based on that info it will create mountpoint and mount a file system DVD/CD = udf or iso9660. Then pas this to Hotplug plugin which on it informs the Harddisk.py. and the partition is added so it is found trough pvr button.

  behind this last there is morebut that the base.

 For audio cd it will change a bit before with cdfs we went further like by udf or iso9660 but that is not possible whitout cdfs.

Intention now is for the case of an audio cd we will not mount it anymore.

Wel will we inform the Hotplug about the presence of an audiocd.

 For this operation I use another hotplug action now called audiocdadd by removing audiocdremove.

 By the Hotplug plugin self I will in case off action audiocdadd now use a new created function in Harddisk.py class Hardiskmanager addHotplugAudiocd(dev, physdevpath)

 The goal of this is just the have a fake partition added Which then if an audio cd is installed will show up by pvr button locations with the device friendly name it is still really a device (only the partition is not mounted)

 and a map where you have instead off the file later on an .py plugin which  (that's must still be made) will run cdtext info cddb obtain cd info once it's there create a playlist in mediaplayer.

 

The last step is to come : but now I'm first looking a way to solve a little issue with the first part.

 

For my test I created a map for now in /media  called AUDIOCD  in that map I just set a fake .wav file (for now) just as base test.

 

By hotplug bdpoll I changed: the audiocd case for inserted media and removed media:

static void bdpoll_notify(const char devname[])
{
	char buf[1024];
	struct stat cdrom_link;
	snprintf(buf, sizeof(buf), "/dev/%s", devname);
	// create symlink cdrom to the device needed for audio cd's  gst-1.0
	if (lstat("/dev/cdrom", &cdrom_link) != 0) {
		symlink(buf, "/dev/cdrom");
	}
	if (media_status == MEDIA_STATUS_GOT_MEDIA) {
		// audio cd not mounted hotplug-e2-helper will just be informed about it.
		if (media_type == CDS_AUDIO) {
			setenv("X_E2_MEDIA_STATUS", (media_status == MEDIA_STATUS_GOT_MEDIA) ? "1" : "0", 1);
			snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper audiocdadd /block/%s /block/%s/device 1", devname, devname);
			if (!audio_cd)
				system(buf);
			media_mounted = false;
			audio_cd = true;
		}

removing off cd/dvd

		// unmounting cd/dvd upon removal. Clear mointpoint.
		if (media_mounted || audio_cd) {
			if (audio_cd){
				setenv("X_E2_MEDIA_STATUS", "0", 1);
				snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper audiocdremove /block/%s /block/%s/device 1", devname, devname);
				system(buf);
			}
			else {
				snprintf(buf, sizeof(buf), "/bin/umount /dev/%s -l", devname);
				system(buf);
				snprintf(buf, sizeof(buf), "/media/%s", volume_name);
				unlink(buf);
				rmdir(buf);
				// Clear volume_name.
				memset(&volume_name[0], 0, sizeof(volume_name));
				setenv("X_E2_MEDIA_STATUS", "0", 1);
				// Removing device after cd/dvd is removed.
				snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper remove /block/%s /block/%s/device 1", devname, devname);
				system(buf);
			}
			media_mounted = false;
			audio_cd = false;

By harddisk.py I created a function now in calss harddiskmanager.

	def addHotplugAudiocd(self, device, physdev = None):
		# device is the device name, without /dev
		# physdev is the physical device path, which we (might) use to determine the userfriendly name
		if not physdev:
			dev, part = self.splitDeviceName(device)
			try:
				physdev = os.path.realpath('/sys/block/' + dev + '/device')[4:]
			except OSError:
				physdev = dev
				print "couldn't determine blockdev physdev for device", device
		error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(device)
		if not blacklisted and medium_found:
			description = self.getUserfriendlyDeviceName(device, physdev)
			p = Partition(mountpoint = "/media/AUDIOCD", description = description, force_mounted = True, device = device)
			self.partitions.append(p)
			if p.mountpoint: # Plugins won't expect unmounted devices
				self.on_partition_list_change("add", p)
			SystemInfo["Harddisk"] = False
		return error, blacklisted, removable, is_cdrom, partitions, medium_found

This above is just like it is now for testing. Once implemented for real the hard tagetting of my just for testing purposes created /media/AUDIOCD will become a var and the function

def addHotplugAudiocd(self, device, physdev = None, mountpoint):

The map  (that will be decided what's best later on wheater a map created in /tmp  or just a map wich containes a pyo file or ...)

The advantage when a audio cd is inserted You will find it onder pvr button as a device (which it is after all ) with under location.

the friendly device name      (fake) /mountpoint/xx   where xx will be an action upon ok which will just play the cd.

 

The current plugin.py located in /usr/lib/enigma2/python/Plugins/SystemPlugins/Hotplug

 

is adapted as :

# globals
hotplugNotifier = []
audiocd = None

def processHotplugData(self, v):
	print "hotplug:", v
	action = v.get("ACTION")
	device = v.get("DEVPATH")
	physdevpath = v.get("PHYSDEVPATH")
	media_state = v.get("X_E2_MEDIA_STATUS")
	global audiocd

	dev = device.split('/')[-1]

	if action == "add":
		error, blacklisted, removable, is_cdrom, partitions, medium_found = harddiskmanager.addHotplugPartition(dev, physdevpath)
		print "Partition add parameters", error, blacklisted, removable, is_cdrom, partitions, medium_found
	elif action == "remove":
		harddiskmanager.removeHotplugPartition(dev)
	elif action == "audiocdadd":
# If not audiocd is a hack since hotplug keeps on trying a couple of times to reconnect
		if not audiocd:
			error, blacklisted, removable, is_cdrom, partitions, medium_found = harddiskmanager.addHotplugAudiocd(dev, physdevpath)
			print "audio cd parameters", error, blacklisted, removable, is_cdrom, partitions, medium_found
			audiocd = True
		else:
			print "AUDIOCD ALREADY ADDED"
	elif action == "audiocdremove":
		if audiocd:
			harddiskmanager.removeHotplugPartition(dev)
			audiocd = None
			print "REMOVING AUDIOCD"
		else:
			print "AUDIOCD ALREADY REMOVED"
	elif media_state is not None:
		if media_state == '1':
			harddiskmanager.removeHotplugPartition(dev)
			harddiskmanager.addHotplugPartition(dev, physdevpath)
		elif media_state == '0':
			harddiskmanager.removeHotplugPartition(dev)


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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 21 September 2015 - 10:21

Sorry continuation off previous message :

 

But my current problem is:

 

Enigma log insertion off audio cd :

HOTPLUG connection!
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
mountpoint /media/AUDIOCD
description CDDVDW SH-224DB
force_mounted True
scanning ('CDDVDW SH-224DB', '/media/AUDIOCD', <__main__.Session instance at 0x1d07378>)
scanner: [<Scanner Ipkg>, <Scanner Movie>, <Scanner Video CD>, <Scanner Music>, <Scanner Audio-CD>, <Scanner DVD>, <Scanner Pictures>]
audio cd parameters False False True True [] True
HOTPLUG connection!
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection!
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY ADDED
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY ADDED
HOTPLUG connection!
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY ADDED
HOTPLUG connection!
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY ADDED

And so what between 10 to 20 times.

 

By removal same issue :

HOTPLUG connection!
hotplug: ACTION=audiocdremove
complete ACTION=audiocdremove
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdremove', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
REMOVING AUDIOCD
HOTPLUG connection!
hotplug: ACTION=audiocdremove
complete ACTION=audiocdremove
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdremove', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY REMOVED
HOTPLUG connection!
hotplug: ACTION=audiocdremove
complete ACTION=audiocdremove
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdremove', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
AUDIOCD ALREADY REMOVED

While for an DVD (using udf it works fine)

HOTPLUG connection!
hotplug: ACTION=add
complete ACTION=add
HOTPLUG connection lost!
hotplug: {'ACTION': 'add', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}
mountpoint /media/HARRY_POTTER_PHILOSOPHERS_STON
description CDDVDW SH-224DB
force_mounted True
scanning ('CDDVDW SH-224DB', '/media/HARRY_POTTER_PHILOSOPHERS_STON', <__main__.Session instance at 0x1d07378>)
scanner: [<Scanner Ipkg>, <Scanner Movie>, <Scanner Video CD>, <Scanner Music>, <Scanner Audio-CD>, <Scanner DVD>, <Scanner Pictures>]
Partition add parameters False False True True [] True
action ->  WizardActions back
execute None
HOTPLUG connection!
hotplug: ACTION=remove
complete ACTION=remove
HOTPLUG connection lost!
hotplug: {'ACTION': 'remove', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/block/sr0'}

Any idea how I could stop the hotplug to continu polling and always restarting after audiocd detected ?



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 27 September 2015 - 16:17

@MiLo, @Pieterg

 

I finally found the reason of the issue why it did not worked out fine using hotplug with an action for not mounted media cd such as will be audiocd.

For that I needed to dug really deep into core.  And was for more then a couple off weeks searching complete off track.

 

What actually was happening.

 

bdpoll is started by mdev  mdev.conf rule :

#was :
sr0     	 0:0 	664		*/usr/bin/bdpoll sr0 -c
#will be changed in : (no hard targetting anymore goal using usb drives)
sr[0-9]     	 0:0 	664		*/usr/bin/bdpoll $MDEV -c

I already put the future needed change in order to be ok for external usb dvd writers. When You unplug them and replug the sr0 will be gone and it becomes sr1 and ...

 

But what happened which triggered the increasing amount off hotplug actions was the mdev cause the audio cd is not mounted it just creates a new session over and over.

 

Ok now solve it well .... not that easy. First creating a mem location based on the device (sr0 .. sr<x>) no not possible since it wil always restart bdpoll and this creation would be with same parameters and anyway reset the ventual previous storage off var's.

 

Ok the yes use off tmp file quit optimum in this specific situation. But o again new tricky problem.  bdpoll is started during boot time if the sr<x> device is present. Well at start time the tmp is not avbl yet cause :

 

/var/volatile/tmp  is not there yet .... This means using /tmp  to store the actiff sr<x> device only result in crash off bdpoll at start and it wil not work.

 

Wel I found a solution and instead off store the tmp which must be removed at reboot in yes /media  Then it works. And is removed if box is rebooted.

 

The code to make bdpoll ok for changing sr number is :

 

First I removed the not needed main which just returned bdpoll(xxxxx)  But changed bdpoll function which created and launched the demon as main() function.

int main(int argc, char *argv[], char *envp[])
{
	const char *devname = NULL, *option = NULL;
	char devnode[1024];
	bool is_cdrom = false;
	bool support_media_changed = false;
	int opt;
	devname = argv[1];
	option = argv[2];
	FILE *f;
	/**** A little hakish, but we are using mdev.conf to start the bdpoll.
		It makes no sence to start a bdpoll session for a non existent device.
		For extern usb dvd/cd readers/writers the device is only present after its plugged in.
        The use off mdev is therefore the best solution.
		Check if there was already an aktif bdpoll for the device.
		If so return ok, then mdev will not create a new useless poll.
	**/
	bool ret = false;
	char buffer[33] = {0};
	f = fopen("/media/bdpoll-aktif-device.txt", "r");
	if (f)
	{
		fread(buffer, sizeof(buffer), 1, f);
		fclose(f);
	}
	if(buffer)
		ret = !strcmp(buffer, devname);
	if(ret)
		return 0;
	else {
		f = fopen("/media/bdpoll-aktif-device.txt", "w");
		if(f) {
			fprintf(f,"%s", devname);
			fclose(f);
		}
	}
	/***/
	f = fopen("/media/bdpoll-started.txt", "a+");
	if (f) {
		fprintf(f,"started argc = %d argv1 = %s argv2 = %s\n", argc, devname, option);
		fclose(f);
	}
	while ((opt = getopt(argc, argv, "cm")) != -1) {
		switch (opt) {
		case 'c':
			is_cdrom = true;
			break;
		case 'm':
			support_media_changed = true;
			break;
		default:
			usage(argv[0]);
			return EXIT_FAILURE;
		}
	}

	if (optind > argc) {
		usage(argv[0]);
		return EXIT_FAILURE;
	}

	devname = argv[optind];
	snprintf(devnode, sizeof(devnode), "/dev/%s", devname);

	daemon(0, 0);

	for (;;) {
		if (poll_for_media(devnode, is_cdrom, support_media_changed))
			bdpoll_notify(devname);
		sleep(interval_in_seconds);
	}

	return EXIT_SUCCESS;
}

Note the extra f = fopen("/media/bdpoll-started.txt", "a+"); is just there to check the working since there is no log avbl. But will anyway be remove if a final patch is made.

 

Now the hotplug works perfect for the use off sr<x> device even if the device is not mounted. the tries off mdev are blocked.

 

And yes we have the final working for uadio cd still not finished yet but the base is then set

HOTPLUG connection!
hotplug: ACTION=audiocdadd
complete ACTION=audiocdadd
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdadd', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/dev/sr0'}
HOTPLUG connection!
hotplug: ACTION=audiocdremove
complete ACTION=audiocdremove
HOTPLUG connection lost!
hotplug: {'ACTION': 'audiocdremove', 'PHYSDEVPATH': '/block/sr0/device', 'DEVPATH': '/dev/sr0'}

So after the audiocdadd a new python plugin(still working on that) will be started, which reads the tracks using libcdio and more detailed info using cdtextinfo. Then create playlist.pls for mediaplayer and launch the palyer with that list.

After action audiocdremove the mediaplayer will be killed iff running the playlist will be blanked out.

 

The effectif cd playing will be done trough gstreamer (it was even before like that) based on the playlist.

 

Any remarks on the code above ? a better solution ?



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 27 September 2015 - 16:28

Note in the bdpoll the section for audio cd will be changed in :

static void bdpoll_notify(const char devname[])
{
	char buf[1024];
	struct stat cdrom_link;
	snprintf(buf, sizeof(buf), "/dev/%s", devname);
	// create symlink cdrom to the device needed for audio cd's  gst-1.0
	if (lstat("/dev/cdrom", &cdrom_link) != 0) {
		symlink(buf, "/dev/cdrom");
	}
	// recreate symlink to the actif device
	else {
		unlink("/dev/cdrom");
		symlink(buf, "/dev/cdrom");
	}
	if (media_status == MEDIA_STATUS_GOT_MEDIA) {
		if (media_type == CDS_AUDIO) {
			setenv("X_E2_MEDIA_STATUS", (media_status == MEDIA_STATUS_GOT_MEDIA) ? "1" : "0", 1);
			snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper audiocdadd /dev/%s /block/%s/device 1", devname, devname);
			system(buf);
			media_mounted = false;
			audio_cd = true;
		}

The action taken when cd is removed.

	else {
		// unmounting cd/dvd upon removal. Clear mointpoint.
		if (media_mounted || audio_cd)
		{
			if (audio_cd)
			{
				snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper audiocdremove /dev/%s /block/%s/device 1", devname, devname);
				system(buf);
				audio_cd = false;
			}
			else
			{
				snprintf(buf, sizeof(buf), "/bin/umount /dev/%s -l", devname);
				system(buf);
				snprintf(buf, sizeof(buf), "/media/%s", volume_name);
				unlink(buf);
				rmdir(buf);
				// Clear volume_name.
				memset(&volume_name[0], 0, sizeof(volume_name));
				setenv("X_E2_MEDIA_STATUS", "0", 1);
				// Removing device after cd/dvd is removed.
				snprintf(buf, sizeof(buf), "/usr/bin/hotplug_e2_helper remove /block/%s /block/%s/device 1", devname, devname);
				system(buf);
				media_mounted = false;
			}
		}

With that the bdpoll is ready to thread the non mounted devices.



Re: Physical CD/DVD support enigma2. #68 Dimitrij

  • PLi® Core member
  • 10,329 posts

+350
Excellent

Posted 28 September 2015 - 08:05

christophecvr

There are still some problems with the DVD/plugin DVD Backup/plugin DVD Burn?

 

I want to work on the code, if I can buy a USB DVD.


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 28 September 2015 - 17:51

Well currently bussy for audiocd support without the deprecated cdfs file system which does not work anymore on many boxes.. But the current DVDplayer plugin is ok for udf types dvd's(or cd's). As is enigma2.

 

There is well still a small issue in the Mediascanner and scanner. There still some hard targetting present.

 

The other plugins needs to be adapted, burn backup and ...

 

Here just already two test patches.

One is for enigma2 service.cpp to adapt the playinf off filenames track-<xx>.cda with uri=cdda://<xx> .

The other is handle off audio cd's in bdpoll. Now when audio cd's are detected it will check the number off tracks using ioctl commands.

Create a e2 playlist (For this test version I just modifie the main madiaplayer playlist located in /etc/enigma2  called playlist.e2pls.

Its normal that later on we will create another playlist called cdplaylist.e2pls and then with a new extra plugin called for example AudiocdPlayer .

Wich will be started out off Hotplug up on action audiocdadd. and ...

 

But those who want to experiment can already use these two patches. and After you insert an audio cd wait a bit give it the time that the cdrom drive is ready.

Then launch manually mediaplayer and you will find the tracklist off cd. Detailed info and auto starts will be done with the new plugin.

 

 

 

Attached Files



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 28 September 2015 - 18:52

@MiLo

 

refering to comments in :

 

http://patchwork.ope...rg/patch/84471/

Automatic mounting for a particular device can be disabled by
creating a file "/dev/<device>.nomount". This is helpful in
scripts that create partitions for example, and want to perform
specific actions which require the device to remain unmounted.

Where to create that file ? Perhaps it could be a better solution then the

	/**** A little hakish, but we are using mdev.conf to start the bdpoll.
		It makes no sence to start a bdpoll session for a non existent device.
		For extern usb dvd/cd readers/writers the device is only present after its plugged in.
        The use off mdev is therefore the best solution.
		Check if there was already an aktif bdpoll for the device.
		If so return ok, then mdev will not create a new useless poll.
	**/
xxxx

I have to make in bdpoll . For cdrom there may not be an automount try . But now mdev does try it in case off an audio cd which is not mounted. And automounting is not requird att all since the bdpoll takes care of that.



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 29 September 2015 - 07:04

@MiLo

 

I now just found the reason why tremendous amounts off bdpoll session where started. (and so causing mem leak and the same amonts off hotplug retries case used but not mounted media)

 

It was in mdev.conf.

 

Was set :

sr0     	 0:0 	664		*/usr/bin/bdpoll sr0 -c

Using the */ does cause each time a cd/or dvd is inserted and removed a whole bunch off bdpoll sessions for the very same device sr0.

First up on detection off new sr0 device bdpoll should be started for that device. But not restarted over and over up on removal off media, or during the phase that the reader is polling the cd, by each poll it will trigger a new bdpoll start.

That's cause by : (see busybox manual mdev.conf)

The special characters have the meaning:
	@ Run after creating the device.
	$ Run before removing the device.
	* Run both after creating and before removing the device.

The * will trigger before removing device during the polling phase off the cd/dvd the more time it takes the more consecutif bdpoll sessions where started.

 

By just replacing the * with @ problem solved and the hack I made in bdpoll is not required anymore :)

 

Since actually on a stb it also works with extrenal usb dvd/cd reader writers an extra change must be made :

The hard targetting to sr0.

 

The line must become :

sr[0-9]     	 0:0 	664		@/usr/bin/bdpoll $MDEV -c


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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 September 2015 - 18:07

Here the needed patches for audio cd playing without the deprecated cdfs kernel modules.

 

This msg includes two patches :

 - hotplug-e2-helper patch

 - enigma2 patch for : servicemp3,Hotplug.plugin.py and MediaPlayer.plugin.py

 

What is changed ?

If now a audiocd is inserted after the cd is detected a pls list called cdplaylist.pls is made in map /media/

This play list does contain the tracks on the cd. They are called:

 /media/track-<xx>.cda , why the /media/  is added to track ? well some functions in mediaplayer do contain a tricky check path-1

anyway the path info is not used for audio cd's .

 

Currenty working.

After a cd is inserted and the audiocd is detected playlist made, a main menu item is made . Just press ok on this menu item and You audio cd will play.

 

Use :

Just leave you're box where it was , i mean normally playing a channel.

insert you're audio cd and wait a bit until the dvd-cd-reader/writer has detected the media. Then press menu on remote and You will see on top new item play music cd (in you're own language)

press ok , ... a sandkeeper(normal) during the cd data polling phase and it starts playing . :)

 

The only point which i could not add yet is the autoplay popup :(

Would be nice if a enigma2 python expert gives a hint to achieve that without using scanner since its not a mounted filesystem. I have tried a lot but not able to get that fixed :angry:

 

The use off all . I personally only tested gst-1.0 image with gst-1.6 version.

 

First to, play audio cd's in enigma2 gst-1.0 must be done:

Update libcidio to last version 0.9.3 . then also required patch off cd info.

All these issues where already posted by Beeker long time ago , He provided the needed patches and files. Why they are still not adapted ???? I dont't ....

 

Then the mdev.conf A very severe bug even blocker has always been present since long time. For cd/dvd media insertion into the drive there where always a lot off extra bdpoll sessions started.

If You for example inserted a video dvd for the first time you could count on about 10 session. By removing the dvd again 10 sessions. The second time you insert the dvd it was 20 sessions and ...

so increasing. After +- 10 dvd inserts removal the box would completely block , only hardreset avbl. But after only 5 times already more then 60 % off memory would have been blocked permanately and so not avbl to use.

So what xxx bdpolls would run continuously and  take away processor capacity .....

Solution see :

http://forums.openpl...ndpost&p=507169

 

@MiLo

This last is you're sector Why still not adapted ??? It's a very very severe bug.

 

@Beeker would be nice if you try these patches.

(note after enigma2 is rebuild , the opkg install enigma2 --force-reinstall  is not enough , also do :

opkg install enigma2-plugin-extensions-mediaplayer --force-reinstall
opkg enigma2-plugin-systemplugins-hotplug --force-reinstall

 

 

 

 

 

Attached Files



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

  • PLi® Contributor
  • 1,604 posts

+203
Excellent

Posted 30 September 2015 - 19:04

All done. cdfs and kernel-module-cdfs removed from box and reboot.

 

Ok no cdtextinfo and tracklist is not refreshing, when playing a CD, mediaplayer using the tracklist of a previous CD..some strange behaviour.

 

But it is a big start to get rid of cdfs.

 

BTW. libcdio 0.93 is now in meta-openembedded.

 

http://cgit.openembe...b363d16184a7306

 

So when openpli-dev's  udate to latest openembedded-core, bitbake and meta-openembedded  libcdio 0.93 will be present at default.


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. #74 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 September 2015 - 19:13

All done. cdfs and kernel-module-cdfs removed from box and reboot.

 

Ok no cdtextinfo and tracklist is not refreshing, when playing a CD, mediaplayer using the tracklist of a previous CD..some strange behaviour.

 

But it is a big start to get rid of cdfs.

 

BTW. libcdio 0.93 is now in meta-openembedded.

 

http://cgit.openembe...b363d16184a7306

 

So when openpli-dev's  udate to latest openembedded-core, bitbake and meta-openembedded  libcdio 0.93 will be present at default.

Thank's for reporting.

 

But : Ok no cdtextinfo and tracklist is not refreshing, when playing a CD, mediaplayer using the tracklist of a previous CD..some strange behaviour

Is not so anymore. Well first do ful enigma2 rebuild reinstall it but if You do not flash box also reinstall the plugins like I mentionned. Do not forget to adapt mdev.conf (extremely important)

 

The only missing issue now is the auto pop up which before was present and the only good thing. But for that I really hope that some more python wan' give some hints to have a pop up whitout using Scanner.



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

  • PLi® Contributor
  • 1,604 posts

+203
Excellent

Posted 30 September 2015 - 20:10

Since changing mdev.conf, i have only internal flash..No cdrom or HDD..Even when i restore mdev.conf to original.????

 

Perhaps a refresh?

 

Need some time to repare my box.


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. #76 Beeker

  • PLi® Contributor
  • 1,604 posts

+203
Excellent

Posted 30 September 2015 - 20:31

cdfs and kernel-module-cdfs removed out of the build-environment and flash the box.

 

All ok now. :)

 

Only, just as you said, no autoplay.


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. #77 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 September 2015 - 20:43

Since changing mdev.conf, i have only internal flash..No cdrom or HDD..Even when i restore mdev.conf to original.????

 

Perhaps a refresh?

 

Need some time to repare my box.

Yes the mdev.conf  is a bit off problem, You need to do this and really reboot the box. And anothet issue about it, You can not change the mdev.cof followed by a hard shutdown by just cutting the power off by restart the mdev.conf will be empty if you do that.

So after updating the mdev.conf  reboot t the box with restart option (not the enigma2 restar but restart option).

 

But the mdev.conf is the region of MiLo and pieterg. Unfortunately Both off these Royal dev's do not react on the msg that there is a very severe bug due to wrong use off mdev.conf(actually it's what we can call a blocker)



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

  • PLi® Contributor
  • 1,604 posts

+203
Excellent

Posted 30 September 2015 - 20:54

One CD found that does not play, whatever i try. Just data, folders named common and pictures but no audio tracks(iso9660 ?).

 

And sometimes a GSOD. Skin attribute problem.

 

I can not find a logfile, only epg.dat.

 

But after a restart of enigma2, it is playing well.


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. #79 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 September 2015 - 21:25

One CD found that does not play, whatever i try. Just data, folders named common and pictures but no audio tracks(iso9660 ?).

 

And sometimes a GSOD. Skin attribute problem.

 

I can not find a logfile, only epg.dat.

 

But after a restart of enigma2, it is playing well.

I tried so what 10 cd's never any problem.But perhaps some cd's may give problems, but then i a search must be done for why that cd is not playing well



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

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 2 October 2015 - 10:10

@Beeker,

 

Yes if you had an audio cd wich was made with is09660 format it's just a normal data cd. Then it's mounted using iso9660 and the files on it are just a normal playlist. like it was an usb stick or hdd.

Libcdio is not used in that case. Gues that's the problem with some off (self made cd's).

 

Here an improved patch.

 

At this time there is no autoplay forseen for those cd's. But you will find that type off cd's under mediaplayer device ans the mointpoint(that type of cd is mounted) with the filelist. Mointpoint can be untitled disc or the vume lable of data cd or /media/sr<x>

 

Here well a modified servicemp3.cpp patch  as before it could try to play that type off cd like cdda://<xx> but that will never work out by that kind off cd, they are not in audio format.

 

p.s. For the rest still try to find solution for auto popup but in the next patches for enigma2 the old cdfs support will be completely dropped. The servicemp3.cpp is all ready made for none cdfs support

Attached Files


Edited by christophecvr, 2 October 2015 - 10:12.




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

8 user(s) are reading this topic

0 members, 8 guests, 0 anonymous users