recInfo = NULL;
recInfoFor = NULL;
}
+
+bool Recording::isRadio()
+{
+ VDR* vdr = VDR::getInstance();
+ if (!vdr) return false;
+
+ ULONG lengthFrames = 0;
+ ULLONG lengthBytes = vdr->streamRecording(getFileName(), &lengthFrames);
+ if (!lengthBytes || !lengthFrames) return false;
+
+ UINT thisRead;
+ UCHAR* buffer = vdr->getBlock(0ULL, 250000U, &thisRead);
+ if (!buffer) return false;
+
+ if (!thisRead)
+ {
+ free(buffer);
+ return false;
+ }
+
+ bool hasVideo = Demuxer::scanForVideo(buffer, thisRead);
+
+ free(buffer);
+
+ // FIXME
+ vdr->stopStreaming();
+
+
+ if (!hasVideo) return true;
+ return false;
+}
+
Recording* toPlay = getCurrentOptionRecording();
if (toPlay)
{
- toPlay->loadRecInfo();
- if (toPlay->recInfo->hasNoVideo())
+ toPlay->loadRecInfo(); // check if still need this
+
+ bool isRadio = toPlay->isRadio();
+
+ if (isRadio)
{
VRadioRec* radrec = new VRadioRec(toPlay);
radrec->draw();