Ticket #8564: 8564.patch
| File 8564.patch, 3.8 KB (added by , 16 years ago) |
|---|
-
libs/libmythtv/deletemap.cpp
71 71 { 72 72 if (!osd || !ctx) 73 73 return; 74 CleanMap(total);74 //CleanMap(total); 75 75 76 76 InfoMap infoMap; 77 77 ctx->LockPlayingInfo(__FILE__, __LINE__); … … 162 162 int type = Delete(it.key()); 163 163 Add(it.key(), type == MARK_CUT_END ? MARK_CUT_START : MARK_CUT_END); 164 164 } 165 CleanMap(total);165 //CleanMap(total); 166 166 } 167 167 168 168 /** … … 177 177 ((MARK_CUT_START != type) && (MARK_CUT_END != type))) 178 178 return; 179 179 180 #if 0 180 181 int lasttype = MARK_UNSET; 181 182 long long lastframe = -1; 182 183 long long remove = -1; … … 224 225 225 226 if (remove > -1) 226 227 Delete((uint64_t)remove); 228 #endif // 0 227 229 Add(frame, type); 228 CleanMap(total);230 //CleanMap(total); 229 231 } 230 232 231 233 /// Remove the mark at the given frame. … … 233 235 { 234 236 EDIT_CHECK 235 237 Delete(frame); 236 CleanMap(total);238 //CleanMap(total); 237 239 } 238 240 239 241 /// Reverse the direction of the mark at the given frame. … … 387 389 uint64_t thisframe = it.key(); 388 390 if (lasttype == thistype) 389 391 { 390 Delete(thistype == MARK_CUT_ END? thisframe :392 Delete(thistype == MARK_CUT_START ? thisframe : 391 393 (uint64_t)lastframe); 392 394 clear = false; 393 395 break; -
libs/libmythtv/osd.cpp
429 429 long long start = -1; 430 430 long long end = -1; 431 431 bool first = true; 432 QVector<float> pendingStarts; 433 int i; 432 434 QMapIterator<uint64_t, MarkTypes> it(map); 433 435 while (it.hasNext()) 434 436 { 435 bool error = false;436 437 it.next(); 437 438 if (it.value() == MARK_CUT_START) 438 439 { 439 440 start = it.key(); 440 if (end > -1) 441 error = true; 441 pendingStarts += start; 442 442 } 443 443 else if (it.value() == MARK_CUT_END) 444 444 { 445 445 if (first) 446 446 start = 0; 447 if (start < 0)448 error = true;449 447 end = it.key(); 448 if (pendingStarts.isEmpty()) 449 pendingStarts += start; 450 for (i=0; i<pendingStarts.size(); i++) 451 bar->AddRegion((float)(pendingStarts[i]/(double)total), 452 (float)(end/(double)total)); 453 pendingStarts.clear(); 450 454 } 451 455 first = false; 452 453 if (error)454 {455 VERBOSE(VB_IMPORTANT, LOC_ERR + "deleteMap discontinuity");456 start = -1;457 end = -1;458 }459 460 if (start >=0 && end >= 0)461 {462 bar->AddRegion((float)((double)start/(double)total),463 (float)((double)end/(double)total));464 start = -1;465 end = -1;466 }467 456 } 468 if (start > -1 && end < 0)469 bar->AddRegion((float)( (double)start/(double)total), 1.0f);457 for (i=0; i<pendingStarts.size(); i++) 458 bar->AddRegion((float)(pendingStarts[i]/(double)total), 1.0f); 470 459 471 460 bar->Display(); 472 461 } -
libs/libmythui/mythuieditbar.cpp
247 247 } 248 248 else 249 249 { 250 m_invregions.append(qMakePair(start, region.first)); 250 if (region.first > start) 251 m_invregions.append(qMakePair(start, region.first)); 251 252 start = region.second; 252 253 } 253 254 }
