Пример #1
0
static void purge_segments(MPD_CREATE_CTXT_T *pCtxt, const MPD_ADAPTATION_T *pAdaptationList, 
                           unsigned int outidx, int mediaSequenceMin) {
  int rc;
  const MPD_ADAPTATION_T *pAdaptationCur = NULL;
  char buf[VSX_MAX_PATH_LEN];

  //VSX_DEBUG_DASH( LOG(X_DEBUG("DASH - mpd purge_segments... ")));

    if(!pCtxt->init.nodelete_expired) {


      pAdaptationCur = pAdaptationList;
      while(pAdaptationCur) {

        if((rc = mpd_format_path_prefix(buf, sizeof(buf), outidx, pCtxt->init.outfileprefix, 
                                        pAdaptationCur->padaptationTag)) > 0) {

          //VSX_DEBUG_DASH( LOG(X_DEBUG("DASH - mpd purge_segmnents '%s'"), buf));
      
      //fprintf(stderr, "TRY 3... HTTP_PURGE_SEG mediaSeq:%d, mediaSeqMin:%d, keep:%d, outdir:'%s', prfx:'%s'\n", mediaSequenceIndex, mediaSeqMin, keepIdx, pCtxt->outdir, buf);
          http_purge_segments(pCtxt->outdir, buf, "."DASH_DEFAULT_SUFFIX_M4S, mediaSequenceMin, 0);
        }
        pAdaptationCur = pAdaptationCur->pnext;
      }
    }
}
Пример #2
0
static int httplive_purgetsfiles(const HTTPLIVE_DATA_T *pLive, unsigned int idxMin) {
  return http_purge_segments(pLive->dir, pLive->fileprefix, "."HTTPLIVE_TS_NAME_EXT, idxMin, 1);
}