Physical CD/DVD support enigma2.
Re: Physical CD/DVD support enigma2. #21
Posted 31 August 2015 - 13:56
There's also a "dvdfs" in the repo, it mounts video DVDs using libdvdread, resulting in the crypto disappearing, so you can just play or copy it like an unprotected DVD. Never looked further into it.
Re: Physical CD/DVD support enigma2. #22
Posted 31 August 2015 - 14:25
Yeah, to properly mount a DVD you have to try "ufs" first as filesystem, otherwise it got recognized as something else. I think there's something like that in the bdpoll program, which I added in the old dm8000 days.
There's also a "dvdfs" in the repo, it mounts video DVDs using libdvdread, resulting in the crypto disappearing, so you can just play or copy it like an unprotected DVD. Never looked further into it.
Yes I well now that it work's when we first try whit udf , I was just experimenting with auto since with patch we first check on media type first .
It's just that it would be nicer in bdpoll for example if a pure data dvd or cd is inserted which then must be mounted with iso9660 option It's not first the udf and up on error the is9660. But I think it will be better to do it like that, after all the auto tool does the same.
For enigma2 python experts. If we mount the dvd to his volume label the pop play dvd does not work. But menu item wich appear in main menu play dvd does well work. Concerned rules are those I guess.
Plugin DVDplayer parts from the pupop does not work if dvd mounted on volume label.
def filescan_open(list, session, **kwargs): from Screens import DVD if len(list) == 1 and list[0].mimetype == "video/x-dvd": splitted = list[0].path.split('/') if len(splitted) > 2: if splitted[1] == 'media' and (splitted[2].startswith('sr') or splitted[2] == 'dvd'): session.open(DVD.DVDPlayer, dvd_device="/dev/%s" %(splitted[2])) return else: dvd_filelist = [] for x in list: if x.mimetype == "video/x-dvd-iso": dvd_filelist.append(x.path) if x.mimetype == "video/x-dvd": dvd_filelist.append(x.path.rsplit('/',1)[0]) session.open(DVD.DVDPlayer, dvd_filelist=dvd_filelist) def filescan(**kwargs): from Components.Scanner import Scanner, ScanPath # Overwrite checkFile to only detect local class LocalScanner(Scanner): def checkFile(self, file): return fileExists(file.path) return [ LocalScanner(mimetypes = ["video/x-dvd","video/x-dvd-iso"], paths_to_scan = [ ScanPath(path = "video_ts", with_subdirs = False), ScanPath(path = "VIDEO_TS", with_subdirs = False), ScanPath(path = "", with_subdirs = False), ], name = "DVD", description = _("Play DVD"), openfnc = filescan_open, )]
Part which work DVD-player main menu item
def menu(menuid, **kwargs): if menuid == "mainmenu": global detected_DVD if detected_DVD is None: cd = harddiskmanager.getCD() if cd and os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "VIDEO_TS")): detected_DVD = True else: detected_DVD = False if onPartitionChange not in harddiskmanager.on_partition_list_change: harddiskmanager.on_partition_list_change.append(onPartitionChange) if detected_DVD: return [(_("DVD player"), play, "dvd_player", 46)] return []
Re: Physical CD/DVD support enigma2. #23
Posted 1 September 2015 - 15:12
About cd support on vuduo2 where cdfs does not work.
What does well work is not trying to mount the cd (I disabled the mounting off audio cd in bdpoll.)
If I then just telnet the box do init 4
And :
root@vuduo2:~# gst-launch-1.0 playbin --gst-debug=dvbaudiosink:4,dvbvideosink:4 uri=CDDA://1 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... 0:00:10.668884957 1842 0x4f5600 INFO dvbaudiosink gstdvbaudiosink.c:1417:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_NULL_TO_READY WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink: No volume control found Additional debug info: /home/christophe/openpli40-gst1/openpli-oe-core/build/tmp/work/mips32el-oe-linux/gstreamer1.0-plugins-base/1.5.1-r0/gst-plugins-base-1.5.1/gst/playback/gstplaysink.c(2875): gen_audio_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink: Volume/mute is not available 0:00:10.745665290 1842 0x4f5600 INFO dvbaudiosink gstdvbaudiosink.c:1422:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_READY_TO_PAUSED 0:00:10.759491290 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT stream-start 0:00:10.781419142 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT caps 0:00:10.782192957 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:654:gst_dvbaudiosink_set_caps:<audiosink-actual-sink-dvbaudio> MIMETYPE audio/x-raw 0:00:10.782318735 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:664:gst_dvbaudiosink_set_caps:<audiosink-actual-sink-dvbaudio> setting dvb mode 0x30 0:00:10.797801624 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT toc 0:00:10.798031735 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798163105 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798265661 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798419438 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798527846 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798619179 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798708883 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798799216 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.798886809 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799014327 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799120883 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799212550 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799302290 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799498624 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799597105 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799689475 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:844:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> Toc entry_type track 0:00:10.799780587 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:861:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> TOC scope=1 0:00:10.800379364 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT tag 0:00:10.800594698 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:830:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> TAG taglist, discid=(string)d010bf10, discid-full=(string)"d010bf10\ 16\ 150\ 20032\ 41577\ 57122\ 76407\ 100267\ 121507\ 142897\ 156612\ 173035\ 192350\ 209310\ 226087\ 250705\ 265040\ 281427\ 4287", musicbrainz-discid=(string)afnUdqO2Vn7AZhQKqi9s62I3_PE-, musicbrainz-discid-full=(string)"01\ 10\ 0004E8A4\ 00000096\ 00004E40\ 0000A269\ 0000DF22\ 00012A77\ 000187AB\ 0001DAA3\ 00022E31\ 000263C4\ 0002A3EB\ 0002EF5E\ 0003319E\ 00037327\ 0003D351\ 00040B50\ 00044B53", track-count=(uint)16, track-number=(uint)1, duration=(guint64)265093333333; 0:00:11.087084623 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT segment 0:00:11.087263623 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:785:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> GST_EVENT_SEGMENT rate=1.000000 format=3 start=0 position=0 0:00:11.087689475 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:786:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> SEGMENT DVB TIMESTAMP=0 HEX=0x0 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... 0:00:11.102802290 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:1433:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_PAUSED_TO_PLAYING New clock: GstSystemClock 0:04:36.180407280 1842 0x769025b0 INFO dvbaudiosink gstdvbaudiosink.c:686:gst_dvbaudiosink_event:<audiosink-actual-sink-dvbaudio> EVENT eos Got EOS from element "playbin0". Execution ended after 0:04:31.082584765 Setting pipeline to PAUSED ... 0:04:42.190862536 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:1455:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_PLAYING_TO_PAUSED Setting pipeline to READY ... 0:04:42.195236758 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:1468:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_PAUSED_TO_READY 0:04:42.232374351 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:1471:gst_dvbaudiosink_change_state:<audiosink-actual-sink-dvbaudio> GST_STATE_CHANGE_READY_TO_NULL Setting pipeline to NULL ... 0:04:42.288308943 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:277:gst_dvbaudiosink_dispose: GstDVBAudioSink DISPOSED 0:04:42.288666388 1842 0x50f900 INFO dvbaudiosink gstdvbaudiosink.c:283:gst_dvbaudiosink_reset: GstDVBAudioSink RESET Freeing pipeline ... root@vuduo2:~#
The track played perfect.
So we will have to make a tracklist with mediaplayer whitout the cdfs mount.
Edited by christophecvr, 1 September 2015 - 15:13.
Re: Physical CD/DVD support enigma2. #24
Posted 1 September 2015 - 17:29
I'm all in favor of moving into the 21st century with the CD playback code. I guess this is what desktops have been using all along?
Re: Physical CD/DVD support enigma2. #25
Posted 2 September 2015 - 00:31
If I understand correctly, what you propose is to get rid of the obsolete "cdfs" driver, and use gstreamer to play audio CDs?
I'm all in favor of moving into the 21st century with the CD playback code. I guess this is what desktops have been using all along?
Yes That's what the desktops in linux do. But even before we always needed gstreamer to play wav files trough pcm.
I'm well searching how it can be done in media player. To retrieve the tracks list using libcdio. The base detection is done in bdpoll whit ioctl .
case CDS_DISC_OK: /* some CD-ROMs report CDS_DISK_OK even with an open * tray; if media check has the same value two times in * a row then this seems to be the case and we must not * report that there is a media in it. */ if (support_media_changed) { if (ioctl(fd, CDROM_MEDIA_CHANGED, CDSL_CURRENT) && ioctl(fd, CDROM_MEDIA_CHANGED, CDSL_CURRENT)) { printf("Tray open"); media_type = 0; ioctl(fd, CDROM_LOCKDOOR, 0); } } else { got_media = true; media_type = ioctl(fd, CDROM_DISC_STATUS , CDSL_CURRENT); /* * this is a bit of a hack; because we mount the cdrom, the eject button * would not work, so we would never detect 'medium removed', and * never umount the cdrom. * So we unlock the door */ ioctl(fd, CDROM_LOCKDOOR, 0); } break;
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) { if (media_type == CDS_AUDIO) { snprintf(volume_name,sizeof(volume_name), "%s", devname); snprintf(buf, sizeof(buf), "/media/%s", volume_name); /* instead of mounting the cds with cdfs adding a procedure to retreive tracklist */ //mkdir(buf, 0777); //snprintf(buf, sizeof(buf), "/bin/mount -t cdfs /dev/%s /media/%s", devname, volume_name); //system(buf); } // CD/DVD will be mounted to his volume_label if avbl else to devicename else if (media_type >= CDS_DATA_1) { int seek =32808; int len = 32; char * out_buff = NULL; out_buff = malloc( (sizeof (out_buff)) * (len+1)); snprintf(buf, sizeof(buf), "/dev/%s", devname); if ( media_read_data ( buf, seek, len, out_buff) != -1) { if (!strncmp(out_buff, "NO NAME", 7) || !strncmp (out_buff, " ",1)) { snprintf(volume_name, sizeof(volume_name), "UNTITLED-DISC"); } else { // remove white spaces. char *trimmed_buff = NULL; trimmed_buff = trimwhitespace(out_buff); snprintf(volume_name, sizeof(volume_name), "%s", trimmed_buff); } } else { snprintf(volume_name, sizeof(volume_name), "%s", devname); } free(out_buff); out_buff = NULL; snprintf(buf, sizeof(buf),"/media/%s", volume_name); mkdir(buf, 0777); snprintf(buf, sizeof(buf), "/bin/mount -t udf /dev/%s /media/%s", devname, volume_name); printf("Mounting device /dev/%s to /media/%s", devname, volume_name); if (system(buf) != 0) { // udf fails, try iso9660 snprintf(buf, sizeof(buf), "/bin/mount -t iso9660 /dev/%s /media/%s", devname, volume_name); if(system(buf) != 0) { // iso9660 fails try auto does it make sense ? snprintf(buf, sizeof(buf), "/bin/mount /dev/%s /media/%s", devname, volume_name); if(system(buf) != 0) { printf("Unable to mount disc\n"); } } } } else { // unsuported media printf("Unable to mount disc\n"); } } 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)); } snprintf(buf, sizeof(buf), "/block/%s", devname); setenv("DEVPATH", buf, 1); snprintf(buf, sizeof(buf), "/block/%s/device", devname); setenv("PHYSDEVPATH", buf, 1); setenv("X_E2_MEDIA_STATUS", (media_status == MEDIA_STATUS_GOT_MEDIA) ? "1" : "0", 1); system("/usr/bin/hotplug_e2_helper"); }
Re: Physical CD/DVD support enigma2. #26
Posted 2 September 2015 - 06:51
@Milo,
I well have a question about the code rules :
snprintf(buf, sizeof(buf), "/block/%s", devname); setenv("DEVPATH", buf, 1); snprintf(buf, sizeof(buf), "/block/%s/device", devname); setenv("PHYSDEVPATH", buf, 1); setenv("X_E2_MEDIA_STATUS", (media_status == MEDIA_STATUS_GOT_MEDIA) ? "1" : "0", 1); system("/usr/bin/hotplug_e2_helper");
The /block/%s and /block/%s/device do not exist. Should it not be /sys/block/%s and /sys/block/%s/device ?
setenv("X_E2_MEDIA_STATUS", (media_status == MEDIA_STATUS_GOT_MEDIA) ? "1" : "0", 1); This will issue 0 if media in and status ok gues it's the goal ?
Re: Physical CD/DVD support enigma2. #27
Re: Physical CD/DVD support enigma2. #28
Posted 3 September 2015 - 08:30
I still have another question, Any idea which python module does create the location which can be retrieved trough pvr button after a dvd is inserted ?
If I 1 :
Remove the enigma2-plugin-extensions-dvdplayer (by default not installed)
Insert a dvd (mountpoint I use is not important)
an error will be issued no media found on device.
It will well create the device location :
SDRW-08D2S-U /media/<mountpoint> (wheater I adapted the bdpoll to use like before /media/sr0 or /media/<dvd-volume-name> same behaviour>
So with pvr button Navigate to the made location got to VIDEO-TS map press ok and dvd runs.
That's ok like that.
But now I stop the dvd. Then remove the dvd it is unmounted that's ok before they used only unlink the the location map the /media/sr0 remained in empty.
If You then went with pvr button the location SDRW-08D2S-U /media/sr0 was still present. Pressing ok on it popped up the play screen with bar and sometimes completely locked the stb (power reboot needed) sometimes using exit could stop it.
By my adaptation to bdpoll to remove the mountpoint after dvd is removed. The location :
SDRW-08D2S-U /media/sr0 still remains in, but at least by pressing on it it will just say map not found and that's it no stb freeze anymore.
Sorry for the long explanation , but any idea how after dvd removal I also could remove the location SDRW-08D2S-U /media/sr0 That would be nicer.
Edited by christophecvr, 3 September 2015 - 08:31.
Re: Physical CD/DVD support enigma2. #29
Posted 3 September 2015 - 12:19
"Harddisk.py" handles all media insertion/removal events (horrible piece of code, but had to maintain backward compatibility). Maybe it did not get a "remove" message for the device?
The "SDRW-08D2S-U" string is the "description" that Harddisk.py found for the device.
Re: Physical CD/DVD support enigma2. #30
Posted 3 September 2015 - 14:15
"Harddisk.py" handles all media insertion/removal events (horrible piece of code, but had to maintain backward compatibility). Maybe it did not get a "remove" message for the device?
The "SDRW-08D2S-U" string is the "description" that Harddisk.py found for the device.
This sounds very plausible. I well could trigger a media removed message from out off bdpoll. But as for how to pass it to Harddisk.py so that it does remove the location SDRW-08D2S-U /media/<mountpoint> sorry i really do not know that.
In the mean time I also start some works on the enigma2-plugin-extensions-dvdplayer , it is not installed by default, however if you install a dvdwriter or dvdrom reader alone (which can't be bought any more in retail shops).
It's a recommended to install that plug-in .
1) When You insert dvd once dvd is detected partition mounted it will pop up Play dvd. Very nice.
2) A menu item Dvd player will be created in main menu.
The first work I did is being rid off the ugly +- hard target code :
def filescan_open(list, session, **kwargs): from Screens import DVD if len(list) == 1 and list[0].mimetype == "video/x-dvd": splitted = list[0].path.split('/') if len(splitted) > 2: if splitted[1] == 'media' and (splitted[2].startswith('sr') or splitted[2] == 'dvd'): session.open(DVD.DVDPlayer, dvd_device="/dev/%s" %(splitted[2])) return else: dvd_filelist = [] for x in list: if x.mimetype == "video/x-dvd-iso": dvd_filelist.append(x.path) if x.mimetype == "video/x-dvd": dvd_filelist.append(x.path.rsplit('/',1)[0]) session.open(DVD.DVDPlayer, dvd_filelist=dvd_filelist)
and replaced it by :
def filescan_open(list, session, **kwargs): from Screens import DVD if len(list) == 1 and list[0].mimetype == "video/x-dvd": cd = harddiskmanager.getCD() if cd and (os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "VIDEO_TS")) or os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "video_ts"))): print "[DVDplayer] found device /dev/%s", " mount path ", harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()) session.open(DVD.DVDPlayer, dvd_device="/dev/%s" %(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()))) return else: dvd_filelist = [] for x in list: if x.mimetype == "video/x-dvd-iso": dvd_filelist.append(x.path) if x.mimetype == "video/x-dvd": dvd_filelist.append(x.path.rsplit('/',1)[0]) session.open(DVD.DVDPlayer, dvd_filelist=dvd_filelist)
Then a dvd mounted on other path then /media/sr<x> does work.
Also this plugin does make a main menu item.
But this has a weird behaviour (always had with or whitout my changes in bdpoll or the plugin) Sometimes You can insert a dvd , play it stop it, remove it. The menu item will be gone also. But other times the menu item does not go. It remains in .
It's living a wild live . The menu item was made with.
def onPartitionChange(action, partition): print "[@] onPartitionChange", action, partition if partition != harddiskmanager.getCD(): global detected_DVD if action == 'remove': print "[@] DVD removed" detected_DVD = False elif action == 'add': print "[@] DVD Inserted" detected_DVD = None def menu(menuid, **kwargs): if menuid == "mainmenu": global detected_DVD if detected_DVD is None: cd = harddiskmanager.getCD() if cd and os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "VIDEO_TS")): detected_DVD = True else: detected_DVD = False if onPartitionChange not in harddiskmanager.on_partition_list_change: harddiskmanager.on_partition_list_change.append(onPartitionChange) if detected_DVD: return [(_("DVD player"), play, "dvd_player", 46)] return []
I now just changed it in just for a try to see why its not removed always when a dvd is removed.
def onPartitionChange(action, partition): print "[@] onPartitionChange", action, partition if partition != harddiskmanager.getCD(): global detected_DVD if action == 'remove': print "[DVDplayer] DVD removed" detected_DVD = False elif action == 'add': print "[DVDplayer] DVD Inserted" detected_DVD = None def menu(menuid, **kwargs): if menuid == "mainmenu": global detected_DVD if detected_DVD is None: cd = harddiskmanager.getCD() print "[DVDplayer] cd devicvename is ", cd if cd and (os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "VIDEO_TS")) or os.path.exists(os.path.join(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()), "video_ts"))): print "[DVDplayer] Mountpoint is present and is", (harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()) detected_DVD = True else: print "[DVDplayer] detected dvd is false" detected_DVD = False if onPartitionChange not in harddiskmanager.on_partition_list_change: print "[DVDplayer] onPartitionChange not in harddiskmanager.on_partition_list_change" harddiskmanager.on_partition_list_change.append(onPartitionChange) if detected_DVD: print "[DVDplayer] detected dvd return new menu item" return [(_("DVD player"), play, "dvd_player", 46)] print "[DVDplayer] DVD not detected do not set new main menu item" return []
The weird is that sometimes after the thed dvd You insert and remove it disappears. But really then by the next dvd not anymore ??
Re: Physical CD/DVD support enigma2. #31
Posted 3 September 2015 - 18:17
Here a patch for hotplug-e2-helper and DVDplayer plugin enigma2.
I also added a zip file with modified modules which makes it easy to look the whole code.
The hotplug-e2-helper:
First the cdfs will only be tried if it's a real audio cd. Thank's to this the dvd udf support is not broken anymore.
Audio cd support still based on kernel-module-cdfs. This means it will only work on stb's who have a working cdfs module.
Vu+ no audio cd support.
I well set a to do message, But this change will only be done for gst-1.0 images. There the cdio gstreamer plugin is avbl and we do not need the mount of the audio cd anymore.
Enigma2 DVDplayer plugin did not worked ok. First there was the hard targetting of mountpoint location from the play dvd pop up.
That is changed to detect the real mountpoint.
Then the menu item in main menu which is only supoosed to be there when a dvd is inserted and must be gone when dvd is removed. Worked only now an then.
Now if you insert dvd and You do not press ok by the pop up , You will find the menu item DVD-player in main menu. You can launch dvd with that menu item.
If the dvd is removed from reader the menu item will be gone.
Included two patches and changed sources.zip file
Attached Files
Re: Physical CD/DVD support enigma2. #32
Re: Physical CD/DVD support enigma2. #33
Posted 3 September 2015 - 18:49
For me it looks nice.... but I'm consider to let it also evaluated by Milo....
Yes that why I added the two changed module sources changed, A patch is not always easy to have a good look of the changes. A possible error will be more easy to trace then.
The only thing is the removal off the created location Is not fixed the Harddisk.py is a bit messy MiLo even calls it a horrible piece of code
Re: Physical CD/DVD support enigma2. #34
Posted 5 September 2015 - 11:18
@littlesat , @MiLo , @Pieterg and any dev interested.
I just revised the previous hotplug-e2-helper patch (bdpoll). Now If You remove the cd or dvd the device and mointpoint will be cleared out off loactions list. Also the Mediaplayer will not have a map with the device friendly name for each dvd or cd you inserted and removed.
The Harddisk.py just needed to know that device could be removed from hotplug helper. That's now added in this patch.
Only the hotplug patch is changed. I just add the previous DVDplayer plugin patch this was ok and works perfect now.
Attached Files
Re: Physical CD/DVD support enigma2. #35
Posted 6 September 2015 - 10:29
here a other improvement.
It was not needed to let scan the hotplug-e2-helper by the slightest media state change.
Only when a media is inserted (disc ok) the cd/dvd type discovered data or audio. And the partition sucesfully mounted , A single hotplug action add is needed.
By remove only a single remove action if there was a partition mounted. Anything else does not require a hotplug action and therefore I just set all the parameters to NULL. (ACTION, DEVPATH , PHYSDEVPATH).
Attached Files
Re: Physical CD/DVD support enigma2. #36
Posted 11 September 2015 - 11:32
I also discovered another issue concerning bookmarks created PVR button.
Each time You open a media trough pvr button , the last location is retained. That's nice since : If You exit and repush button You will open on You're last selection.
But there was also a bookmark created from You're last played location. That is not needed since it is already in the location list.
When it was a removable media the bookmark would be created to a invalid or empty map if the media was removed. Can be cd,dvd usbstick usbhdd or ...
Here the patch , I to remove this bookmark make. (in the patch I just add a comment and commented the procedure. The can be seen what is done.)
dvd playing is now 100 % ok if the 3 patches appended here are applied. (usb or sata dvdreader/writer). Tested on dm8000 (satadevice) and vuduo2 (usbdevice)
I added the patches together this are the only three which needs to be applied.
Attached Files
Re: Physical CD/DVD support enigma2. #37
Re: Physical CD/DVD support enigma2. #38
Posted 13 September 2015 - 11:00
Just reviewed the patches, a few minor comments:
- All systems (windows, ubuntu, ...) use a 2 second CD poll interval, why don't we?
- whitespace errors (lines ending with spaces or tabs), git shows them in bright red.
- Don't comment-out code, just remove it
- Style: When comparing to "None", always use "is". Never compare to "True" or "False", so instead of
if detected_DVD == None or detected_DVD == True:
write
if detected_DVD is None or detected_DVD:
Re: Physical CD/DVD support enigma2. #39
Posted 13 September 2015 - 11:11
I'll change the 1 back to 2 then (actually 1 did worked better before when I tested with an old dvd sata writer I do now have I new one and 2 works fine then also ) For the usb dvd writer by my vuduo2 2 was ok.
For the dvd I will change the now (was corrected to if detected_DVD) to if detected_DVD is None or detected_DVD
Re: Physical CD/DVD support enigma2. #40
Posted 13 September 2015 - 12:03
@MiLo
All the changes are now added to the push requests
enigma2
https://github.com/O...enigma2/pull/37
hotplug-e2-helper
https://github.com/O...e2-helper/pulls
The white spaces present in the patches I posted here where already removed by the push requests
Also tagged with one or more of these keywords: DVD, UDF, AUDIO CD, ISO, CDIO
ISo en VOB afspelen in OpenPli 6.1Started by dutcharnie, 8 Jan 2018 ISO, DVD, Gstreamer |
|
|||
xsarius revo 4kStarted by kiras, 27 Mar 2017 mediaplayer, mkv, dvd |
|
|||
DVD spielt nicht abStarted by MadNBG, 13 Jan 2014 DVD |
|
|||
Afspelen dvd (iso of vob) menu werkt nietStarted by ivom74, 1 Dec 2013 Dvd, menu, openpli, vuplus duo and 1 more... |
|
|||
ISO en VOB tonen geen selectie icoon in DVD menuStarted by lgm21, 26 Apr 2013 dvd, vu duo, iso, mediaplayer |
|
6 user(s) are reading this topic
0 members, 6 guests, 0 anonymous users