Patrick Fischer wrote: > I have tested lots of thinks but I didn't find a solution. > > Maybe this is the reason why klaus didn't put the svdrp in an own thread? > > I don't understand the way to lock a device! You don't "lock a device". Starting a replay is supposed to take place from the foreground thread. Klaus > Is there an way to resolve my problem? > I don't want to call the svdrp "PLAY", thats an very long winded way. > > Patrick > > > Patrick Fischer schrieb: > >> Hello >> If I want to attach a Player to a device (for play a VDR Recording) >> but I have some Thread problems. >> I have looked at cSVDRP::CmdPLAY. >> But If I copy the Code to my Plugin, sometimes I get a Memory access >> error. >> Maybe I need to lock the the device? >> The Problem is that the cControl::Attach(void) starts befor the >> cDevice::AttachPlayer(myPlayer) is done. >> But I don't know how to lock the device. >> >> This is a fragment of the cSVDRP::CmdPLAY Code: >> >> cRecording *recording = Recordings.Get(3); >> if (recording) { >> ....... >> cReplayControl::SetRecording(NULL, NULL); >> cControl::Shutdown(); >> ....... >> cReplayControl::SetRecording(recording->FileName(), >> recording->Title()); >> cControl::Launch(new cReplayControl); >> //if I place a output here it will be shown >> cControl::Attach(); >> //if I place a output here it will not be shown if it freezes >> ........ >> } >> >> How to create a lock for this? >> >> I have created some more output which can be shown here: >> http://nopaste.debianforum.de/1801 >> >> On stdout was shown: >> ..... >> SetPlayMode: 0 >> SetAudioChannelDevice: 0 >> SetPlayMode: 1 >> Speicherzugriffsfehler