Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Receiver and Player at the same time: Additional Info
Hello once again,
I've solved all problems concerning segfaults now, as i forgot to reset some
pointer to null (my fault - sorry;) )
BTW: The Output code (converting cBitmaps to I-Frames using libavcoded) is
taken from the teletext plugin.
I have created a Control and a Player Object launched by cControl::Launch in
MainMenuAction(). The Player wants to construct a receiver object to receive
a full I-Frame and stop. Like this:
void cOsd2kPlayer::Activate(bool On) {
if (On) {
cChannel *chan1 = Channels.GetByNumber(
cDevice::PrimaryDevice()->CurrentChannel());
// Player (output) code - works (red square on screen)
cBitmap *test = new cBitmap(486, 506, 5, true);
test->Fill(0, 0, 486, 506, clrRed);
ConvertPage(test);
delete test;
// Delete and reset receiver Object in case it is still present
Stop();
receiver = new cOsd2kReceiver(chan1->Ca(), chan1->Vpid());
if (!cDevice::PrimaryDevice()->AttachReceiver(receiver))
printf("Why?\n");
// "Why" is never printed !!!
// IMPORTANT PART
// IF I TURN ON THIS ONE, THE RECEIVER GETS DATA RECEIVED
// IF I TURN IT OFF, THE RECEIVER WORKS BUT THE PLAYER IS DESTROYED
// AFTERWARDS
//cDevice::PrimaryDevice()->SwitchChannel(chan1, false);
} else if (receiver)
Stop();
}
Should help clear the whole problem a bit.
The Receiver object itself doesn't do much except receiving the data and
returning from the Receive() Method.
Thanks in advance again;)
Greetings,
Sascha Volkenandt
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index