bool HTTPLiveStream::AddSegment(void) { if (m_streamid == -1) return false; MSqlQuery query(MSqlQuery::InitCon()); ++m_curSegment; ++m_segmentCount; if (!m_startSegment) m_startSegment = m_curSegment; if ((m_maxSegments) && (m_segmentCount > (uint16_t)(m_maxSegments + 1))) { QString thisFile = GetFilename(m_startSegment); if (!QFile::remove(thisFile)) LOG(VB_GENERAL, LOG_ERR, LOC + QString("Unable to delete %1.").arg(thisFile)); ++m_startSegment; --m_segmentCount; } SaveSegmentInfo(); WritePlaylist(false); if (m_audioOnlyBitrate) WritePlaylist(true); return true; }
HTTPLiveStream::~HTTPLiveStream() { if (m_writing) { WritePlaylist(false, true); if (m_audioOnlyBitrate) WritePlaylist(true, true); } }
void StaticPlaylistManager::SetOnLoadPlaylist (const QList<Phonon::MediaSource>& sources) { WritePlaylist (GetOnLoadPath (), sources); }
void StaticPlaylistManager::SaveCustomPlaylist (QString name, const QList<Phonon::MediaSource>& sources) { WritePlaylist (PlaylistsDir_.filePath (GetFileName (name)), sources); emit customPlaylistsChanged (); }
void StaticPlaylistManager::SetOnLoadPlaylist (const QList<AudioSource>& sources) { WritePlaylist (GetOnLoadPath (), sources); }