Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apps/mplayerc/MainFrm.cpp78
-rw-r--r--src/apps/mplayerc/MainFrm.h7
-rw-r--r--src/apps/mplayerc/PlayerNavigationBar.cpp107
-rw-r--r--src/apps/mplayerc/PlayerNavigationBar.h54
-rw-r--r--src/apps/mplayerc/PlayerNavigationDialog.cpp211
-rw-r--r--src/apps/mplayerc/PlayerNavigationDialog.h73
-rw-r--r--src/apps/mplayerc/SettingsDefines.h1
-rw-r--r--src/apps/mplayerc/mplayerc.br.rcbin322176 -> 323774 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.by.rcbin326844 -> 328446 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.cpp2
-rw-r--r--src/apps/mplayerc/mplayerc.cz.rcbin316538 -> 318140 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.de.rcbin317788 -> 319390 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.es.rcbin322366 -> 323976 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.fr.rcbin319462 -> 321060 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.h1
-rw-r--r--src/apps/mplayerc/mplayerc.hu.rcbin323602 -> 325204 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.it.rcbin329096 -> 330698 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.kr.rcbin288826 -> 290428 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.pl.rcbin335640 -> 337242 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.rcbin319636 -> 321238 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.ru.rcbin317040 -> 318642 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.sc.rcbin294050 -> 295652 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.sk.rcbin330780 -> 332378 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.sv.rcbin325716 -> 327314 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.tc.rcbin295206 -> 296600 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.tr.rcbin312192 -> 313794 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.ua.rcbin325652 -> 327254 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.vcproj16
-rw-r--r--src/apps/mplayerc/resource.h65
29 files changed, 584 insertions, 31 deletions
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index 20daf1db7..12c6af55e 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -466,6 +466,10 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_COMMAND(ID_FILE_OPENDIRECTORY, OnFileOpendirectory)
ON_UPDATE_COMMAND_UI(ID_FILE_OPENDIRECTORY, OnUpdateFileOpen)
ON_WM_POWERBROADCAST()
+
+ // Navigation pannel
+ ON_COMMAND(ID_VIEW_NAVIGATION, OnViewNavigation)
+ ON_UPDATE_COMMAND_UI(ID_VIEW_NAVIGATION, OnUpdateViewNavigation)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
@@ -590,6 +594,11 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_wndCaptureBar.EnableDocking(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);
LoadControlBar(&m_wndCaptureBar, AFX_IDW_DOCKBAR_LEFT);
+ m_wndNavigationBar.Create(this);
+ m_wndNavigationBar.SetBarStyle(m_wndNavigationBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
+ m_wndNavigationBar.EnableDocking(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);
+ LoadControlBar(&m_wndNavigationBar, AFX_IDW_DOCKBAR_LEFT);
+
m_wndShaderEditorBar.Create(this);
m_wndShaderEditorBar.SetBarStyle(m_wndShaderEditorBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_wndShaderEditorBar.EnableDocking(CBRS_ALIGN_ANY);
@@ -807,6 +816,7 @@ void CMainFrame::LoadControlBar(CControlBar* pBar, UINT defDockBarID)
&& pBar != &m_wndSubresyncBar
&& pBar != &m_wndCaptureBar
&& pBar != &m_wndShaderEditorBar
+ && pBar != &m_wndNavigationBar
? SW_SHOW
: SW_HIDE);
@@ -1126,6 +1136,7 @@ void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
if(style&WS_THICKFRAME) lpMMI->ptMinTrackSize.y += GetSystemMetrics(SM_CYSIZEFRAME)*2;
lpMMI->ptMinTrackSize.y += (mbi.rcBar.bottom - mbi.rcBar.top);
if(!AfxGetAppSettings().fHideCaptionMenu) lpMMI->ptMinTrackSize.y += 3;
+ else if(!AfxGetAppSettings().fHideNavigation) lpMMI->ptMinTrackSize.y += 3;
POSITION pos = m_bars.GetHeadPosition();
while(pos)
@@ -1243,6 +1254,7 @@ void CMainFrame::OnSizing(UINT fwSide, LPRECT pRect)
if(style&WS_THICKFRAME) fsize.cy += GetSystemMetrics(SM_CYSIZEFRAME)*2;
fsize.cy += mbi.rcBar.bottom - mbi.rcBar.top;
if(!AfxGetAppSettings().fHideCaptionMenu) fsize.cy += 3;
+ else if(!AfxGetAppSettings().fHideNavigation) fsize.cy += 3;
POSITION pos = m_bars.GetHeadPosition();
while(pos)
@@ -5573,11 +5585,13 @@ void CMainFrame::OnViewCaptionmenu()
MoveVideoWindow();
}
+
void CMainFrame::OnUpdateViewCaptionmenu(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(!AfxGetAppSettings().fHideCaptionMenu);
}
+
void CMainFrame::OnViewControlBar(UINT nID)
{
nID -= ID_VIEW_SEEKER;
@@ -5673,6 +5687,19 @@ void CMainFrame::OnUpdateEDLNewClip(CCmdUI* pCmdUI)
pCmdUI->Enable(m_wndEditListEditor.IsWindowVisible());
}
+// Navigation menu
+void CMainFrame::OnViewNavigation()
+{
+ m_wndNavigationBar.m_navdlg.UpdateElementList();
+ ShowControlBar(&m_wndNavigationBar, !m_wndNavigationBar.IsWindowVisible(), TRUE);
+}
+
+void CMainFrame::OnUpdateViewNavigation(CCmdUI* pCmdUI)
+{
+ pCmdUI->SetCheck(m_wndNavigationBar.IsWindowVisible());
+ pCmdUI->Enable(m_iMediaLoadState == MLS_LOADED && m_iPlaybackMode == PM_CAPTURE);
+}
+
void CMainFrame::OnViewCapture()
{
ShowControlBar(&m_wndCaptureBar, !m_wndCaptureBar.IsWindowVisible(), TRUE);
@@ -5699,6 +5726,8 @@ void CMainFrame::OnViewMinimal()
{
if(!AfxGetAppSettings().fHideCaptionMenu)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
+ else if(!AfxGetAppSettings().fHideNavigation)
+ SendMessage(WM_COMMAND, ID_VIEW_NAVIGATION);
ShowControls(0);
}
@@ -5710,6 +5739,8 @@ void CMainFrame::OnViewCompact()
{
if(AfxGetAppSettings().fHideCaptionMenu)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
+ else if(AfxGetAppSettings().fHideNavigation)
+ SendMessage(WM_COMMAND, ID_VIEW_NAVIGATION);
ShowControls(CS_TOOLBAR);
}
@@ -5721,6 +5752,8 @@ void CMainFrame::OnViewNormal()
{
if(AfxGetAppSettings().fHideCaptionMenu)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
+ else if(AfxGetAppSettings().fHideNavigation);
+ SendMessage(WM_COMMAND, ID_VIEW_NAVIGATION);
ShowControls(CS_SEEKBAR|CS_TOOLBAR|CS_STATUSBAR|CS_INFOBAR);
}
@@ -7104,7 +7137,7 @@ void CMainFrame::OnUpdateAfterplayback(CCmdUI* pCmdUI)
void CMainFrame::OnNavigateSkip(UINT nID)
{
- if(m_iPlaybackMode == PM_FILE || m_iPlaybackMode == PM_CAPTURE)
+ if(m_iPlaybackMode == PM_FILE)
{
if(m_iPlaybackMode == PM_FILE) SetupChapters();
@@ -7194,6 +7227,35 @@ void CMainFrame::OnNavigateSkip(UINT nID)
pDVDC->PlayNextChapter(DVD_CMD_FLAG_Block, NULL);
*/
}
+ else if(m_iPlaybackMode == PM_CAPTURE)
+ {
+ if (AfxGetAppSettings().iDefaultCaptureDevice == 1)
+ {
+ CComQIPtr<IBDATuner> pTun = pGB;
+ if (pTun)
+ {
+ int nCurrentChannel;
+ AppSettings& s = AfxGetAppSettings();
+
+ nCurrentChannel = s.DVBLastChannel;
+
+ if(nID == ID_NAVIGATE_SKIPBACK)
+ {
+ pTun->SetChannel (nCurrentChannel - 1);
+ if (m_wndNavigationBar.IsVisible())
+ m_wndNavigationBar.m_navdlg.UpdatePos(nCurrentChannel - 1);
+ }
+ else if(nID == ID_NAVIGATE_SKIPFORWARD)
+ {
+ pTun->SetChannel (nCurrentChannel + 1);
+ if (m_wndNavigationBar.IsVisible())
+ m_wndNavigationBar.m_navdlg.UpdatePos(nCurrentChannel + 1);
+ }
+
+ }
+ }
+
+ }
}
void CMainFrame::OnUpdateNavigateSkip(CCmdUI* pCmdUI)
@@ -7386,7 +7448,11 @@ void CMainFrame::OnNavigateChapters(UINT nID)
{
CComQIPtr<IBDATuner> pTun = pGB;
if (pTun)
+ {
pTun->SetChannel (nID);
+ if (m_wndNavigationBar.IsVisible())
+ m_wndNavigationBar.m_navdlg.UpdatePos(nID);
+ }
}
}
}
@@ -7896,7 +7962,7 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
}
}
- if(s.fHideCaptionMenu)
+ if(s.fHideCaptionMenu && s.fHideNavigation)
{
ModifyStyle(WS_CAPTION | WS_THICKFRAME, 0, SWP_NOZORDER);
::SetMenu(m_hWnd, NULL);
@@ -8102,6 +8168,12 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
r = m_lastWindowRect;
hMenu = AfxGetAppSettings().fHideCaptionMenu ? NULL : m_hMenuDefault;
+ if (!AfxGetAppSettings().fHideNavigation)
+ {
+ dwAdd = (AfxGetAppSettings().fHideNavigation ? 0 : WS_CAPTION | WS_THICKFRAME);
+ hMenu = AfxGetAppSettings().fHideNavigation ? NULL : m_hMenuDefault;
+ }
+
if(AfxGetApp()->GetProfileInt(IDS_R_SETTINGS, _T("HidePlaylistFullScreen"), FALSE)) ShowControlBar(&m_wndPlaylistBar, m_PlayListBarVisible, TRUE);
}
@@ -8261,7 +8333,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats)
else if(!m_fFullScreen)
{
m_wndView.GetClientRect(wr);
- if(!AfxGetAppSettings().fHideCaptionMenu)
+ if(!AfxGetAppSettings().fHideCaptionMenu || !AfxGetAppSettings().fHideNavigation)
wr.DeflateRect(2, 2);
}
else
diff --git a/src/apps/mplayerc/MainFrm.h b/src/apps/mplayerc/MainFrm.h
index 13ecb8cbb..a1c8ee895 100644
--- a/src/apps/mplayerc/MainFrm.h
+++ b/src/apps/mplayerc/MainFrm.h
@@ -33,6 +33,7 @@
#include "PlayerSubresyncBar.h"
#include "PlayerPlaylistBar.h"
#include "PlayerCaptureBar.h"
+#include "PlayerNavigationBar.h"
#include "PlayerShaderEditorBar.h"
#include "EditListEditor.h"
#include "PPageSheet.h"
@@ -259,7 +260,7 @@ class CMainFrame : public CFrameWnd, public CDropTarget
CMenu m_opencds;
CMenu m_filters, m_subtitles, m_audios;
CAutoPtrArray<CMenu> m_filterpopups;
- CMenu m_navaudio, m_navsubtitle, m_navangle;
+ CMenu m_navangle;
CMenu m_navchapters;
CMenu m_favorites;
CMenu m_shaders;
@@ -343,6 +344,7 @@ public:
bool m_fFullScreen;
bool m_fFirstFSAfterLaunchOnFS;
bool m_fHideCursor;
+ CMenu m_navaudio, m_navsubtitle;
CComPtr<IBaseFilter> m_pRefClock; // Adjustable reference clock. GothSync
CComPtr<ISyncClock> m_pSyncClock;
@@ -483,6 +485,7 @@ protected: // control bar embedded members
CPlayerSubresyncBar m_wndSubresyncBar;
CPlayerPlaylistBar m_wndPlaylistBar;
CPlayerCaptureBar m_wndCaptureBar;
+ CPlayerNavigationBar m_wndNavigationBar;
CPlayerShaderEditorBar m_wndShaderEditorBar;
CEditListEditor m_wndEditListEditor;
CList<CSizingControlBar*> m_dockingbars;
@@ -620,7 +623,9 @@ public:
afx_msg void OnUpdateFileClose(CCmdUI* pCmdUI);
afx_msg void OnViewCaptionmenu();
+ afx_msg void OnViewNavigation();
afx_msg void OnUpdateViewCaptionmenu(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateViewNavigation(CCmdUI* pCmdUI);
afx_msg void OnViewControlBar(UINT nID);
afx_msg void OnUpdateViewControlBar(CCmdUI* pCmdUI);
afx_msg void OnViewSubresync();
diff --git a/src/apps/mplayerc/PlayerNavigationBar.cpp b/src/apps/mplayerc/PlayerNavigationBar.cpp
new file mode 100644
index 000000000..bb7e34ef6
--- /dev/null
+++ b/src/apps/mplayerc/PlayerNavigationBar.cpp
@@ -0,0 +1,107 @@
+/*
+ * $Id$
+ *
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "StdAfx.h"
+#include "mplayerc.h"
+#include "mainfrm.h"
+#include "PlayerNavigationBar.h"
+
+
+// CPlayerCaptureBar
+
+IMPLEMENT_DYNAMIC(CPlayerNavigationBar, baseCPlayerNavigationBar)
+CPlayerNavigationBar::CPlayerNavigationBar()
+{
+}
+
+CPlayerNavigationBar::~CPlayerNavigationBar()
+{
+}
+
+BOOL CPlayerNavigationBar::Create(CWnd* pParentWnd)
+{
+ if(!baseCPlayerNavigationBar::Create(_T("Navigation bar"), pParentWnd, 0))
+ return FALSE;
+
+ m_pParent = pParentWnd;
+ m_navdlg.Create(this);
+ m_navdlg.ShowWindow(SW_SHOWNORMAL);
+
+ CRect r;
+ m_navdlg.GetWindowRect(r);
+ m_szMinVert = m_szVert = r.Size();
+ m_szMinHorz = m_szHorz = r.Size();
+ m_szMinFloat = m_szFloat = r.Size();
+ m_bFixedFloat = true;
+ m_szFixedFloat = r.Size();
+
+ return TRUE;
+}
+
+BOOL CPlayerNavigationBar::PreTranslateMessage(MSG* pMsg)
+{
+ if(IsWindow(pMsg->hwnd) && IsVisible() && pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
+ {
+ if(IsDialogMessage(pMsg))
+ return TRUE;
+ }
+
+ return __super::PreTranslateMessage(pMsg);
+}
+
+BEGIN_MESSAGE_MAP(CPlayerNavigationBar, baseCPlayerNavigationBar)
+ ON_WM_SIZE()
+END_MESSAGE_MAP()
+
+// CPlayerShaderEditorBar message handlers
+
+void CPlayerNavigationBar::OnSize(UINT nType, int cx, int cy)
+{
+ __super::OnSize(nType, cx, cy);
+
+ if(::IsWindow(m_navdlg.m_hWnd))
+ {
+ CRect r;
+ GetClientRect(r);
+ m_navdlg.MoveWindow(r);
+ r.DeflateRect(8,8,8,40);
+ m_navdlg.m_ChannelList.MoveWindow(r);
+
+ m_navdlg.m_ComboAudio.SetWindowPos(NULL, r.left,r.bottom +5, 0,0, SWP_NOSIZE | SWP_NOZORDER);
+ m_navdlg.m_ButtonInfo.SetWindowPos(NULL, r.left+90,r.bottom +5, 0,0, SWP_NOSIZE | SWP_NOZORDER);
+ m_navdlg.m_ButtonScan.SetWindowPos(NULL, r.left+145,r.bottom +5, 0,0, SWP_NOSIZE | SWP_NOZORDER);
+ }
+
+
+/*
+ if (cy > 300)
+ m_navdlg.m_ChannelList.Size = System::Drawing::Size( cx - 20, cy - 85 );
+
+
+ if(::IsWindow(m_dlg.m_hWnd))
+ {
+ CRect r;
+ GetClientRect(r);
+ m_dlg.MoveWindow(r);
+ }
+*/
+}
diff --git a/src/apps/mplayerc/PlayerNavigationBar.h b/src/apps/mplayerc/PlayerNavigationBar.h
new file mode 100644
index 000000000..b13ca7ecf
--- /dev/null
+++ b/src/apps/mplayerc/PlayerNavigationBar.h
@@ -0,0 +1,54 @@
+/*
+ * $Id$
+ *
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "PlayerNavigationDialog.h"
+
+#ifndef baseCPlayerNavigationBar
+#define baseCPlayerNavigationBar CSizingControlBarG
+#endif
+
+
+// CPlayerNavigationBar
+
+class CPlayerNavigationBar : public baseCPlayerNavigationBar
+{
+ DECLARE_DYNAMIC(CPlayerNavigationBar)
+
+public:
+ CWnd* m_pParent;
+ CPlayerNavigationBar();
+ virtual ~CPlayerNavigationBar();
+ BOOL Create(CWnd* pParentWnd);
+
+public:
+ CPlayerNavigationDialog m_navdlg;
+
+protected:
+ virtual BOOL PreTranslateMessage(MSG* pMsg);
+
+ DECLARE_MESSAGE_MAP()
+
+public:
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+};
diff --git a/src/apps/mplayerc/PlayerNavigationDialog.cpp b/src/apps/mplayerc/PlayerNavigationDialog.cpp
new file mode 100644
index 000000000..5b2f9a8ae
--- /dev/null
+++ b/src/apps/mplayerc/PlayerNavigationDialog.cpp
@@ -0,0 +1,211 @@
+/*
+ * $Id$
+ *
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "StdAfx.h"
+#include "mplayerc.h"
+#include "mainfrm.h"
+#include "PlayerNavigationDialog.h"
+#include "../../DSUtil/DSUtil.h"
+#include <moreuuids.h>
+
+
+// CPlayerNavigationDialog dialog
+
+// IMPLEMENT_DYNAMIC(CPlayerNavigationDialog, CResizableDialog)
+CPlayerNavigationDialog::CPlayerNavigationDialog()
+ : CResizableDialog(CPlayerNavigationDialog::IDD, NULL)
+{
+}
+
+CPlayerNavigationDialog::~CPlayerNavigationDialog()
+{
+
+}
+
+BOOL CPlayerNavigationDialog::Create(CWnd* pParent)
+{
+ if(!__super::Create(IDD, pParent))
+ return FALSE;
+ m_pParent = pParent;
+ return TRUE;
+}
+
+
+void CPlayerNavigationDialog::DoDataExchange(CDataExchange* pDX)
+{
+ __super::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_LISTCHANNELS, m_ChannelList);
+ DDX_Control(pDX, IDC_NAVIGATION_AUDIO, m_ComboAudio);
+ DDX_Control(pDX, IDC_NAVIGATION_INFO, m_ButtonInfo);
+ DDX_Control(pDX, IDC_NAVIGATION_SCAN, m_ButtonScan);
+}
+
+BOOL CPlayerNavigationDialog::PreTranslateMessage(MSG* pMsg)
+{
+ if(pMsg->message == WM_KEYDOWN)
+ {
+ if(pMsg->wParam == VK_RETURN)
+ {
+ CWnd* pFocused = GetFocus();
+ }
+ }
+ return __super::PreTranslateMessage(pMsg);
+}
+
+BEGIN_MESSAGE_MAP(CPlayerNavigationDialog, CResizableDialog)
+ ON_WM_DESTROY()
+ ON_LBN_SELCHANGE(IDC_LISTCHANNELS, OnChangeChannel)
+ ON_CBN_SELCHANGE(IDC_NAVIGATION_AUDIO, OnSelChangeComboAudio)
+ ON_BN_CLICKED (IDC_NAVIGATION_INFO, OnButtonInfo)
+ ON_BN_CLICKED(IDC_NAVIGATION_SCAN, OnTunerScan)
+
+END_MESSAGE_MAP()
+
+
+// CPlayerNavigationDialog message handlers
+
+BOOL CPlayerNavigationDialog::OnInitDialog()
+{
+ __super::OnInitDialog();
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CPlayerNavigationDialog::OnDestroy()
+{
+ m_ChannelList.ResetContent();
+ __super::OnDestroy();
+}
+
+void CPlayerNavigationDialog::OnChangeChannel()
+{
+ CWnd* TempWnd;
+ int nItem;
+
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ nItem = p_nItems[m_ChannelList.GetCurSel()] + ID_NAVIGATE_CHAP_SUBITEM_START;
+ static_cast<CMainFrame*> (TempWnd) -> OnNavigateChapters(nItem);
+ SetupAudioSwitcherSubMenu();
+}
+
+void CPlayerNavigationDialog::SetupAudioSwitcherSubMenu(CDVBChannel* pChannel)
+{
+ bool bFound = FALSE;
+ int nCurrentChannel;
+ AppSettings& s = AfxGetAppSettings();
+
+ if (!pChannel)
+ {
+ nCurrentChannel = s.DVBLastChannel;
+ POSITION pos = s.DVBChannels.GetHeadPosition();
+ while (pos && !bFound)
+ {
+ pChannel = &s.DVBChannels.GetNext(pos);
+ if (nCurrentChannel == pChannel->GetPrefNumber())
+ {
+ bFound = TRUE;
+ break;
+ }
+ }
+ }
+
+ m_ComboAudio.ResetContent();
+ for (int i=0; i < pChannel->GetAudioCount(); i++)
+ {
+ m_ComboAudio.AddString(pChannel->GetAudio(i)->Language);
+ m_audios[i].PID = pChannel->GetAudio(i)-> PID;
+ m_audios[i].Type = pChannel->GetAudio(i)->Type;
+ m_audios[i].PesType = pChannel->GetAudio(i) -> PesType;
+ m_audios[i].Language = pChannel->GetAudio(i) -> Language;
+ }
+
+ m_ComboAudio.SetCurSel(0); // TODO: managing default languages
+
+}
+
+void CPlayerNavigationDialog::UpdateElementList()
+{
+ int nItem;
+ int nCurrentChannel;
+ AppSettings& s = AfxGetAppSettings();
+
+ if (s.iDefaultCaptureDevice = 1)
+ {
+ m_ChannelList.ResetContent();
+
+ nCurrentChannel = s.DVBLastChannel;
+
+ POSITION pos = s.DVBChannels.GetHeadPosition();
+ while (pos)
+ {
+ CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
+
+ nItem = m_ChannelList.AddString (Channel.GetName());
+ if (nItem < MAX_CHANNELS_ALLOWED)
+ p_nItems [nItem] = Channel.GetPrefNumber();
+ if (nCurrentChannel == Channel.GetPrefNumber())
+ {
+ m_ChannelList.SetCurSel(nItem);
+ SetupAudioSwitcherSubMenu(&Channel);
+ }
+ }
+ }
+
+}
+
+void CPlayerNavigationDialog::UpdatePos(int nID)
+{
+ for (int i=0; i < MAX_CHANNELS_ALLOWED; i++)
+ {
+ if (p_nItems [i] == nID)
+ {
+ m_ChannelList.SetCurSel(i);
+ break;
+ }
+
+ }
+}
+
+void CPlayerNavigationDialog::OnTunerScan()
+{
+ CWnd* TempWnd;
+
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ static_cast<CMainFrame*> (TempWnd) -> OnTunerScan();
+}
+
+void CPlayerNavigationDialog::OnSelChangeComboAudio()
+{
+ UINT nID;
+ CWnd* TempWnd;
+
+ nID = m_ComboAudio.GetCurSel() + ID_NAVIGATE_AUDIO_SUBITEM_START;
+
+ TempWnd = static_cast<CPlayerNavigationBar*> (m_pParent) -> m_pParent;
+ static_cast<CMainFrame*> (TempWnd) -> OnNavigateAudio(nID);
+}
+
+void CPlayerNavigationDialog::OnButtonInfo()
+{
+ // TODO: Retrieve and show channel info
+
+}
diff --git a/src/apps/mplayerc/PlayerNavigationDialog.h b/src/apps/mplayerc/PlayerNavigationDialog.h
new file mode 100644
index 000000000..2a108a3f0
--- /dev/null
+++ b/src/apps/mplayerc/PlayerNavigationDialog.h
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "afxwin.h"
+#include "afxcmn.h"
+#include "../../filters/transform/bufferfilter/bufferfilter.h"
+#include "FloatEdit.h"
+#include "DVBChannel.h"
+
+#define MAX_CHANNELS_ALLOWED 200
+
+// CPlayerNavigationDialog dialog
+
+class CPlayerNavigationDialog : public CResizableDialog //CDialog
+{
+
+public:
+ CPlayerNavigationDialog(); // standard constructor
+ virtual ~CPlayerNavigationDialog();
+
+ BOOL Create(CWnd* pParent = NULL);
+ void UpdateElementList();
+ void UpdatePos(int nID);
+ void SetupAudioSwitcherSubMenu(CDVBChannel* Channel = NULL);
+ int p_nItems[MAX_CHANNELS_ALLOWED];
+ DVBStreamInfo m_audios[DVB_MAX_AUDIO];
+
+// Dialog Data
+ enum { IDD = IDD_NAVIGATION_DLG };
+
+ CListBox m_ChannelList;
+ CComboBox m_ComboAudio;
+ CButton m_ButtonInfo;
+ CButton m_ButtonScan;
+ CWnd* m_pParent;
+// CMenu m_subtitles, m_audios;
+
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ virtual BOOL PreTranslateMessage(MSG* pMsg);
+ virtual BOOL OnInitDialog();
+
+ DECLARE_MESSAGE_MAP()
+
+public:
+ afx_msg void OnDestroy();
+ afx_msg void OnChangeChannel();
+ afx_msg void OnTunerScan();
+ afx_msg void OnSelChangeComboAudio();
+ afx_msg void OnButtonInfo();
+};
diff --git a/src/apps/mplayerc/SettingsDefines.h b/src/apps/mplayerc/SettingsDefines.h
index 16938feee..61baec5b2 100644
--- a/src/apps/mplayerc/SettingsDefines.h
+++ b/src/apps/mplayerc/SettingsDefines.h
@@ -102,6 +102,7 @@
#define IDS_RS_DOWNSAMPLETO441 _T("DownSampleTo441")
#define IDS_RS_ENABLEAUDIOSWITCHER _T("EnableAudioSwitcher")
#define IDS_RS_HIDECAPTIONMENU _T("HideCaptionMenu")
+#define IDS_RS_HIDENAVIGATION _T("HideNavigation")
#define IDS_RS_DEFAULTVIDEOFRAME _T("DefaultVideoFrame")
#define IDS_RS_REMEMBERWINDOWSIZE _T("RememberWindowSize")
#define IDS_RS_REALMEDIARENDERLESS _T("RealMediaRenderless")
diff --git a/src/apps/mplayerc/mplayerc.br.rc b/src/apps/mplayerc/mplayerc.br.rc
index 81efa0946..446b73886 100644
--- a/src/apps/mplayerc/mplayerc.br.rc
+++ b/src/apps/mplayerc/mplayerc.br.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.by.rc b/src/apps/mplayerc/mplayerc.by.rc
index 67da13374..f93499619 100644
--- a/src/apps/mplayerc/mplayerc.by.rc
+++ b/src/apps/mplayerc/mplayerc.by.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp
index 9ff8bcece..044a845b5 100644
--- a/src/apps/mplayerc/mplayerc.cpp
+++ b/src/apps/mplayerc/mplayerc.cpp
@@ -1630,6 +1630,7 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave)
if(!fInitialized) return;
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, fHideCaptionMenu);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDENAVIGATION, fHideNavigation);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_CONTROLSTATE, nCS);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DEFAULTVIDEOFRAME, iDefaultVideoSize);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_KEEPASPECTRATIO, fKeepAspectRatio);
@@ -2019,6 +2020,7 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave)
CreateCommands();
fHideCaptionMenu = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, 0);
+ fHideNavigation = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDENAVIGATION, 0);
nCS = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_CONTROLSTATE, CS_SEEKBAR|CS_TOOLBAR|CS_STATUSBAR);
iDefaultVideoSize = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DEFAULTVIDEOFRAME, DVS_FROMINSIDE);
fKeepAspectRatio = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_KEEPASPECTRATIO, TRUE);
diff --git a/src/apps/mplayerc/mplayerc.cz.rc b/src/apps/mplayerc/mplayerc.cz.rc
index 34cdd83db..fbf898631 100644
--- a/src/apps/mplayerc/mplayerc.cz.rc
+++ b/src/apps/mplayerc/mplayerc.cz.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.de.rc b/src/apps/mplayerc/mplayerc.de.rc
index e38a4b66c..11a853a77 100644
--- a/src/apps/mplayerc/mplayerc.de.rc
+++ b/src/apps/mplayerc/mplayerc.de.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.es.rc b/src/apps/mplayerc/mplayerc.es.rc
index 9efc9b08e..dc370bc31 100644
--- a/src/apps/mplayerc/mplayerc.es.rc
+++ b/src/apps/mplayerc/mplayerc.es.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.fr.rc b/src/apps/mplayerc/mplayerc.fr.rc
index a1727f4af..f6c37b607 100644
--- a/src/apps/mplayerc/mplayerc.fr.rc
+++ b/src/apps/mplayerc/mplayerc.fr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.h b/src/apps/mplayerc/mplayerc.h
index bd89be010..ad1193316 100644
--- a/src/apps/mplayerc/mplayerc.h
+++ b/src/apps/mplayerc/mplayerc.h
@@ -522,6 +522,7 @@ public:
int nCS;
bool fHideCaptionMenu;
+ bool fHideNavigation;
int iDefaultVideoSize;
bool fKeepAspectRatio;
bool fCompMonDeskARDiff;
diff --git a/src/apps/mplayerc/mplayerc.hu.rc b/src/apps/mplayerc/mplayerc.hu.rc
index f957af2d7..d54c55516 100644
--- a/src/apps/mplayerc/mplayerc.hu.rc
+++ b/src/apps/mplayerc/mplayerc.hu.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.it.rc b/src/apps/mplayerc/mplayerc.it.rc
index 5e0a3834a..b574143f9 100644
--- a/src/apps/mplayerc/mplayerc.it.rc
+++ b/src/apps/mplayerc/mplayerc.it.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.kr.rc b/src/apps/mplayerc/mplayerc.kr.rc
index 0674ccf84..4ade817f8 100644
--- a/src/apps/mplayerc/mplayerc.kr.rc
+++ b/src/apps/mplayerc/mplayerc.kr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.pl.rc b/src/apps/mplayerc/mplayerc.pl.rc
index b34869842..f2a85abfc 100644
--- a/src/apps/mplayerc/mplayerc.pl.rc
+++ b/src/apps/mplayerc/mplayerc.pl.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc
index a4fdf41da..18ba41fdf 100644
--- a/src/apps/mplayerc/mplayerc.rc
+++ b/src/apps/mplayerc/mplayerc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.ru.rc b/src/apps/mplayerc/mplayerc.ru.rc
index f7cb271d7..940d8799c 100644
--- a/src/apps/mplayerc/mplayerc.ru.rc
+++ b/src/apps/mplayerc/mplayerc.ru.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.sc.rc b/src/apps/mplayerc/mplayerc.sc.rc
index 068c27d39..a6b12df85 100644
--- a/src/apps/mplayerc/mplayerc.sc.rc
+++ b/src/apps/mplayerc/mplayerc.sc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.sk.rc b/src/apps/mplayerc/mplayerc.sk.rc
index 70d5fd841..8754b56ae 100644
--- a/src/apps/mplayerc/mplayerc.sk.rc
+++ b/src/apps/mplayerc/mplayerc.sk.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.sv.rc b/src/apps/mplayerc/mplayerc.sv.rc
index 7bfb5153f..64585ee0d 100644
--- a/src/apps/mplayerc/mplayerc.sv.rc
+++ b/src/apps/mplayerc/mplayerc.sv.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.tc.rc b/src/apps/mplayerc/mplayerc.tc.rc
index 4cea35419..852dff966 100644
--- a/src/apps/mplayerc/mplayerc.tc.rc
+++ b/src/apps/mplayerc/mplayerc.tc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.tr.rc b/src/apps/mplayerc/mplayerc.tr.rc
index dfb2a3e46..edf9b06b0 100644
--- a/src/apps/mplayerc/mplayerc.tr.rc
+++ b/src/apps/mplayerc/mplayerc.tr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.ua.rc b/src/apps/mplayerc/mplayerc.ua.rc
index c7cc251ea..6502f8c43 100644
--- a/src/apps/mplayerc/mplayerc.ua.rc
+++ b/src/apps/mplayerc/mplayerc.ua.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.vcproj b/src/apps/mplayerc/mplayerc.vcproj
index 05b44c651..324fcc54f 100644
--- a/src/apps/mplayerc/mplayerc.vcproj
+++ b/src/apps/mplayerc/mplayerc.vcproj
@@ -713,6 +713,14 @@
>
</File>
<File
+ RelativePath=".\PlayerNavigationBar.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PlayerNavigationDialog.cpp"
+ >
+ </File>
+ <File
RelativePath="PlayerPlaylistBar.cpp"
>
</File>
@@ -1330,6 +1338,14 @@
>
</File>
<File
+ RelativePath=".\PlayerNavigationBar.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PlayerNavigationDialog.h"
+ >
+ </File>
+ <File
RelativePath="PlayerPlaylistBar.h"
>
</File>
diff --git a/src/apps/mplayerc/resource.h b/src/apps/mplayerc/resource.h
index 9879b65da..04199a1d8 100644
--- a/src/apps/mplayerc/resource.h
+++ b/src/apps/mplayerc/resource.h
@@ -333,6 +333,7 @@
#define IDD_PPAGECAPTURE 10054
#define IDD_PPAGESYNC 10055
#define IDD_PPAGEFULLSCREEN 10056
+#define IDD_NAVIGATION 10057
#define IDC_COMBO1 11000
#define IDC_COMBO2 11001
#define IDC_COMBO3 11002
@@ -479,6 +480,7 @@
#define IDC_DSVMR9LOADMIXER2 12135
#define IDC_BUTTON_MI 12136
#define IDC_MIEDIT 12137
+#define IDC_LISTCHANNELS 12138
#define IDS_SRC_RADGT 14000
#define IDS_SRC_CDDA 14001
#define IDS_SRC_AVI 14002
@@ -610,6 +612,7 @@
#define IDF_SHADER_DENOISE 20003
#define IDF_SHADER_SHARPEN_COMPLEX2 20004
#define IDS_AG_RESET_STATS 20005
+#define IDD_NAVIGATION_DLG 20005
#define IDC_FULLSCR_COMBO 22000
#define IDC_AUTO_REFRESHRATE_CHECK 22001
#define IDC_FULLSCREEN_MONITOR_CHECK 22002
@@ -649,6 +652,10 @@
#define IDC_CONTROLLIMIT 22038
#define IDC_SYNCDISPLAY2 22039
#define IDC_SYNCNEAREST 22040
+#define IDC_NAVIGATION_AUDIO 22043
+#define IDC_NAVIGATION_SCAN 22044
+#define IDC_LIST_CHANNELS 22045
+#define IDC_NAVIGATION_INFO 22048
#define ID_SUB_DELAY_DOWN 24000
#define ID_SUB_DELAY_UP 24001
#define IDS_MPLAYERC_104 24002
@@ -1163,6 +1170,10 @@
#define ID_AFTERPLAYBACK_EXIT 33411
#define ID_AFTERPLAYBACK_ONCE 33412
#define ID_AFTERPLAYBACK_EVERYTIME 33413
+#define ID_VIEW_NAVIGATION 33414
+#define ID_NAVIGATE_JUMPTO 33415
+#define ID_NAVIGATE_AUDIOLANGUAGE 33416
+#define ID_NAVIGATE_SUBTITLELANGUAGE 33420
#define IDTB_BUTTON1 40001
#define IDTB_BUTTON2 40002
#define IDTB_BUTTON3 40003
@@ -1171,34 +1182,34 @@
#define IDR_TB_PLAY 41001
#define IDR_TB_PAUSE 41002
#define IDR_TB_STOP 41003
-#define IDS_INTERLACED 41004
-#define IDS_HZ 41005
-#define IDS_FRONT_LEFT 41006
-#define IDS_FRONT_RIGHT 41007
-#define IDS_FRONT_CENTER 41008
-#define IDS_LOW_FREQUENCY 41009
-#define IDS_BACK_LEFT 41010
-#define IDS_BACK_RIGHT 41011
-#define IDS_FRONT_LEFT_OF_CENTER 41012
-#define IDS_FRONT_RIGHT_OF_CENTER 41013
-#define IDS_BACK_CENTER 41014
-#define IDS_SIDE_LEFT 41015
-#define IDS_SIDE_RIGHT 41016
-#define IDS_TOP_CENTER 41017
-#define IDS_TOP_FRONT_LEFT 41018
-#define IDS_TOP_FRONT_CENTER 41019
-#define IDS_TOP_FRONT_RIGHT 41020
-#define IDS_TOP_BACK_LEFT 41021
-#define IDS_TOP_BACK_CENTER 41022
-#define IDS_TOP_BACK_RIGHT 41023
-#define IDS_LOGO_AUTOR 41024
-#define IDC_RESTORERESCHECK 41025
+#define IDS_INTERLACED 41004
+#define IDS_HZ 41005
+#define IDS_FRONT_LEFT 41006
+#define IDS_FRONT_RIGHT 41007
+#define IDS_FRONT_CENTER 41008
+#define IDS_LOW_FREQUENCY 41009
+#define IDS_BACK_LEFT 41010
+#define IDS_BACK_RIGHT 41011
+#define IDS_FRONT_LEFT_OF_CENTER 41012
+#define IDS_FRONT_RIGHT_OF_CENTER 41013
+#define IDS_BACK_CENTER 41014
+#define IDS_SIDE_LEFT 41015
+#define IDS_SIDE_RIGHT 41016
+#define IDS_TOP_CENTER 41017
+#define IDS_TOP_FRONT_LEFT 41018
+#define IDS_TOP_FRONT_CENTER 41019
+#define IDS_TOP_FRONT_RIGHT 41020
+#define IDS_TOP_BACK_LEFT 41021
+#define IDS_TOP_BACK_CENTER 41022
+#define IDS_TOP_BACK_RIGHT 41023
+#define IDS_LOGO_AUTOR 41024
+#define IDC_RESTORERESCHECK 41025
-#define IDS_VDF_DXVACOMPATIBILITY 41100
-#define IDS_VDF_DXVA_FULLCHECK 41101
-#define IDS_VDF_DXVA_REFONLY 41102
-#define IDS_VDF_DXVA_SARONLY 41103
-#define IDS_VDF_DXVA_NOCHECK 41104
+#define IDS_VDF_DXVACOMPATIBILITY 41100
+#define IDS_VDF_DXVA_FULLCHECK 41101
+#define IDS_VDF_DXVA_REFONLY 41102
+#define IDS_VDF_DXVA_SARONLY 41103
+#define IDS_VDF_DXVA_NOCHECK 41104
// Next default values for new objects
//