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:
authorclsid2 <clsid2@users.sourceforge.net>2017-06-04 16:16:40 +0300
committerKacper Michajłow <kasper93@gmail.com>2017-07-23 00:10:23 +0300
commit6a41e2be340a28cc076d7a01c06c60fbd38dbb45 (patch)
tree86ec9ec021c0c50e7728b8b711a5f39454629118
parent588ffc6d6702132fa4eb75e3a5c6fffa1137a65d (diff)
Split MPEG source filter into PS and TS variant.
This makes it easier to use an external source filter for one of these variants. Signed-off-by: clsid2 <clsid2@users.sourceforge.net>
-rw-r--r--docs/Changelog.txt1
-rw-r--r--src/mpc-hc/AppSettings.cpp1
-rw-r--r--src/mpc-hc/FGManager.cpp25
-rw-r--r--src/mpc-hc/FilterEnum.h3
-rw-r--r--src/mpc-hc/MainFrm.cpp2
-rw-r--r--src/mpc-hc/PPageInternalFilters.cpp5
-rw-r--r--src/mpc-hc/PlayerPlaylistBar.cpp2
7 files changed, 25 insertions, 14 deletions
diff --git a/docs/Changelog.txt b/docs/Changelog.txt
index 4878d8b8d..4faef0db2 100644
--- a/docs/Changelog.txt
+++ b/docs/Changelog.txt
@@ -14,6 +14,7 @@ next version - not released yet
+ Automatic encoding option for saving playlists. Uses UTF8 encoding when applicable.
* Updated Little CMS to v2.9 (4be486f)
* Updated sanear to v0.3
+* Split internal MPEG source filter option into a PS and TS variant
! Fix text subtitle rendering in Avisynth
! Ticket #2539: Subtitle downloader dialog could be opened on disabled monitor
! Ticket #6231: Fix hash calculation for files with Unicode paths. This fixes search on
diff --git a/src/mpc-hc/AppSettings.cpp b/src/mpc-hc/AppSettings.cpp
index a841a4b26..8b69ea6cf 100644
--- a/src/mpc-hc/AppSettings.cpp
+++ b/src/mpc-hc/AppSettings.cpp
@@ -267,6 +267,7 @@ CAppSettings::CAppSettings()
#endif
#if INTERNAL_SOURCEFILTER_MPEG
SrcFiltersKeys[SRC_MPEG] = FilterKey(_T("SRC_MPEG"), true);
+ SrcFiltersKeys[SRC_MPEGTS] = FilterKey(_T("SRC_MPEGTS"), true);
#endif
#if INTERNAL_SOURCEFILTER_MPEGAUDIO
SrcFiltersKeys[SRC_MPA] = FilterKey(_T("SRC_MPA"), true);
diff --git a/src/mpc-hc/FGManager.cpp b/src/mpc-hc/FGManager.cpp
index 065239447..5d537871d 100644
--- a/src/mpc-hc/FGManager.cpp
+++ b/src/mpc-hc/FGManager.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1522,17 +1522,22 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
if (src[SRC_MPEG]) {
pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,16,FFFFFFFFF100010001800001FFFFFFFF,000001BA2100010001800001000001BB"));
pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,5,FFFFFFFFC0,000001BA40"));
- pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,1,,47,188,1,,47,376,1,,47"));
- pFGLAVSplitterSource->m_chkbytes.AddTail(_T("4,1,,47,196,1,,47,388,1,,47"));
pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,4,,54467263,1660,1,,47"));
pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,8,fffffc00ffe00000,4156000055000000"));
- pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,8,,4D504C5330323030")); // MPLS0200
- pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,8,,4D504C5330313030")); // MPLS0100
- pFGLAVSplitterSource->m_extensions.AddTail(_T(".ts")); // for some broken .ts
pFGLAVSplitterSource->AddEnabledFormat("mpeg");
- pFGLAVSplitterSource->AddEnabledFormat("mpegts");
pFGLAVSplitterSource->AddEnabledFormat("mpegraw");
}
+ if (src[SRC_MPEGTS]) {
+ pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,1,,47,188,1,,47,376,1,,47"));
+ pFGLAVSplitterSource->m_chkbytes.AddTail(_T("4,1,,47,196,1,,47,388,1,,47"));
+ pFGLAVSplitterSource->m_extensions.AddTail(_T(".ts")); // for some broken .ts
+ pFGLAVSplitterSource->AddEnabledFormat("mpegts");
+ }
+ if (src[SRC_MPEG] || src[SRC_MPEGTS]) {
+ // for Blu-ray playback
+ pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,8,,4D504C5330323030")); // MPLS0200
+ pFGLAVSplitterSource->m_chkbytes.AddTail(_T("0,8,,4D504C5330313030")); // MPLS0100
+ }
#endif
#if INTERNAL_SOURCEFILTER_AC3
@@ -1685,12 +1690,14 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
if (src[SRC_MPEG]) {
pFGLAVSplitter->AddType(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG1System);
pFGLAVSplitter->AddType(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG2_PROGRAM);
- pFGLAVSplitter->AddType(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG2_TRANSPORT);
pFGLAVSplitter->AddType(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG2_PVA);
pFGLAVSplitter->AddEnabledFormat("mpeg");
- pFGLAVSplitter->AddEnabledFormat("mpegts");
pFGLAVSplitter->AddEnabledFormat("mpegraw");
}
+ if (src[SRC_MPEGTS]) {
+ pFGLAVSplitter->AddType(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG2_TRANSPORT);
+ pFGLAVSplitter->AddEnabledFormat("mpegts");
+ }
#endif
#if INTERNAL_SOURCEFILTER_AC3
diff --git a/src/mpc-hc/FilterEnum.h b/src/mpc-hc/FilterEnum.h
index 6f53b9679..105f8584c 100644
--- a/src/mpc-hc/FilterEnum.h
+++ b/src/mpc-hc/FilterEnum.h
@@ -1,5 +1,5 @@
/*
- * (C) 2010-2015 see Authors.txt
+ * (C) 2010-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -84,6 +84,7 @@ enum SOURCE_FILTER {
#endif
#if INTERNAL_SOURCEFILTER_MPEG
SRC_MPEG,
+ SRC_MPEGTS,
#endif
#if INTERNAL_SOURCEFILTER_MPEGAUDIO
SRC_MPA,
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp
index fd2000ad4..cf72bc7cc 100644
--- a/src/mpc-hc/MainFrm.cpp
+++ b/src/mpc-hc/MainFrm.cpp
@@ -16495,7 +16495,7 @@ bool CMainFrame::OpenBD(CString Path)
#if INTERNAL_SOURCEFILTER_MPEG
const CAppSettings& s = AfxGetAppSettings();
- bool InternalMpegSplitter = s.SrcFilters[SRC_MPEG];
+ bool InternalMpegSplitter = s.SrcFilters[SRC_MPEG] || s.SrcFilters[SRC_MPEGTS];
#else
bool InternalMpegSplitter = false;
#endif
diff --git a/src/mpc-hc/PPageInternalFilters.cpp b/src/mpc-hc/PPageInternalFilters.cpp
index 1e812abf8..3a8857956 100644
--- a/src/mpc-hc/PPageInternalFilters.cpp
+++ b/src/mpc-hc/PPageInternalFilters.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -389,7 +389,8 @@ void CPPageInternalFilters::InitFiltersList()
#endif
#if INTERNAL_SOURCEFILTER_MPEG
if (bLAVSplitterIsAvailable) {
- m_filters.Add(filter_t(_T("MPEG PS/TS/PVA"), SOURCE_FILTER, SRC_MPEG, IDS_INTERNAL_LAVF));
+ m_filters.Add(filter_t(_T("MPEG PS/PVA"), SOURCE_FILTER, SRC_MPEG, IDS_INTERNAL_LAVF));
+ m_filters.Add(filter_t(_T("MPEG TS"), SOURCE_FILTER, SRC_MPEGTS, IDS_INTERNAL_LAVF));
}
#endif
#if INTERNAL_SOURCEFILTER_ASF
diff --git a/src/mpc-hc/PlayerPlaylistBar.cpp b/src/mpc-hc/PlayerPlaylistBar.cpp
index 13abde361..bd38393ca 100644
--- a/src/mpc-hc/PlayerPlaylistBar.cpp
+++ b/src/mpc-hc/PlayerPlaylistBar.cpp
@@ -307,7 +307,7 @@ void CPlayerPlaylistBar::ParsePlayList(CAtlList<CString>& fns, CAtlList<CString>
return;
} else {
#if INTERNAL_SOURCEFILTER_MPEG
- if (ct == "application/x-bdmv-playlist" && s.SrcFilters[SRC_MPEG]) {
+ if (ct == "application/x-bdmv-playlist" && (s.SrcFilters[SRC_MPEG] || s.SrcFilters[SRC_MPEGTS])) {
ParseBDMVPlayList(fns.GetHead());
return;
}