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:
authorpovaddict <povaddict@users.sourceforge.net>2010-02-10 02:16:44 +0300
committerpovaddict <povaddict@users.sourceforge.net>2010-02-10 02:16:44 +0300
commit726a91b12a7524e45e7a901c9e4883af5b1bffe6 (patch)
treef5d25e3b2e84c92f4901280c73d5d3d7e6c3cd19 /src/DSUtil/HdmvClipInfo.h
parent02183f6e47ad4ea1057de9950482f291f2ae4290 (diff)
Rename several directories to use MixedCase instead of lowercase.
They now mostly match the case used in #includes, and they're consistent with the names of the .h files they contain. git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1648 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/DSUtil/HdmvClipInfo.h')
-rw-r--r--src/DSUtil/HdmvClipInfo.h160
1 files changed, 160 insertions, 0 deletions
diff --git a/src/DSUtil/HdmvClipInfo.h b/src/DSUtil/HdmvClipInfo.h
new file mode 100644
index 000000000..8a53d81b4
--- /dev/null
+++ b/src/DSUtil/HdmvClipInfo.h
@@ -0,0 +1,160 @@
+/*
+ * $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 "Mpeg2Def.h"
+
+enum BDVM_VideoFormat
+{
+ BDVM_VideoFormat_Unknown = 0,
+ BDVM_VideoFormat_480i = 1,
+ BDVM_VideoFormat_576i = 2,
+ BDVM_VideoFormat_480p = 3,
+ BDVM_VideoFormat_1080i = 4,
+ BDVM_VideoFormat_720p = 5,
+ BDVM_VideoFormat_1080p = 6,
+ BDVM_VideoFormat_576p = 7,
+};
+
+enum BDVM_FrameRate
+{
+ BDVM_FrameRate_Unknown = 0,
+ BDVM_FrameRate_23_976 = 1,
+ BDVM_FrameRate_24 = 2,
+ BDVM_FrameRate_25 = 3,
+ BDVM_FrameRate_29_97 = 4,
+ BDVM_FrameRate_50 = 6,
+ BDVM_FrameRate_59_94 = 7
+};
+
+enum BDVM_AspectRatio
+{
+ BDVM_AspectRatio_Unknown = 0,
+ BDVM_AspectRatio_4_3 = 2,
+ BDVM_AspectRatio_16_9 = 3,
+ BDVM_AspectRatio_2_21 = 4
+};
+
+enum BDVM_ChannelLayout
+{
+ BDVM_ChannelLayout_Unknown = 0,
+ BDVM_ChannelLayout_MONO = 1,
+ BDVM_ChannelLayout_STEREO = 3,
+ BDVM_ChannelLayout_MULTI = 6,
+ BDVM_ChannelLayout_COMBO = 12
+};
+
+enum BDVM_SampleRate
+{
+ BDVM_SampleRate_Unknown = 0,
+ BDVM_SampleRate_48 = 1,
+ BDVM_SampleRate_96 = 4,
+ BDVM_SampleRate_192 = 5,
+ BDVM_SampleRate_48_192 = 12,
+ BDVM_SampleRate_48_96 = 14
+};
+
+typedef unsigned char uint8;
+typedef signed char int8;
+
+typedef unsigned short uint16;
+typedef short int16;
+
+typedef unsigned long uint32;
+typedef long int32;
+
+
+
+class CHdmvClipInfo
+{
+public:
+
+ struct Stream
+ {
+ Stream()
+ {
+ memset(this, 0, sizeof(*this));
+ }
+ SHORT m_PID;
+ PES_STREAM_TYPE m_Type;
+ char m_LanguageCode[4];
+ LCID m_LCID;
+
+ // Valid for video types
+ BDVM_VideoFormat m_VideoFormat;
+ BDVM_FrameRate m_FrameRate;
+ BDVM_AspectRatio m_AspectRatio;
+ // Valid for audio types
+ BDVM_ChannelLayout m_ChannelLayout;
+ BDVM_SampleRate m_SampleRate;
+
+ LPCTSTR Format();
+ };
+
+ struct PlaylistItem
+ {
+ CString m_strFileName;
+ REFERENCE_TIME m_rtIn;
+ REFERENCE_TIME m_rtOut;
+
+ REFERENCE_TIME Duration()
+ {
+ return m_rtOut - m_rtIn;
+ }
+
+ bool operator == (const PlaylistItem& pi) const
+ {
+ return pi.m_strFileName == m_strFileName;
+ }
+ };
+
+ CHdmvClipInfo(void);
+ ~CHdmvClipInfo();
+
+ HRESULT ReadInfo(LPCTSTR strFile);
+ Stream* FindStream(SHORT wPID);
+ bool IsHdmv() { return m_bIsHdmv; };
+ int GetStreamNumber() { return int(m_Streams.GetCount()); };
+ Stream* GetStreamByIndex(int nIndex){ return (unsigned(nIndex) < m_Streams.GetCount()) ? &m_Streams[nIndex] : NULL; };
+
+ HRESULT FindMainMovie(LPCTSTR strFolder, CString& strPlaylistFile, CAtlList<PlaylistItem>& MainPlaylist);
+ HRESULT ReadPlaylist(CString strPlaylistFile, REFERENCE_TIME& rtDuration, CAtlList<PlaylistItem>& Playlist);
+
+private :
+ DWORD SequenceInfo_start_address;
+ DWORD ProgramInfo_start_address;
+
+ HANDLE m_hFile;
+
+
+ CAtlArray<Stream> m_Streams;
+ bool m_bIsHdmv;
+
+ DWORD ReadDword();
+ SHORT ReadShort();
+ BYTE ReadByte();
+ void ReadBuffer(BYTE* pBuff, int nLen);
+
+ HRESULT ReadProgramInfo();
+ HRESULT CloseFile(HRESULT hr);
+};