Ticket #7916: save_cutlist_incrementally_v3.patch
| File save_cutlist_incrementally_v3.patch, 4.1 KB (added by , 16 years ago) |
|---|
-
libs/libmythtv/deletemap.h
11 11 m_seekamountpos(4), m_seekamount(30) { } 12 12 13 13 bool HandleAction(QString &action, uint64_t frame, uint64_t played, 14 uint64_t total, double rate); 14 uint64_t total, double rate, 15 PlayerContext *ctx); 15 16 int GetSeekAmount(void) { return m_seekamount; } 16 17 void UpdateSeekAmount(int change, double framerate); 17 18 void SetSeekAmount(int amount) { m_seekamount = amount; } … … 26 27 bool IsEmpty(void); 27 28 28 29 void SetMap(const frm_dir_map_t &map); 29 void LoadCommBreakMap(uint64_t total, frm_dir_map_t &map); 30 void LoadCommBreakMap(uint64_t total, frm_dir_map_t &map, 31 PlayerContext *ctx); 30 32 void SaveMap(uint64_t total, PlayerContext *ctx); 31 33 void LoadMap(uint64_t total, PlayerContext *ctx); 32 34 void CleanMap(uint64_t total); -
libs/libmythtv/NuppelVideoPlayer.cpp
3374 3374 { 3375 3375 frm_dir_map_t map; 3376 3376 commBreakMap.GetMap(map); 3377 deleteMap.LoadCommBreakMap(totalFrames, map );3377 deleteMap.LoadCommBreakMap(totalFrames, map, player_ctx); 3378 3378 } 3379 3379 } 3380 3380 else if (action == "PREVCUT") … … 3422 3422 } 3423 3423 else 3424 3424 handled = deleteMap.HandleAction(action, frame, framesPlayed, 3425 totalFrames, video_frame_rate); 3425 totalFrames, video_frame_rate, 3426 player_ctx); 3426 3427 } 3427 3428 3428 3429 if (handled && refresh) -
libs/libmythtv/deletemap.cpp
11 11 { VERBOSE(VB_IMPORTANT, LOC_ERR + "Cannot edit outside editmode."); return; } 12 12 13 13 bool DeleteMap::HandleAction(QString &action, uint64_t frame, 14 uint64_t played, uint64_t total, double rate) 14 uint64_t played, uint64_t total, double rate, 15 PlayerContext *ctx) 15 16 { 16 17 bool handled = true; 17 18 if (action == "DELETE") 19 { 18 20 Delete(frame, total); 21 SaveMap(total, ctx); 22 } 19 23 else if (action == "MOVETOCURRENT") 24 { 20 25 Move(frame, played, total); 26 SaveMap(total, ctx); 27 } 21 28 else if (action == "REVERSE") 29 { 22 30 Reverse(frame, total); 31 SaveMap(total, ctx); 32 } 23 33 else if (action == "NEWCUTTOLEFT") 34 { 24 35 Add(frame, total, MARK_CUT_END); 36 SaveMap(total, ctx); 37 } 25 38 else if (action == "NEWCUTTORIGHT") 39 { 26 40 Add(frame, total, MARK_CUT_START); 41 SaveMap(total, ctx); 42 } 27 43 else if (action == "UP") 28 44 UpdateSeekAmount(1, rate); 29 45 else if (action == "DOWN") 30 46 UpdateSeekAmount(-1, rate); 31 47 else if (action == "CLEARMAP") 48 { 32 49 Clear(); 50 SaveMap(total, ctx); 51 } 33 52 else if (action == "INVERTMAP") 53 { 34 54 ReverseAll(total); 55 SaveMap(total, ctx); 56 } 35 57 else 36 58 handled = false; 37 59 return handled; … … 407 429 } 408 430 409 431 /// Loads the given commercial break map into the deleteMap. 410 void DeleteMap::LoadCommBreakMap(uint64_t total, frm_dir_map_t &map) 432 void DeleteMap::LoadCommBreakMap(uint64_t total, frm_dir_map_t &map, 433 PlayerContext *ctx) 411 434 { 412 435 Clear(); 413 436 frm_dir_map_t::Iterator it = map.begin(); … … 415 438 Add(it.key(), it.value() == MARK_COMM_START ? 416 439 MARK_CUT_START : MARK_CUT_END); 417 440 CleanMap(total); 441 SaveMap(total, ctx); 418 442 } 419 443 420 444 /// Loads the delete map from the database.
