CFileItemPtr pItem = GetSelectedItem(); if (pItem != nullptr) { std::string title = pItem->GetPVRRecordingInfoTag()->GetTitle(); std::cout << "Title: " << title << std::endl; }
CFileItemPtr pItem = GetMovieItem(); if (pItem != nullptr) { int duration = pItem->GetPVRRecordingInfoTag()->GetDuration(); std::cout << "Duration: " << duration << " seconds" << std::endl; }In this code example, the function `GetMovieItem()` returns a file item for a recorded movie file. If the file exists, the duration of the PVR recording info tag is retrieved using `GetDuration()`. The resulting `duration` variable is then printed to the console. Package/library: This function is likely part of a larger media management or playback library, such as Kodi.