| 3749 | if (livetv || antadj) |
| 3750 | { |
| 3751 | // We need there to be a ringbuffer for these modes |
| 3752 | bool ok; |
| 3753 | ProgramInfo *tmp = pseudoLiveTVRecording; |
| 3754 | pseudoLiveTVRecording = NULL; |
| 3755 | |
| 3756 | if (channel) |
| 3757 | channel->SetChanNum(channum); |
| 3758 | tvchain->SetCardType("DUMMY"); |
| 3759 | |
| 3760 | if (!ringBuffer) |
| 3761 | ok = CreateLiveTVRingBuffer(); |
| 3762 | else |
| 3763 | ok = SwitchLiveTVRingBuffer(true, false); |
| 3764 | pseudoLiveTVRecording = tmp; |
| 3765 | |
| 3766 | tvchain->SetCardType(genOpt.cardtype); |
| 3767 | |
| 3768 | if (!ok) |
| 3769 | { |
| 3770 | VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to create RingBuffer 1"); |
| 3771 | return; |
| 3772 | } |
| 3773 | |
| 3774 | has_dummy = true; |
| 3775 | } |
| 3776 | |
3784 | | if (livetv || antadj) |
3785 | | { |
3786 | | // We need there to be a ringbuffer for these modes |
3787 | | bool ok; |
3788 | | ProgramInfo *tmp = pseudoLiveTVRecording; |
3789 | | pseudoLiveTVRecording = NULL; |
3790 | | |
3791 | | tvchain->SetCardType("DUMMY"); |
3792 | | |
3793 | | if (!ringBuffer) |
3794 | | ok = CreateLiveTVRingBuffer(); |
3795 | | else |
3796 | | ok = SwitchLiveTVRingBuffer(true, false); |
3797 | | pseudoLiveTVRecording = tmp; |
3798 | | |
3799 | | tvchain->SetCardType(genOpt.cardtype); |
3800 | | |
3801 | | if (!ok) |
3802 | | { |
3803 | | VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to create RingBuffer 1"); |
3804 | | return; |
3805 | | } |
3806 | | |
3807 | | has_dummy = true; |
3808 | | } |
3809 | | |