fetzerch / xbmc-pvr-addons

XBMC PVR add-ons
GNU General Public License v3.0
19 stars 17 forks source link

To handle posmap and keyframe info #146

Closed janbar closed 10 years ago

janbar commented 10 years ago

Hi Christian,

Here all materials to handle these things.

Regards

janbar commented 10 years ago

Tested. I used this commit to validate solution around timeshift info

janbar commented 10 years ago

Sample of usage: (same for duration map)

std::map<uint32_t, int64_t> ret; cmyth_posmap_t posmap; Lock(); posmap = cmyth_recorder_get_position_map(*m_recorder_t, startFrame, endFrame); if (posmap) { int count = cmyth_posmap_count(posmap); for (int i = 0; i < count; i++) { cmyth_keyframe_t keyframe = cmyth_posmap_keyframe(posmap, i); ret.insert(std::make_pair(cmyth_keyframe_number(keyframe), cmyth_keyframe_pos(keyframe))); ref_release(keyframe); } ref_release(posmap); } Unlock(); return ret;

fetzerch commented 10 years ago

Merged to master and frodo. Although they're not used yet it might be good to have them available when needed. Thanks!