Rob Shortt wrote: > Ok, so I've been doing some work on recordserver and ivtv_record and > am running into some pitfalls wrt the lack of VideoGroups. Sorry to > do this but I need to bring this up again. :)
No problem, we need to find the best working setup. > What we talked about using: > > TV_[DVB|TV|IVTV]_[DEVICE|POST_CMD|PRE_CMD...] ie: TV_DVB_DEVICE = > ['/dev/dvb'] > > CHANNEL_LIST = [ > ('vox.de', 'VOX', ['dvb:VOX', 'tv0:1234', 'tv1:1234']) > ] > (Or Hans' suggestion... see below) > > TV_MPLAYER_URLS['tv0'] = '-tv device=/dev/video0:...' > TV_MPLAYER_URLS['tv1'] = '-tv device=/dev/video1:input=4...' > TV_MPLAYER_URLS['ivtv0'] = '-cache 8192 /dev/video2' > > > We are still missing some fine grained configuration that came from > video groups, most of that config we don't really need but we need to > know more about each dvb/tv0/tv1 such as: audio device to capture > from, are we using tuner, composite, or svideo input, what number said > input is mapped to on the card, the norm (NTSC/PAL/SECAM), and the > chanlist (us-cable, etc). I only know about dvb and here it is very clean. All stuff for _one_ card is in one directory inside /dev. But from your mail I guess this is not the case for analog audio. > The old VIDEO_GROUPS array is very user unfriendly and the TV_* > single variable assignment is much cleaner from that perspective. > On the other hand if we introduce new variables for > TV_[DVB|TV|IVTV]_[device|input|norm|adevice...] there will be too > many variables to deal with and even then you also have to consider > multiple devices of each kind (tv0, tv1, tv2). We had talked about > using lists to handle that, which introduces more complexity. > > I've done some more thinking and come up with something in > between. Inside config.py I would like to introduce a new class: > > class TVSettings: > """ > vdev: The video device, such as /dev/video. > adev: The audio device, such as /dev/dsp. What does adev have to do with the tv settings? Aren't this normal output settings? And what is /dev/video? I guess it is a simple link. were is the destination? > input_type: tuner, composite, svideo, webcam > input_num: The number of this input according to V4L > tuner_norm: NTSC, PAL, SECAM > tuner_chanlist: us-cable, Problem here: for dvb we don't need this at all. > That is much smaller than VideoGroup. But still, we don't want users > to have to instantiate this class by themselves in their config! We > can do that behind the scenes in config.py or freevo_config.py (please > bear with me): > > # Accept the defaults for the first regular tv card > TV_SETTINGS['tv'] = TVSettings() > > # The user may decide to call that tv0 instead, do another for convenience > TV_SETTINGS['tv0'] = TVSettings() > > TV_SETTINGS['tv1'] = TVSettings() > TV_SETTINGS['tv1'].vdev = '/dev/video1' > TV_SETTINGS['tv1'].adev = '/dev/dsp1' > > TV_SETTINGS['tv2'] = TVSettings() > TV_SETTINGS['tv2'].vdev = '/dev/video2' > TV_SETTINGS['tv2'].adev = '/dev/dsp2' > > > # Accept the defaults for the first ivtv card > TV_SETTINGS['ivtv'] = TVSettings() > TV_SETTINGS['ivtv'].adev = None > TV_SETTINGS['ivtv'].input_num = 4 > > # The user may decide to call that ivtv0 instead, do another for convenience > TV_SETTINGS['ivtv0'] = TVSettings() > TV_SETTINGS['ivtv0'].adev = None > TV_SETTINGS['ivtv0'].input_num = 4 > > TV_SETTINGS['ivtv1'] = TVSettings() > TV_SETTINGS['ivtv1'].vdev = '/dev/video1' > TV_SETTINGS['ivtv1'].adev = None > TV_SETTINGS['ivtv1'].input_num = 4 > > TV_SETTINGS['ivtv2'] = TVSettings() > TV_SETTINGS['ivtv2'].vdev = '/dev/video2' > TV_SETTINGS['ivtv2'].adev = None > TV_SETTINGS['ivtv2'].input_num = 4 > > # Accept the defaults for the first DVB card > TV_SETTINGS['dvb'] = TVSettings() > TV_SETTINGS['dvb'].vdev = '/dev/dvb/adapter0/dvr0' > # Or we could use '/dev/dvb/adapter0/' to find each device > # in that dir. Or only TV_SETTINGS['dvb'].device = 0. > TV_SETTINGS['dvb'].adev = None This is nonsense. We will never have an adev for dvb. I guess we need some sort of intelligence here: TV_SETTINGS['dvb0'] = TVSettings() This will auto-configure the TVSettings: - set mode to dvb - set device to adapter0 So TV_SETTINGS needs to be much more than a simple dict. But the interface should be like the one you propose. > TV_SETTINGS['tv0'].vdev = '/dev/video1' > # Or maybe their second tuner is on video2 > TV_SETTINGS['tv1'].vdev = '/dev/video2' We can auto-detect this (more or less). Should we support /dev/video1 for tv0? Or do we also prefer /dev/videoX for tvX? > Actually I'm having a hard time thinking of scenarios where the user > might need to change something and even then it is easy. If the user > needs more than 3 tv cards they should be able to figure out how to > add 'tv3'. > > Also, I like Hans' suggestion of using DEFAULT_CHANNEL_METHOD = > ['tv0', 'tv1'] or CHANNEL_METHOD_ALTERNATIVES = {'tv0': 'tv1'} to > default to one type and to determine that two devices see the same > channels. I would prefer the last one. > I would still like to use TV_MPLAYER_URLS['tv0'] = '-tv > device=/dev/video0:...' and this in fact would really be a requirement > for the tv.mplayer plugin. Yes. Dischi -- System going down at 1:45 this afternoon for disk crashing. ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel