diff options
-rw-r--r-- | src/DSUtil/DSUtil.cpp | 7 | ||||
-rw-r--r-- | src/DSUtil/DSUtil.h | 1 | ||||
-rw-r--r-- | src/apps/mplayerc/MainFrm.cpp | 49 |
3 files changed, 51 insertions, 6 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp index 455d04394..69734f010 100644 --- a/src/DSUtil/DSUtil.cpp +++ b/src/DSUtil/DSUtil.cpp @@ -2457,6 +2457,13 @@ CString ReftimeToString2(const REFERENCE_TIME& rtVal) return strTemp;
}
+CString DVDtimeToString(const DVD_HMSF_TIMECODE rtVal)
+{
+ CString strTemp;
+ strTemp.Format(_T("%02d:%02d:%02d"), rtVal.bHours, rtVal.bMinutes, rtVal.bSeconds);
+ return strTemp;
+}
+
REFERENCE_TIME StringToReftime(LPCTSTR strVal)
{
REFERENCE_TIME rt = 0;
diff --git a/src/DSUtil/DSUtil.h b/src/DSUtil/DSUtil.h index 8af26a930..31a7223cf 100644 --- a/src/DSUtil/DSUtil.h +++ b/src/DSUtil/DSUtil.h @@ -111,6 +111,7 @@ extern LPCTSTR GetDXVAMode(const GUID* guidDecoder); extern void DumpBuffer(BYTE* pBuffer, int nSize);
extern CString ReftimeToString(const REFERENCE_TIME& rtVal);
extern CString ReftimeToString2(const REFERENCE_TIME& rtVal);
+extern CString DVDtimeToString(const DVD_HMSF_TIMECODE rtVal);
REFERENCE_TIME StringToReftime(LPCTSTR strVal);
extern COLORREF YCrCbToRGB_Rec601(BYTE Y, BYTE Cr, BYTE Cb);
extern COLORREF YCrCbToRGB_Rec709(BYTE Y, BYTE Cr, BYTE Cb);
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index e3a36a126..4d140ae5e 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -8070,6 +8070,25 @@ void CMainFrame::OnNavigateSkip(UINT nID) pDVDC->PlayNextChapter(DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
}
}
+
+ if((pDVDI->GetCurrentLocation(&Location) == S_OK))
+ {
+ pDVDI->GetNumberOfChapters(Location.TitleNum, &ulNumOfChapters);
+ CString m_strTitle;
+ m_strTitle.Format(IDS_AG_TITLE, Location.TitleNum);
+ __int64 start, stop;
+ m_wndSeekBar.GetRange(start, stop);
+
+ CString m_strOSD;
+ if(stop>0)
+ m_strOSD.Format(_T("%02d:%02d:%02d/%s %s, %s: %d/%d"), Location.TimeCode.bHours, Location.TimeCode.bMinutes, Location.TimeCode.bSeconds,
+ DVDtimeToString(RT2HMSF(stop)), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+ else
+ m_strOSD.Format(_T("%s, %s: %d/%d"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+
+ m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
+ }
+
/*
if(nID == ID_NAVIGATE_SKIPBACK)
pDVDC->PlayPrevChapter(DVD_CMD_FLAG_Block, NULL);
@@ -8290,15 +8309,33 @@ void CMainFrame::OnNavigateChapters(UINT nID) {
pDVDC->PlayTitle(nID, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL); // sometimes this does not do anything ...
pDVDC->PlayChapterInTitle(nID, 1, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL); // ... but this does!
- return;
+ }
+ else
+ {
+ nID -= ulNumOfTitles;
+
+ if(nID > 0 && nID <= ulNumOfChapters)
+ {
+ pDVDC->PlayChapter(nID, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
+ }
}
- nID -= ulNumOfTitles;
-
- if(nID > 0 && nID <= ulNumOfChapters)
+ if((pDVDI->GetCurrentLocation(&Location) == S_OK))
{
- pDVDC->PlayChapter(nID, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- return;
+ pDVDI->GetNumberOfChapters(Location.TitleNum, &ulNumOfChapters);
+ CString m_strTitle;
+ m_strTitle.Format(IDS_AG_TITLE, Location.TitleNum);
+ __int64 start, stop;
+ m_wndSeekBar.GetRange(start, stop);
+
+ CString m_strOSD;
+ if(stop>0)
+ m_strOSD.Format(_T("%02d:%02d:%02d/%s %s, %s: %d/%d"), Location.TimeCode.bHours, Location.TimeCode.bMinutes, Location.TimeCode.bSeconds,
+ DVDtimeToString(RT2HMSF(stop)), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+ else
+ m_strOSD.Format(_T("%s, %s: %d/%d"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+
+ m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
}
}
else if(GetPlaybackMode() == PM_CAPTURE)
|