Re: [vdr] incompatibiliy between radio plugin and all mp3 plugins
On Montag, 22. Dezember 2008, Klaus Schmidinger wrote: On 22.12.2008 22:48, Stefan Huelswitt wrote: Wolfgang Rohdewald schrieb: Hello, in cPluginRadio::Replaying(), radio.c expects the replayed recording to be a VDR record. But mp3plugins like mp3, music, muggle use this mechanism for simple audio files. Klaus, could you clarify if the filename passed to cStatus:MsgReplaying() is supposed to be a VDR recording only or if it may be the filename of any kind of media file involved? It's not limited to VDR recordings: The radio plugin author Uwe already sent me a private mail with a fix for his plugin. Attached. -- Wolfgang diff -ru radio-0.2.4.org/radio.c radio-0.2.4/radio.c --- radio-0.2.4.org/radio.c 2007-10-09 18:15:35.0 +0200 +++ radio-0.2.4/radio.c 2008-12-22 11:44:16.0 +0100 @@ -710,6 +710,9 @@ bool isRadio = false; if (On FileName != NULL) { + char *vdrfile; + asprintf(vdrfile, %s/001.vdr, FileName); + if (file_exists(vdrfile)) { // check only VDR-Recordings cFileName fn(FileName, false, true); cUnbufferedFile *f = fn.Open(); if (f) { @@ -719,6 +722,8 @@ isRadio = (b[0] == 0x00) (b[1] == 0x00) (b[2] == 0x01) (0xc0 = b[3] b[3] = 0xdf); } } + free(vdrfile); + } if (isRadio) { if (!file_exists(ReplayFile)) ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] incompatibiliy between radio plugin and all mp3 plugins
On 23.12.2008 08:56, Stefan Huelswitt wrote: Klaus Schmidinger schrieb: On 22.12.2008 22:48, Stefan Huelswitt wrote: Klaus, could you clarify if the filename passed to cStatus:MsgReplaying() is supposed to be a VDR recording only or if it may be the filename of any kind of media file involved? It's not limited to VDR recordings: class cStatus : public cListObject { ... virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {} // The given player control has started (On = true) or stopped (On = false) replaying Name. // Name is the name of the recording, without any directory path. In case of a player that can't provide // a name, Name can be a string that identifies the player type (like, e.g., DVD). // The full file name of the recording is given in FileName, which may be NULL in case there is no // actual file involved. If On is false, Name may be NULL. Thanks for quoting the documentation ;-) Nevertheless it's a bit unclear: full file name of the recording A mp3, divx, vob or whatever media file is not a recording as we speak of in the VDR context. Well, even an mp3, divx or vob must have been recorded at some time ;-) The function's name is Replaying(), which is what you usually do with recordings. Even though this was primarily designed to inform plugins that VDR is replaying one of its recordings, the Name and FileName semantics were defined in a more general way, so that any kind of files may be reported this way. Klaus ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] incompatibiliy between radio plugin and all mp3 plugins
Wolfgang Rohdewald schrieb: Hello, in cPluginRadio::Replaying(), radio.c expects the replayed recording to be a VDR record. But mp3plugins like mp3, music, muggle use this mechanism for simple audio files. Klaus, could you clarify if the filename passed to cStatus:MsgReplaying() is supposed to be a VDR recording only or if it may be the filename of any kind of media file involved? A simple solution would be if the radio plugin could check if the recording is actually a VDR recording. Right now it just calls cFileName fn(FileName, false, true); Depending on Klaus answer, either the Radio plugin or the other plugins need to be fixed. It would be easy to make the mp3 plugin pass no filename at all if necessary. Merry X'mas Best regards -- Stefan Huelswitt s.huelsw...@gmx.de | http://www.muempf.de/ ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] incompatibiliy between radio plugin and all mp3 plugins
On 22.12.2008 22:48, Stefan Huelswitt wrote: Wolfgang Rohdewald schrieb: Hello, in cPluginRadio::Replaying(), radio.c expects the replayed recording to be a VDR record. But mp3plugins like mp3, music, muggle use this mechanism for simple audio files. Klaus, could you clarify if the filename passed to cStatus:MsgReplaying() is supposed to be a VDR recording only or if it may be the filename of any kind of media file involved? It's not limited to VDR recordings: class cStatus : public cListObject { ... virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {} // The given player control has started (On = true) or stopped (On = false) replaying Name. // Name is the name of the recording, without any directory path. In case of a player that can't provide // a name, Name can be a string that identifies the player type (like, e.g., DVD). // The full file name of the recording is given in FileName, which may be NULL in case there is no // actual file involved. If On is false, Name may be NULL. Klaus ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] incompatibiliy between radio plugin and all mp3 plugins
Klaus Schmidinger schrieb: On 22.12.2008 22:48, Stefan Huelswitt wrote: Klaus, could you clarify if the filename passed to cStatus:MsgReplaying() is supposed to be a VDR recording only or if it may be the filename of any kind of media file involved? It's not limited to VDR recordings: class cStatus : public cListObject { ... virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {} // The given player control has started (On = true) or stopped (On = false) replaying Name. // Name is the name of the recording, without any directory path. In case of a player that can't provide // a name, Name can be a string that identifies the player type (like, e.g., DVD). // The full file name of the recording is given in FileName, which may be NULL in case there is no // actual file involved. If On is false, Name may be NULL. Thanks for quoting the documentation ;-) Nevertheless it's a bit unclear: full file name of the recording A mp3, divx, vob or whatever media file is not a recording as we speak of in the VDR context. Best regards. -- Stefan Huelswitt s.huelsw...@gmx.de | http://www.muempf.de/ ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr