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--include/stdafx_common.h13
-rw-r--r--include/stdafx_common_afx.h15
-rw-r--r--include/stdafx_common_afx2.h26
-rw-r--r--include/stdafx_common_dshow.h3
-rw-r--r--src/DSUtil/DSUtil.cpp1
-rw-r--r--src/DSUtil/H264Nalu.cpp3
-rw-r--r--src/DSUtil/stdafx.h21
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPI.cpp15
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPI.h12
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPI.rc99
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPI.vcxproj22
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPI.vcxproj.filters19
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPIDlg.cpp22
-rw-r--r--src/apps/MPCTestAPI/MPCTestAPIDlg.h19
-rw-r--r--src/apps/MPCTestAPI/res/MPCTestAPI.exe.manifest47
-rw-r--r--src/apps/MPCTestAPI/res/RegisterCopyData.icobin1078 -> 67777 bytes
-rw-r--r--src/apps/MPCTestAPI/res/RegisterCopyData.rc213
-rw-r--r--src/apps/MPCTestAPI/resource.h1
-rw-r--r--src/apps/MPCTestAPI/stdafx.h24
-rw-r--r--src/apps/mplayerc/AppSettings.h16
-rw-r--r--src/apps/mplayerc/Changelog.txt11
-rw-r--r--src/apps/mplayerc/FGFilter.cpp6
-rw-r--r--src/apps/mplayerc/MainFrm.cpp20
-rw-r--r--src/apps/mplayerc/MediaFormats.cpp3
-rw-r--r--src/apps/mplayerc/Mpeg2SectionData.cpp3
-rw-r--r--src/apps/mplayerc/PPageInternalFilters.cpp1
-rw-r--r--src/apps/mplayerc/PlayerCaptureDialog.h10
-rw-r--r--src/apps/mplayerc/PlayerPlaylistBar.cpp11
-rw-r--r--src/apps/mplayerc/SaveDlg.cpp9
-rw-r--r--src/apps/mplayerc/ShockwaveGraph.cpp2
-rw-r--r--src/apps/mplayerc/TunerScanDlg.cpp2
-rw-r--r--src/apps/mplayerc/VMROSD.h1
-rw-r--r--src/apps/mplayerc/WebServer.cpp1
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/aac.icobin412846 -> 56570 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ac3.icobin0 -> 55823 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/aiff.icobin412846 -> 53661 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/alac.icobin412846 -> 55504 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/amr.icobin0 -> 54833 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ape.icobin0 -> 56143 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/au.icobin412846 -> 52868 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/avi.icobin412846 -> 53273 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/bik.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/bink.icobin0 -> 55478 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/cda.icobin412846 -> 57789 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/d2v.icobin412846 -> 56838 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/dat.icobin0 -> 55684 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/dsm.icobin412846 -> 58359 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/dts.icobin0 -> 56894 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/dvda.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/dvdf.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/flac.icobin412846 -> 55394 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/flic.icobin412846 -> 53694 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/flv.icobin412846 -> 53538 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/icon_list.txt70
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ifo.icobin0 -> 55198 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ifv.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ivf.icobin0 -> 53020 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/jpeg.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mid.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/midi.icobin0 -> 56261 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mka.icobin412846 -> 54844 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mkv.icobin412846 -> 54084 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mov.icobin412846 -> 54854 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mp3.icobin412846 -> 58005 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mp4.icobin412846 -> 56848 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mpa.icobin412846 -> 57161 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mpc.icobin412846 -> 57975 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mpeg.icobin0 -> 57846 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/mpg.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ofr.icobin0 -> 57683 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ogg.icobin412846 -> 57246 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ogm.icobin412846 -> 56709 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/other.icobin412846 -> 57144 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/playlist.icobin0 -> 56421 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/plc.icobin412846 -> 0 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ra.icobin412846 -> 53881 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ratdvd.icobin412846 -> 56371 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/rm.icobin412846 -> 54628 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/rt.icobin412846 -> 52609 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/smk.icobin0 -> 58529 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/swf.icobin412846 -> 57749 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/ts.icobin0 -> 53206 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/tta.icobin0 -> 53788 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/vob.icobin0 -> 58315 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/wav.icobin412846 -> 54138 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/webm.icobin0 -> 58037 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/wma.icobin412846 -> 55016 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/wmv.icobin412846 -> 54540 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/icons/wv.icobin0 -> 53435 bytes
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.cpp318
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.h89
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.rc68
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.vcproj65
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj29
-rw-r--r--src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj.filters61
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.br.rcbin349802 -> 349902 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.by.rcbin344304 -> 344404 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ca.rcbin348100 -> 348200 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.cz.rcbin344826 -> 344926 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.de.rcbin346602 -> 346702 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.es.rcbin350146 -> 350246 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.fr.rcbin350264 -> 350364 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.hu.rcbin350616 -> 350716 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.hy.rcbin344360 -> 344460 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.it.rcbin346638 -> 346738 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ja.rcbin319720 -> 319820 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.kr.rcbin316930 -> 317030 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.nl.rcbin344790 -> 344890 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.pl.rcbin354378 -> 354478 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ru.rcbin346534 -> 346634 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sc.rcbin310276 -> 310376 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sk.rcbin347124 -> 347224 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sv.rcbin342386 -> 342486 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.tc.rcbin312272 -> 312372 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.tr.rcbin343082 -> 343182 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ua.rcbin344796 -> 344896 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txtbin142134 -> 142234 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txtbin136990 -> 137090 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txtbin140314 -> 140414 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txtbin137260 -> 137360 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txtbin138878 -> 138978 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txtbin142710 -> 142810 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txtbin143706 -> 143806 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txtbin143576 -> 143676 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txtbin134980 -> 135080 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txtbin138290 -> 138390 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txtbin107046 -> 107146 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txtbin104242 -> 104342 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txtbin136750 -> 136850 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txtbin147698 -> 147798 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.rc.txtbin130062 -> 130162 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txtbin139338 -> 139438 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txtbin96344 -> 96444 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txtbin140684 -> 140784 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txtbin133582 -> 133682 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txtbin97694 -> 97794 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txtbin134850 -> 134950 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txtbin137456 -> 137556 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.rcbin337758 -> 337858 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.vcxproj6
-rw-r--r--src/apps/mplayerc/mplayerc.vcxproj.filters9
-rw-r--r--src/apps/mplayerc/resource.hbin120626 -> 120720 bytes
-rw-r--r--src/apps/mplayerc/stdafx.h44
-rw-r--r--src/common.props8
-rw-r--r--src/filters/BaseClasses/BaseClasses.vcxproj4
-rw-r--r--src/filters/BaseClasses/combase.cpp1
-rw-r--r--src/filters/BaseClasses/combase.h11
-rw-r--r--src/filters/BaseClasses/cprop.cpp1
-rw-r--r--src/filters/BaseClasses/ctlutil.cpp1
-rw-r--r--src/filters/BaseClasses/dllsetup.cpp1
-rw-r--r--src/filters/BaseClasses/transip.cpp21
-rw-r--r--src/filters/BaseClasses/winutil.cpp6
-rw-r--r--src/filters/BaseClasses/wxutil.cpp6
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj14
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters9
-rw-r--r--src/filters/muxer/DSMMuxer/stdafx.h23
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj14
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters9
-rw-r--r--src/filters/muxer/MatroskaMuxer/stdafx.h23
-rw-r--r--src/filters/muxer/WavDest/WavDest.vcxproj14
-rw-r--r--src/filters/muxer/WavDest/WavDest.vcxproj.filters9
-rw-r--r--src/filters/muxer/WavDest/stdafx.h18
-rw-r--r--src/filters/parser/AviSplitter/AviFile.cpp52
-rw-r--r--src/filters/parser/AviSplitter/AviReportWnd.cpp14
-rw-r--r--src/filters/parser/AviSplitter/AviSplitter.cpp16
-rw-r--r--src/filters/parser/AviSplitter/AviSplitter.vcxproj14
-rw-r--r--src/filters/parser/AviSplitter/AviSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/AviSplitter/stdafx.h22
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp2
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp207
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitterFileEx.h33
-rw-r--r--src/filters/parser/BaseSplitter/stdafx.h21
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.vcxproj14
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/DSMSplitter/stdafx.h19
-rw-r--r--src/filters/parser/DiracSplitter/DiracSplitter.vcxproj12
-rw-r--r--src/filters/parser/DiracSplitter/DiracSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/DiracSplitter/stdafx.h21
-rw-r--r--src/filters/parser/FLVSplitter/FLVSplitter.cpp4
-rw-r--r--src/filters/parser/FLVSplitter/FLVSplitter.vcxproj14
-rw-r--r--src/filters/parser/FLVSplitter/FLVSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/FLVSplitter/stdafx.h22
-rw-r--r--src/filters/parser/MP4Splitter/AP4/Core/Ap4Atom.h2
-rw-r--r--src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomFactory.cpp5
-rw-r--r--src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.cpp26
-rw-r--r--src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.h41
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.cpp19
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.vcproj8
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.vcxproj16
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.vcxproj.filters15
-rw-r--r--src/filters/parser/MP4Splitter/stdafx.h22
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp15
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.h4
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj14
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/MatroskaSplitter/stdafx.h21
-rw-r--r--src/filters/parser/MpaSplitter/MpaSplitter.vcxproj14
-rw-r--r--src/filters/parser/MpaSplitter/MpaSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/MpaSplitter/stdafx.h19
-rw-r--r--src/filters/parser/MpegSplitter/IMpegSplitterFilter.h8
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.cpp194
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.h8
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.vcxproj14
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitterFile.cpp14
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitterFile.h5
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitterSettingsWnd.cpp4
-rw-r--r--src/filters/parser/MpegSplitter/stdafx.h30
-rw-r--r--src/filters/parser/NutSplitter/NutSplitter.vcxproj12
-rw-r--r--src/filters/parser/NutSplitter/NutSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/NutSplitter/stdafx.h27
-rw-r--r--src/filters/parser/OggSplitter/OggSplitter.cpp5
-rw-r--r--src/filters/parser/OggSplitter/OggSplitter.h2
-rw-r--r--src/filters/parser/OggSplitter/OggSplitter.vcxproj14
-rw-r--r--src/filters/parser/OggSplitter/OggSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/OggSplitter/stdafx.h21
-rw-r--r--src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp6
-rw-r--r--src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj14
-rw-r--r--src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/RealMediaSplitter/stdafx.h21
-rw-r--r--src/filters/parser/RoQSplitter/RoQSplitter.vcxproj12
-rw-r--r--src/filters/parser/RoQSplitter/RoQSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/RoQSplitter/stdafx.h21
-rw-r--r--src/filters/parser/SSFSplitter/SSFSplitter.vcxproj14
-rw-r--r--src/filters/parser/SSFSplitter/SSFSplitter.vcxproj.filters9
-rw-r--r--src/filters/parser/SSFSplitter/stdafx.h22
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj14
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters9
-rw-r--r--src/filters/parser/StreamDriveThru/stdafx.h20
-rw-r--r--src/filters/reader/CDDAReader/CDDAReader.vcxproj14
-rw-r--r--src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters9
-rw-r--r--src/filters/reader/CDDAReader/stdafx.h20
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.vcxproj14
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters9
-rw-r--r--src/filters/reader/CDXAReader/stdafx.h20
-rw-r--r--src/filters/reader/UDPReader/UDPReader.vcxproj14
-rw-r--r--src/filters/reader/UDPReader/UDPReader.vcxproj.filters9
-rw-r--r--src/filters/reader/UDPReader/stdafx.h18
-rw-r--r--src/filters/reader/VTSReader/VTSReader.vcxproj14
-rw-r--r--src/filters/reader/VTSReader/VTSReader.vcxproj.filters9
-rw-r--r--src/filters/reader/VTSReader/stdafx.h19
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp6
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj23
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj.filters9
-rw-r--r--src/filters/renderer/MpcAudioRenderer/SoundTouch/source/FIRFilter.cpp2
-rw-r--r--src/filters/renderer/MpcAudioRenderer/SoundTouch/source/RateTransposer.cpp2
-rw-r--r--src/filters/renderer/MpcAudioRenderer/SoundTouch/source/TDStretch.cpp2
-rw-r--r--src/filters/renderer/MpcAudioRenderer/stdafx.h44
-rw-r--r--src/filters/renderer/VideoRenderers/AllocatorCommon.cpp37
-rw-r--r--src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp20
-rw-r--r--src/filters/renderer/VideoRenderers/IPinHook.cpp65
-rw-r--r--src/filters/source/D2VSource/D2VSource.vcxproj14
-rw-r--r--src/filters/source/D2VSource/D2VSource.vcxproj.filters9
-rw-r--r--src/filters/source/D2VSource/MPEG2Dec.cpp3
-rw-r--r--src/filters/source/D2VSource/stdafx.h35
-rw-r--r--src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj14
-rw-r--r--src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj.filters9
-rw-r--r--src/filters/source/DTSAC3Source/stdafx.h20
-rw-r--r--src/filters/source/FLICSource/FLICSource.vcxproj14
-rw-r--r--src/filters/source/FLICSource/FLICSource.vcxproj.filters9
-rw-r--r--src/filters/source/FLICSource/stdafx.h20
-rw-r--r--src/filters/source/FlacSource/FlacSource.vcxproj14
-rw-r--r--src/filters/source/FlacSource/FlacSource.vcxproj.filters9
-rw-r--r--src/filters/source/FlacSource/stdafx.h20
-rw-r--r--src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj14
-rw-r--r--src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj.filters9
-rw-r--r--src/filters/source/ShoutcastSource/stdafx.h20
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.cpp7
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.vcxproj14
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters9
-rw-r--r--src/filters/source/SubtitleSource/stdafx.h20
-rw-r--r--src/filters/stdafx.h18
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj14
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters9
-rw-r--r--src/filters/switcher/AudioSwitcher/stdafx.h20
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj14
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters9
-rw-r--r--src/filters/transform/AVI2AC3Filter/stdafx.h20
-rw-r--r--src/filters/transform/BaseVideoFilter/stdafx.h21
-rw-r--r--src/filters/transform/BufferFilter/BufferFilter.vcxproj14
-rw-r--r--src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters9
-rw-r--r--src/filters/transform/BufferFilter/stdafx.h20
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj14
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters9
-rw-r--r--src/filters/transform/DeCSSFilter/stdafx.h20
-rw-r--r--src/filters/transform/MPCVideoDec/FfmpegContext.c6
-rw-r--r--src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj14
-rw-r--r--src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj.filters9
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/gccbuild.bat6
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg_x64/buildmingwlibs.sh20
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg_x64/mpchc_Mingw64.patch46
-rw-r--r--src/filters/transform/MPCVideoDec/stdafx.cpp2
-rw-r--r--src/filters/transform/MPCVideoDec/stdafx.h49
-rw-r--r--src/filters/transform/MpaDecFilter/MpaDecFilter.cpp44
-rw-r--r--src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj14
-rw-r--r--src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj.filters9
-rw-r--r--src/filters/transform/MpaDecFilter/libdca/vc++/libdca.vcxproj6
-rw-r--r--src/filters/transform/MpaDecFilter/stdafx.h22
-rw-r--r--src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp2
-rw-r--r--src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj14
-rw-r--r--src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj.filters9
-rw-r--r--src/filters/transform/Mpeg2DecFilter/stdafx.h20
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj9
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj.filters9
-rw-r--r--src/filters/transform/VSFilter/stdafx.h38
-rw-r--r--src/thirdparty/lcms2/lcms2.vcxproj2
-rw-r--r--src/thirdparty/mfc/afxctrlcontainer.cpp373
-rw-r--r--src/thirdparty/mfc/afxglobals.cpp1600
-rw-r--r--src/thirdparty/mfc/stdafx.h8
-rw-r--r--src/thirdparty/mfc/winmdi.cpp1173
310 files changed, 5556 insertions, 1591 deletions
diff --git a/include/stdafx_common.h b/include/stdafx_common.h
new file mode 100644
index 000000000..50ced288f
--- /dev/null
+++ b/include/stdafx_common.h
@@ -0,0 +1,13 @@
+#ifndef _SECURE_ATL
+#define _SECURE_ATL 1
+#endif
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include <SDKDDKVer.h>
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
diff --git a/include/stdafx_common_afx.h b/include/stdafx_common_afx.h
new file mode 100644
index 000000000..ee5ae2be4
--- /dev/null
+++ b/include/stdafx_common_afx.h
@@ -0,0 +1,15 @@
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#if (_MSC_VER < 1600)
+#include <afx.h>
+#endif
+
+#include <afxwin.h> // MFC core and standard components
+
+#if (_MSC_VER >= 1600)
+#include "afxpriv.h"
+#include "afxole.h"
+#include "..\src\mfc\oleimpl2.h"
+#include "..\src\mfc\afximpl.h"
+#endif
diff --git a/include/stdafx_common_afx2.h b/include/stdafx_common_afx2.h
new file mode 100644
index 000000000..daa475cd7
--- /dev/null
+++ b/include/stdafx_common_afx2.h
@@ -0,0 +1,26 @@
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#if (_MSC_VER < 1600) && !defined(NO_DSHOW_STRSAFE)
+#define NO_DSHOW_STRSAFE
+#endif
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+#include <afxdisp.h> // MFC Automation classes
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#endif
+
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif
+
+#include "afxole.h"
+
+#if (_MSC_VER >= 1600)
+#include "afxpriv.h"
+#include "..\src\mfc\oleimpl2.h"
+#include "..\src\mfc\afximpl.h"
+#endif
diff --git a/include/stdafx_common_dshow.h b/include/stdafx_common_dshow.h
new file mode 100644
index 000000000..f4771062d
--- /dev/null
+++ b/include/stdafx_common_dshow.h
@@ -0,0 +1,3 @@
+#include <dshow.h>
+#include <streams.h>
+#include <dvdmedia.h>
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp
index c81b0425e..197ce5d8e 100644
--- a/src/DSUtil/DSUtil.cpp
+++ b/src/DSUtil/DSUtil.cpp
@@ -1518,6 +1518,7 @@ GUID GUIDFromCString(CString str)
GUID guid = GUID_NULL;
HRESULT hr = CLSIDFromString(CComBSTR(str), &guid);
ASSERT(SUCCEEDED(hr));
+ UNREFERENCED_PARAMETER(hr);
return guid;
}
diff --git a/src/DSUtil/H264Nalu.cpp b/src/DSUtil/H264Nalu.cpp
index f39b32485..0d54c59fc 100644
--- a/src/DSUtil/H264Nalu.cpp
+++ b/src/DSUtil/H264Nalu.cpp
@@ -58,8 +58,7 @@ bool CH264Nalu::MoveToNextStartcode()
bool CH264Nalu::ReadNext()
{
-
- if (m_nCurPos >= m_nSize) {
+ if ((m_nCurPos >= m_nSize) || (m_nCurPos<0)) {
return false;
}
diff --git a/src/DSUtil/stdafx.h b/src/DSUtil/stdafx.h
index 2fb536485..9177780b0 100644
--- a/src/DSUtil/stdafx.h
+++ b/src/DSUtil/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -22,21 +19,9 @@
#pragma once
#include "SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <Shlwapi.h>
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlcoll.h>
#include <atlpath.h>
-
-#include <streams.h>
-#include <dvdmedia.h>
diff --git a/src/apps/MPCTestAPI/MPCTestAPI.cpp b/src/apps/MPCTestAPI/MPCTestAPI.cpp
index 5a99a25de..f05a1c2f2 100644
--- a/src/apps/MPCTestAPI/MPCTestAPI.cpp
+++ b/src/apps/MPCTestAPI/MPCTestAPI.cpp
@@ -5,11 +5,6 @@
#include "MPCTestAPI.h"
#include "MPCTestAPIDlg.h"
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
/////////////////////////////////////////////////////////////////////////////
// CRegisterCopyDataApp
@@ -48,16 +43,10 @@ BOOL CRegisterCopyDataApp::InitInstance()
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
- /*#ifdef _AFXDLL
- Enable3dControls(); // Call this when using MFC in a shared DLL
- #else
- Enable3dControlsStatic(); // Call this when linking to MFC statically
- #endif
- */
-
CRegisterCopyDataDlg dlg;
m_pMainWnd = &dlg;
- int nResponse = dlg.DoModal();
+ INT_PTR nResponse = dlg.DoModal();
+
if (nResponse == IDOK) {
// TODO: Place code here to handle when the dialog is
// dismissed with OK
diff --git a/src/apps/MPCTestAPI/MPCTestAPI.h b/src/apps/MPCTestAPI/MPCTestAPI.h
index 75c7c7651..c1c6f3a08 100644
--- a/src/apps/MPCTestAPI/MPCTestAPI.h
+++ b/src/apps/MPCTestAPI/MPCTestAPI.h
@@ -1,11 +1,7 @@
// RegisterCopyData.h : main header file for the REGISTERCOPYDATA application
//
-#if !defined(AFX_REGISTERCOPYDATA_H__6D924C21_1ACC_4896_A34C_BC3906D8B012__INCLUDED_)
-#define AFX_REGISTERCOPYDATA_H__6D924C21_1ACC_4896_A34C_BC3906D8B012__INCLUDED_
-
#pragma once
-
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
@@ -33,11 +29,3 @@ public:
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
-
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_REGISTERCOPYDATA_H__6D924C21_1ACC_4896_A34C_BC3906D8B012__INCLUDED_)
diff --git a/src/apps/MPCTestAPI/MPCTestAPI.rc b/src/apps/MPCTestAPI/MPCTestAPI.rc
index db682fb41..82841cd92 100644
--- a/src/apps/MPCTestAPI/MPCTestAPI.rc
+++ b/src/apps/MPCTestAPI/MPCTestAPI.rc
@@ -7,8 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
-
+#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -19,35 +18,75 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+IDR_RT_MANIFEST RT_MANIFEST "res\\MPCTestAPI.exe.manifest"
+
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
-IDD_ABOUTBOX DIALOG 0, 0, 235, 55
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "About MPCTestAPI"
-FONT 8, "MS Sans Serif"
+IDD_ABOUTBOX DIALOGEX 0, 0, 244, 57
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About MPC-HC Test API"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
- LTEXT "MPCTestAPI Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
- LTEXT "Copyright (©) 2005",IDC_STATIC,40,25,119,8
- DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
+ LTEXT "MPC-HC Test API Version 1.0.1.0",IDC_STATIC,40,10,120,10,SS_NOPREFIX
+ LTEXT "Copyright © 2005-2011 all contributors, see AUTHORS file",IDC_STATIC,40,27,197,10
+ DEFPUSHBUTTON "OK",IDOK,187,7,50,14,WS_GROUP
END
IDD_REGISTERCOPYDATA_DIALOG DIALOGEX 0, 0, 521, 406
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
-CAPTION "MPC-HC test API"
-FONT 8, "MS Sans Serif", 0, 0, 0x1
+CAPTION "MPC-HC Test API"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
PUSHBUTTON "Start MPC-HC",IDC_BUTTON_FINDWINDOW,457,7,57,18
EDITTEXT IDC_EDIT1,7,7,434,14,ES_AUTOHSCROLL
LISTBOX IDC_LOGLIST,7,89,507,310,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- LTEXT "Messages from MPC-HC",IDC_STATIC,7,74,507,9
- EDITTEXT IDC_EDIT2,157,41,284,14,ES_AUTOHSCROLL
+ LTEXT "Messages from MPC-HC",IDC_STATIC,7,74,507,10
+ EDITTEXT IDC_EDIT2,154,41,287,14,ES_AUTOHSCROLL
PUSHBUTTON "Send command",IDC_BUTTON_SENDCOMMAND,457,39,57,18
- COMBOBOX IDC_COMBO1,7,42,142,158,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_COMBO1,7,42,132,158,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
@@ -57,8 +96,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
+ FILEVERSION 1,0,1,0
+ PRODUCTVERSION 1,0,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -73,13 +112,14 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "FileDescription", "MPCTestAPI"
- VALUE "FileVersion", "1, 0, 0, 1"
- VALUE "InternalName", "MPCTestAPI"
- VALUE "LegalCopyright", "Copyright © 2005"
+ VALUE "CompanyName", "MPC-HC Team"
+ VALUE "FileDescription", "MPC-HC Test API"
+ VALUE "FileVersion", "1, 0, 1, 0"
+ VALUE "InternalName", "MPC-HC Test API"
+ VALUE "LegalCopyright", "Copyright © 2005-2011 all contributors, see AUTHORS file"
VALUE "OriginalFilename", "MPCTestAPI.exe"
- VALUE "ProductName", "MPCTestAPI"
- VALUE "ProductVersion", "1, 0, 0, 1"
+ VALUE "ProductName", "MPC-HC Test API"
+ VALUE "ProductVersion", "1, 0, 1, 0"
END
END
BLOCK "VarFileInfo"
@@ -100,9 +140,10 @@ BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 228
+ RIGHTMARGIN, 237
+ VERTGUIDE, 40
TOPMARGIN, 7
- BOTTOMMARGIN, 48
+ BOTTOMMARGIN, 50
END
IDD_REGISTERCOPYDATA_DIALOG, DIALOG
@@ -198,7 +239,7 @@ IDR_MAINFRAME ICON "res\\RegisterCopyData.ico"
STRINGTABLE
BEGIN
- IDS_ABOUTBOX "&About MPCTestAPI..."
+ IDS_ABOUTBOX "&About MPC-HC Test API..."
END
#endif // English (United States) resources
@@ -217,14 +258,10 @@ END
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
-#endif //_WIN32
-#include "res\RegisterCopyData.rc2" // non-Microsoft Visual C++ edited resources
-#include "afxres.rc" // Standard components
+#include "afxres.rc" // Standard components
#endif
-
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
diff --git a/src/apps/MPCTestAPI/MPCTestAPI.vcxproj b/src/apps/MPCTestAPI/MPCTestAPI.vcxproj
index 7f3964d0f..21e73e6b6 100644
--- a/src/apps/MPCTestAPI/MPCTestAPI.vcxproj
+++ b/src/apps/MPCTestAPI/MPCTestAPI.vcxproj
@@ -74,6 +74,10 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin10\$(Configuration)_$(Platform)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin10\obj\$(Configuration)_$(Platform)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin10\obj\$(Configuration)_$(Platform)\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -84,7 +88,6 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -98,7 +101,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -110,7 +113,6 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -124,10 +126,13 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\thirdparty\mfc\afxctrlcontainer.cpp" />
+ <ClCompile Include="..\..\thirdparty\mfc\afxglobals.cpp" />
+ <ClCompile Include="..\..\thirdparty\mfc\winmdi.cpp" />
<ClCompile Include="MPCTestAPI.cpp">
</ClCompile>
<ClCompile Include="MPCTestAPIDlg.cpp">
@@ -150,10 +155,17 @@
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
- <None Include="res\MPCTestAPI.rc2" />
+ <Manifest Include="res\MPCTestAPI.exe.manifest" />
+ </ItemGroup>
+ <ItemGroup>
<None Include="res\RegisterCopyData.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties RESOURCE_FILE="MPCTestAPI.rc" />
+ </VisualStudio>
+ </ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/src/apps/MPCTestAPI/MPCTestAPI.vcxproj.filters b/src/apps/MPCTestAPI/MPCTestAPI.vcxproj.filters
index 849f71f1f..4fff7a1e9 100644
--- a/src/apps/MPCTestAPI/MPCTestAPI.vcxproj.filters
+++ b/src/apps/MPCTestAPI/MPCTestAPI.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="MPCTestAPI.h">
@@ -40,16 +49,18 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
- <None Include="res\MPCTestAPI.rc2">
+ <ResourceCompile Include="MPCTestAPI.rc">
<Filter>Resource Files</Filter>
- </None>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
<None Include="res\RegisterCopyData.ico">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="MPCTestAPI.rc">
+ <Manifest Include="res\MPCTestAPI.exe.manifest">
<Filter>Resource Files</Filter>
- </ResourceCompile>
+ </Manifest>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/apps/MPCTestAPI/MPCTestAPIDlg.cpp b/src/apps/MPCTestAPI/MPCTestAPIDlg.cpp
index 4c0e67431..51c54593f 100644
--- a/src/apps/MPCTestAPI/MPCTestAPIDlg.cpp
+++ b/src/apps/MPCTestAPI/MPCTestAPIDlg.cpp
@@ -7,12 +7,6 @@
#include <psapi.h>
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
LPCTSTR GetMPCCommandName(MPCAPI_COMMAND nCmd)
{
switch (nCmd) {
@@ -61,12 +55,14 @@ protected:
DECLARE_MESSAGE_MAP()
};
+
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
+
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
@@ -80,6 +76,8 @@ BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
+
+
/////////////////////////////////////////////////////////////////////////////
// CRegisterCopyDataDlg dialog
@@ -239,15 +237,15 @@ void CRegisterCopyDataDlg::OnButtonFindwindow()
strExec.Format (_T("%s /slave %d"), m_strMPCPath, GetSafeHwnd());
UpdateData(TRUE);
- memset (&StartupInfo, 0, sizeof(StartupInfo));
- StartupInfo.cb = sizeof(StartupInfo);
+ memset (&StartupInfo, 0, sizeof(StartupInfo));
+ StartupInfo.cb = sizeof(StartupInfo);
GetStartupInfo(&StartupInfo);
CreateProcess (NULL, (LPTSTR)(LPCTSTR)strExec, NULL, NULL, FALSE, 0, NULL, NULL, &StartupInfo, &ProcessInfo);
}
struct MyStruct {
- int nNum;
+ int nNum;
TCHAR szData[256];
};
@@ -255,7 +253,7 @@ struct MyStruct {
void CRegisterCopyDataDlg::Senddata(MPCAPI_COMMAND nCmd, LPCTSTR strCommand)
{
if (m_hWndMPC) {
- COPYDATASTRUCT MyCDS;
+ COPYDATASTRUCT MyCDS;
MyCDS.dwData = nCmd;
MyCDS.cbData = (_tcslen (strCommand) + 1) * sizeof(TCHAR);
@@ -267,7 +265,7 @@ void CRegisterCopyDataDlg::Senddata(MPCAPI_COMMAND nCmd, LPCTSTR strCommand)
BOOL CRegisterCopyDataDlg::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct)
{
- CString strMsg;
+ CString strMsg;
MyStruct *tcsBuff=(MyStruct*)(pCopyDataStruct->lpData);
if (pCopyDataStruct->dwData == CMD_CONNECT) {
@@ -283,7 +281,7 @@ BOOL CRegisterCopyDataDlg::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruc
void CRegisterCopyDataDlg::OnBnClickedButtonSendcommand()
{
- CString strEmpty (_T(""));
+ CString strEmpty (_T(""));
UpdateData(TRUE);
switch (m_nCommandType) {
diff --git a/src/apps/MPCTestAPI/MPCTestAPIDlg.h b/src/apps/MPCTestAPI/MPCTestAPIDlg.h
index bb362241b..0a23c2f72 100644
--- a/src/apps/MPCTestAPI/MPCTestAPIDlg.h
+++ b/src/apps/MPCTestAPI/MPCTestAPIDlg.h
@@ -1,11 +1,7 @@
// RegisterCopyDataDlg.h : header file
//
-#if !defined(AFX_REGISTERCOPYDATADLG_H__8FBF82CB_6629_4707_AC99_F6E3CA6AD9A6__INCLUDED_)
-#define AFX_REGISTERCOPYDATADLG_H__8FBF82CB_6629_4707_AC99_F6E3CA6AD9A6__INCLUDED_
-
#pragma once
-
#include "../mplayerc/MpcApi.h"
@@ -47,15 +43,10 @@ protected:
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
- CString m_strMPCPath;
- CListBox m_lbLog;
- CString m_txtCommand;
- int m_nCommandType;
+ CString m_strMPCPath;
+ CListBox m_lbLog;
+ CString m_txtCommand;
+ int m_nCommandType;
afx_msg void OnBnClickedButtonSendcommand();
- void Senddata(MPCAPI_COMMAND nCmd, LPCTSTR strCommand);
+ void Senddata(MPCAPI_COMMAND nCmd, LPCTSTR strCommand);
};
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_REGISTERCOPYDATADLG_H__8FBF82CB_6629_4707_AC99_F6E3CA6AD9A6__INCLUDED_)
diff --git a/src/apps/MPCTestAPI/res/MPCTestAPI.exe.manifest b/src/apps/MPCTestAPI/res/MPCTestAPI.exe.manifest
new file mode 100644
index 000000000..bbd45feeb
--- /dev/null
+++ b/src/apps/MPCTestAPI/res/MPCTestAPI.exe.manifest
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity
+ name="MPC-HC Test API"
+ processorArchitecture="*"
+ version="1.0.0.1"
+ type="win32"
+ />
+ <description>MPC-HC Test API</description>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+ <!-- Identify the application security requirements -->
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"
+ />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!--The ID below indicates application support for Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!--The ID below indicates application support for Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ </application>
+ </compatibility>
+ <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <asmv3:windowsSettings
+ xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>true</dpiAware>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+</assembly> \ No newline at end of file
diff --git a/src/apps/MPCTestAPI/res/RegisterCopyData.ico b/src/apps/MPCTestAPI/res/RegisterCopyData.ico
index 7eef0bcbe..d56fbcdfd 100644
--- a/src/apps/MPCTestAPI/res/RegisterCopyData.ico
+++ b/src/apps/MPCTestAPI/res/RegisterCopyData.ico
Binary files differ
diff --git a/src/apps/MPCTestAPI/res/RegisterCopyData.rc2 b/src/apps/MPCTestAPI/res/RegisterCopyData.rc2
deleted file mode 100644
index cb4c2cc82..000000000
--- a/src/apps/MPCTestAPI/res/RegisterCopyData.rc2
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// REGISTERCOPYDATA.RC2 - resources Microsoft Visual C++ does not edit directly
-//
-
-#ifdef APSTUDIO_INVOKED
- #error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Add manually edited resources here...
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/src/apps/MPCTestAPI/resource.h b/src/apps/MPCTestAPI/resource.h
index f41d70f23..25a16d4a0 100644
--- a/src/apps/MPCTestAPI/resource.h
+++ b/src/apps/MPCTestAPI/resource.h
@@ -2,6 +2,7 @@
// Microsoft Visual C++ generated include file.
// Used by MPCTestAPI.rc
//
+#define IDR_RT_MANIFEST 1
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
diff --git a/src/apps/MPCTestAPI/stdafx.h b/src/apps/MPCTestAPI/stdafx.h
index bf36f8f8c..282520119 100644
--- a/src/apps/MPCTestAPI/stdafx.h
+++ b/src/apps/MPCTestAPI/stdafx.h
@@ -1,24 +1,4 @@
-#if !defined(AFX_STDAFX_H__8225CF84_1B36_45A9_8506_018203E84C28__INCLUDED_)
-#define AFX_STDAFX_H__8225CF84_1B36_45A9_8506_018203E84C28__INCLUDED_
-
#pragma once
-#ifndef WINVER
-#define WINVER 0x0600
-#endif
-
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-
-#include <afxwin.h> // MFC core and standard components
-#include <afxext.h> // MFC extensions
-#include <afxdisp.h> // MFC Automation classes
-#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__8225CF84_1B36_45A9_8506_018203E84C28__INCLUDED_)
+#include "../../../include/stdafx_common.h"
+#include "../../../include/stdafx_common_afx2.h"
diff --git a/src/apps/mplayerc/AppSettings.h b/src/apps/mplayerc/AppSettings.h
index 14a70cd56..300c2def9 100644
--- a/src/apps/mplayerc/AppSettings.h
+++ b/src/apps/mplayerc/AppSettings.h
@@ -426,8 +426,16 @@ public:
CMediaFormats m_Formats;
+#if HAS_SOURCEFILTERS
bool SrcFilters[SRC_LAST];
+#else
+ bool SrcFilters[1];
+#endif
+#if HAS_OTHER_DECODERS | HAS_FFMPEG_DECODERS
bool TraFilters[TRA_LAST];
+#else
+ bool TraFilters[1];
+#endif
#if HAS_DXVA_VIDEO_DECODERS
bool DXVAFilters[TRA_DXVA_LAST];
#else
@@ -531,8 +539,16 @@ private :
FILE_POSITION FilePosition[MAX_FILE_POSITION];
int nCurrentFilePosition;
+#if HAS_SOURCEFILTERS
CString SrcFiltersKeys[SRC_LAST];
+#else
+ CString SrcFiltersKeys[1];
+#endif
+#if HAS_OTHER_DECODERS | HAS_FFMPEG_DECODERS
CString TraFiltersKeys[TRA_LAST];
+#else
+ CString TraFiltersKeys[1];
+#endif
#if HAS_DXVA_VIDEO_DECODERS
CString DXVAFiltersKeys[TRA_DXVA_LAST];
#else
diff --git a/src/apps/mplayerc/Changelog.txt b/src/apps/mplayerc/Changelog.txt
index e19bf3450..7e0c0a996 100644
--- a/src/apps/mplayerc/Changelog.txt
+++ b/src/apps/mplayerc/Changelog.txt
@@ -9,15 +9,24 @@ next version - not yet released
CHANGED: Updated ZenLib to v0.4.19
CHANGED: Updated SoundTouch to v1.5.1pre r104
CHANGED: Updated Little CMS to v2.2a
+ FIXED : Ticket #285, Ambarella AVC not correctly splitted by MPC-HC's internal
+ MP4/MOV source filter
+ FIXED : Ticket #384, disable Relative drive
FIXED : Ticket #640, Source tree refactoring
FIXED : Ticket #740, Make EVR Sync stats better looking
FIXED : Ticket #760, Fixed playback of old movs with 'raw', 'twos' and 'ima4' audio
+ FIXED : Ticket #805, EVR Custom scanline and refresh rate detection fails occasionally,
+ causing superspeed video
+ FIXED : Ticket #829, MPC-HC plays recent BBC HD recordings with no video
FIXED : Ticket #965, Add Full File Path Parameter to Status.html
FIXED : Ticket #989, Sliders at options are consistent with volume slider.
Scroll/button up will move slider up (increase the value) while going
other way, scroll/button down will decrease the value.
- FIXED : Ticket #1128, Thumbnails wider than 2048
+ FIXED : Ticket #1029, MPEG-2 Profile detected incorrectly with MPEG splitter
+ FIXED : Ticket #1032, MPC-HC64 does not work with Flash 64-bit
+ FIXED : Ticket #1128, Thumbnails wider than 2048p
FIXED : Ticket #1220, MPC fails to play specific MKV files
+ FIXED : Ticket #1321, IMpegSplitterFilter uses CString - should be WCHAR or BSTR instead
v1.5.1.2903 - 29 February 2011
diff --git a/src/apps/mplayerc/FGFilter.cpp b/src/apps/mplayerc/FGFilter.cpp
index 1b4d2eb42..72623e3b7 100644
--- a/src/apps/mplayerc/FGFilter.cpp
+++ b/src/apps/mplayerc/FGFilter.cpp
@@ -344,11 +344,13 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len)
WORD pi = *(WORD*)p;
p += 2;
ASSERT(pi == 'ip');
+ UNREFERENCED_PARAMETER(pi);
ChkLen(1)
BYTE x33 = *p;
p++;
ASSERT(x33 == 0x33);
+ UNREFERENCED_PARAMETER(x33);
ChkLen(8)
bool fOutput = !!(*p&REG_PINFLAG_B_OUTPUT);
@@ -367,11 +369,13 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len)
WORD ty = *(WORD*)p;
p += 2;
ASSERT(ty == 'yt');
+ UNREFERENCED_PARAMETER(ty);
ChkLen(5)
BYTE x33 = *p;
p++;
ASSERT(x33 == 0x33);
+ UNREFERENCED_PARAMETER(x33);
p += 4;
ChkLen(8)
@@ -563,6 +567,7 @@ POSITION CFGFilterList::GetHeadPosition()
}
}
+#ifdef _DEBUG
TRACE(_T("FGM: Sorting filters\n"));
POSITION pos = m_sortedfilters.GetHeadPosition();
@@ -570,6 +575,7 @@ POSITION CFGFilterList::GetHeadPosition()
CFGFilter* pFGF = m_sortedfilters.GetNext(pos);
TRACE(_T("FGM: - %016I64x '%s'\n"), pFGF->GetMerit(), pFGF->GetName().IsEmpty() ? CStringFromGUID(pFGF->GetCLSID()) : CString(pFGF->GetName()));
}
+#endif
return m_sortedfilters.GetHeadPosition();
}
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index 845a08234..302840d64 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -9082,12 +9082,14 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
POINT ptA;
ptA.x = s.rcLastWindowPos.TopLeft().x;
ptA.y = s.rcLastWindowPos.TopLeft().y;
-
- for ( int i = 0; i < monitors.GetCount(); i++ ) {
- monitor = monitors.GetMonitor( i );
- if(monitor.IsOnMonitor(ptA)) {
- inmonitor = true;
- break;
+ inmonitor = (ptA.x<0 || ptA.y<0);
+ if(!inmonitor) {
+ for ( int i = 0; i < monitors.GetCount(); i++ ) {
+ monitor = monitors.GetMonitor( i );
+ if(monitor.IsOnMonitor(ptA)) {
+ inmonitor = true;
+ break;
+ }
}
}
}
@@ -10100,9 +10102,6 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD)
}
}
} else if(engine == ShockWave) {
-#ifdef _WIN64 // No flash on x64
- MessageBox(ResStr(IDS_MAINFRM_76), _T(""), MB_OK);
-#else
pUnk = (IUnknown*)(INonDelegatingUnknown*)DNew CShockwaveGraph(m_pVideoWnd->m_hWnd, hr);
if(!pUnk) {
throw ResStr(IDS_AG_OUT_OF_MEMORY);
@@ -10115,7 +10114,6 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD)
throw ResStr(IDS_MAINFRM_77);
}
m_fShockwaveGraph = true;
-#endif
} else if(engine == QuickTime) {
#ifdef _WIN64 // TODOX64
// MessageBox (ResStr(IDS_MAINFRM_78), _T(""), MB_OK);
@@ -13339,7 +13337,7 @@ void CMainFrame::SeekTo(REFERENCE_TIME rtPos, bool fSeekToKeyFrame)
m_wndSeekBar.GetRange(start, stop);
GUID tf;
pMS->GetTimeFormat(&tf);
- if(start && stop) rtPos = min(rtPos, stop);
+ if(rtPos > stop && stop != 100) rtPos = stop;
m_wndStatusBar.SetStatusTimer(rtPos, stop, !!m_wndSubresyncBar.IsWindowVisible(), &tf);
m_OSD.DisplayMessage(OSD_TOPLEFT, m_wndStatusBar.GetStatusTimer(), 1500);
}
diff --git a/src/apps/mplayerc/MediaFormats.cpp b/src/apps/mplayerc/MediaFormats.cpp
index dce97201f..87faeec45 100644
--- a/src/apps/mplayerc/MediaFormats.cpp
+++ b/src/apps/mplayerc/MediaFormats.cpp
@@ -202,7 +202,8 @@ void CMediaFormats::UpdateData(bool fSave)
ADDFMT((ResStr(IDS_MEDIAFORMATS_17), _T("mkv")));
ADDFMT((_T("WebM video file"), _T("webm")));
ADDFMT((ResStr(IDS_MEDIAFORMATS_0), _T("wmv wmp wm asf")));
- ADDFMT((ResStr(IDS_MEDIAFORMATS_4), _T("mpg mpeg mpe m1v m2v mpv2 mp2v ts tp tpr pva m2ts m2t mts evo m2p")));
+ ADDFMT((ResStr(IDS_MEDIAFORMATS_4), _T("mpg mpeg mpe m1v m2v mpv2 mp2v pva evo m2p")));
+ ADDFMT((ResStr(IDS_MEDIAFORMATS_37), _T("ts tp trp m2t m2ts mts")));
ADDFMT((_T("VCD file"), _T("dat")));
ADDFMT((ResStr(IDS_AG_DVD_FILE), _T("vob ifo")));
ADDFMT((ResStr(IDS_MEDIAFORMATS_10), _T("ogm ogv")));
diff --git a/src/apps/mplayerc/Mpeg2SectionData.cpp b/src/apps/mplayerc/Mpeg2SectionData.cpp
index b58ba1990..9460cd87f 100644
--- a/src/apps/mplayerc/Mpeg2SectionData.cpp
+++ b/src/apps/mplayerc/Mpeg2SectionData.cpp
@@ -38,7 +38,8 @@
#define SkipDescriptor(gb, nType, nLength) \
gb.ReadBuffer(DescBuffer, nLength); \
- TRACE ("Skipped descriptor : 0x%02x\n", nType);
+ TRACE ("Skipped descriptor : 0x%02x\n", nType); \
+ UNREFERENCED_PARAMETER(nType);
#define EndEnumDescriptors }}
diff --git a/src/apps/mplayerc/PPageInternalFilters.cpp b/src/apps/mplayerc/PPageInternalFilters.cpp
index 58ded729b..e9a133b77 100644
--- a/src/apps/mplayerc/PPageInternalFilters.cpp
+++ b/src/apps/mplayerc/PPageInternalFilters.cpp
@@ -432,6 +432,7 @@ BOOL CPPageInternalFilters::OnInitDialog()
break;
default:
l = NULL;
+ checked = false;
}
if (l) {
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.h b/src/apps/mplayerc/PlayerCaptureDialog.h
index 046953cf8..cab61cc2c 100644
--- a/src/apps/mplayerc/PlayerCaptureDialog.h
+++ b/src/apps/mplayerc/PlayerCaptureDialog.h
@@ -57,7 +57,7 @@ public:
virtual ~CFormatArray() {}
CFormat<T>* Find(CString name, bool fCreate = false) {
- for(int i = 0; i < (int)GetCount(); i++) {
+ for(size_t i = 0; i < GetCount(); ++i) {
if(GetAt(i)->name == name) {
return(GetAt(i));
}
@@ -78,9 +78,9 @@ public:
return(false);
}
- for(int i = 0; i < (int)GetCount(); i++) {
+ for(size_t i = 0; i < GetCount(); ++i) {
CFormat<T>* pf = GetAt(i);
- for(int j = 0; j < (int)pf->GetCount(); j++) {
+ for(size_t j = 0; j < pf->GetCount(); ++j) {
CFormatElem<T>* pfe = pf->GetAt(j);
if(!pmt || (pfe->mt.majortype == pmt->majortype && pfe->mt.subtype == pmt->subtype)) {
if(ppf) {
@@ -99,9 +99,9 @@ public:
return(false);
}
- for(int i = 0; i < (int)GetCount(); i++) {
+ for(size_t i = 0; i < GetCount(); ++i) {
CFormat<T>* pf = GetAt(i);
- for(int j = 0; j < (int)pf->GetCount(); j++) {
+ for(size_t j = 0; j < pf->GetCount(); ++j) {
CFormatElem<T>* pfe = pf->GetAt(j);
if((!pmt || pfe->mt == *pmt) && (!pcaps || !memcmp(pcaps, &pfe->caps, sizeof(T)))) {
if(ppf) {
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp
index f77a56bf8..aa3207efe 100644
--- a/src/apps/mplayerc/PlayerPlaylistBar.cpp
+++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp
@@ -32,6 +32,7 @@
#include "SaveTextFileDialog.h"
#include "PlayerPlaylistBar.h"
#include "SettingsDefines.h"
+#include "internal_filter_config.h"
IMPLEMENT_DYNAMIC(CPlayerPlaylistBar, CSizingControlBarG)
CPlayerPlaylistBar::CPlayerPlaylistBar()
@@ -263,9 +264,13 @@ void CPlayerPlaylistBar::ParsePlayList(CAtlList<CString>& fns, CAtlList<CString>
if(ct == "application/x-mpc-playlist") {
ParseMPCPlayList(fns.GetHead());
return;
- } else if(ct == "application/x-bdmv-playlist" && s.SrcFilters[SRC_MPEG]) {
- ParseBDMVPlayList(fns.GetHead());
- return;
+ } else {
+#if INTERNAL_SOURCEFILTER_MPEG
+ if(ct == "application/x-bdmv-playlist" && s.SrcFilters[SRC_MPEG]) {
+ ParseBDMVPlayList(fns.GetHead());
+ return;
+ }
+#endif
}
AddItem(fns, subs);
diff --git a/src/apps/mplayerc/SaveDlg.cpp b/src/apps/mplayerc/SaveDlg.cpp
index 7e0c909a4..5d59e0d36 100644
--- a/src/apps/mplayerc/SaveDlg.cpp
+++ b/src/apps/mplayerc/SaveDlg.cpp
@@ -171,10 +171,19 @@ BOOL CSaveDlg::OnInitDialog()
hr = pGB->Connect(
GetFirstPin((pSrc), PINDIR_OUTPUT),
GetFirstPin((pMid), PINDIR_INPUT));
+
+ if (FAILED(hr)) {
+ m_report.SetWindowText(_T("Error Connect pSrc / pMid"));
+ return FALSE;
+ }
hr = pGB->Connect(
GetFirstPin((pMid), PINDIR_OUTPUT),
GetFirstPin((pDst), PINDIR_INPUT));
+ if (FAILED(hr)) {
+ m_report.SetWindowText(_T("Error Connect pMid / pDst"));
+ return FALSE;
+ }
pMS = pMid;
diff --git a/src/apps/mplayerc/ShockwaveGraph.cpp b/src/apps/mplayerc/ShockwaveGraph.cpp
index 0a701d4e3..d7467dbcc 100644
--- a/src/apps/mplayerc/ShockwaveGraph.cpp
+++ b/src/apps/mplayerc/ShockwaveGraph.cpp
@@ -71,7 +71,7 @@ STDMETHODIMP CShockwaveGraph::Run()
try {
// XXX - Does the following line have some side effect
// or is the variable unused?
- long scale_mode = this->m_wndDestFrame.get_ScaleMode();
+ /*long scale_mode = */this->m_wndDestFrame.get_ScaleMode();
if(m_fs != State_Running) {
m_wndDestFrame.Play();
diff --git a/src/apps/mplayerc/TunerScanDlg.cpp b/src/apps/mplayerc/TunerScanDlg.cpp
index 24c19617c..0c98f7aa7 100644
--- a/src/apps/mplayerc/TunerScanDlg.cpp
+++ b/src/apps/mplayerc/TunerScanDlg.cpp
@@ -118,7 +118,7 @@ void CTunerScanDlg::OnBnClickedSave()
AppSettings& s = AfxGetAppSettings();
s.m_DVBChannels.RemoveAll();
- for (int i=0; i <m_ChannelList.GetItemCount(); i++) {
+ for (int i = 0; i < m_ChannelList.GetItemCount(); i++) {
CDVBChannel Channel;
Channel.FromString (m_ChannelList.GetItemText (i, TSCC_CHANNEL));
Channel.SetPrefNumber(i);
diff --git a/src/apps/mplayerc/VMROSD.h b/src/apps/mplayerc/VMROSD.h
index 193cf3842..117e2d2d7 100644
--- a/src/apps/mplayerc/VMROSD.h
+++ b/src/apps/mplayerc/VMROSD.h
@@ -76,6 +76,7 @@ private :
CComPtr<IVMRMixerBitmap9> m_pVMB;
CComPtr<IMFVideoMixerBitmap> m_pMFVMB;
CComPtr<IMadVRTextOsd> m_pMVTO;
+
CWnd* m_pWnd;
CCritSec m_Lock;
diff --git a/src/apps/mplayerc/WebServer.cpp b/src/apps/mplayerc/WebServer.cpp
index aeac3fad8..874b0c31f 100644
--- a/src/apps/mplayerc/WebServer.cpp
+++ b/src/apps/mplayerc/WebServer.cpp
@@ -481,6 +481,7 @@ void CWebServer::OnRequest(CWebClientSocket* pClient, CStringA& hdr, CStringA& b
fseek(f, 0, 0);
int len = fread(s, 1, body.GetLength(), f);
ASSERT(len == body.GetLength());
+ UNREFERENCED_PARAMETER(len);
fclose(f);
DeleteFileA(fn);
diff --git a/src/apps/mplayerc/mpciconlib/icons/aac.ico b/src/apps/mplayerc/mpciconlib/icons/aac.ico
index a513227a3..9fe172a46 100644
--- a/src/apps/mplayerc/mpciconlib/icons/aac.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/aac.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ac3.ico b/src/apps/mplayerc/mpciconlib/icons/ac3.ico
new file mode 100644
index 000000000..0d543ea87
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ac3.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/aiff.ico b/src/apps/mplayerc/mpciconlib/icons/aiff.ico
index 81104f92b..46f0a096e 100644
--- a/src/apps/mplayerc/mpciconlib/icons/aiff.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/aiff.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/alac.ico b/src/apps/mplayerc/mpciconlib/icons/alac.ico
index 410eea5f2..093128301 100644
--- a/src/apps/mplayerc/mpciconlib/icons/alac.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/alac.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/amr.ico b/src/apps/mplayerc/mpciconlib/icons/amr.ico
new file mode 100644
index 000000000..de86bed61
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/amr.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ape.ico b/src/apps/mplayerc/mpciconlib/icons/ape.ico
new file mode 100644
index 000000000..ef3d25110
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ape.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/au.ico b/src/apps/mplayerc/mpciconlib/icons/au.ico
index 8d11d5343..df410ba7d 100644
--- a/src/apps/mplayerc/mpciconlib/icons/au.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/au.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/avi.ico b/src/apps/mplayerc/mpciconlib/icons/avi.ico
index e3ed4bcd8..962f7af32 100644
--- a/src/apps/mplayerc/mpciconlib/icons/avi.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/avi.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/bik.ico b/src/apps/mplayerc/mpciconlib/icons/bik.ico
deleted file mode 100644
index d37bc710f..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/bik.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/bink.ico b/src/apps/mplayerc/mpciconlib/icons/bink.ico
new file mode 100644
index 000000000..5a1d4c3db
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/bink.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/cda.ico b/src/apps/mplayerc/mpciconlib/icons/cda.ico
index 3702a2f86..644ce9673 100644
--- a/src/apps/mplayerc/mpciconlib/icons/cda.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/cda.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/d2v.ico b/src/apps/mplayerc/mpciconlib/icons/d2v.ico
index e8dac4993..be3eefef0 100644
--- a/src/apps/mplayerc/mpciconlib/icons/d2v.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/d2v.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/dat.ico b/src/apps/mplayerc/mpciconlib/icons/dat.ico
new file mode 100644
index 000000000..e9276a39f
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/dat.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/dsm.ico b/src/apps/mplayerc/mpciconlib/icons/dsm.ico
index 2f3fac41d..f43bc9714 100644
--- a/src/apps/mplayerc/mpciconlib/icons/dsm.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/dsm.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/dts.ico b/src/apps/mplayerc/mpciconlib/icons/dts.ico
new file mode 100644
index 000000000..8bb4de24d
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/dts.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/dvda.ico b/src/apps/mplayerc/mpciconlib/icons/dvda.ico
deleted file mode 100644
index e6e4636cc..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/dvda.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/dvdf.ico b/src/apps/mplayerc/mpciconlib/icons/dvdf.ico
deleted file mode 100644
index f01cab14c..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/dvdf.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/flac.ico b/src/apps/mplayerc/mpciconlib/icons/flac.ico
index e48fe2aef..3c76a5cab 100644
--- a/src/apps/mplayerc/mpciconlib/icons/flac.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/flac.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/flic.ico b/src/apps/mplayerc/mpciconlib/icons/flic.ico
index 09a6f169c..189defb00 100644
--- a/src/apps/mplayerc/mpciconlib/icons/flic.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/flic.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/flv.ico b/src/apps/mplayerc/mpciconlib/icons/flv.ico
index 1e8884903..0247c13cd 100644
--- a/src/apps/mplayerc/mpciconlib/icons/flv.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/flv.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/icon_list.txt b/src/apps/mplayerc/mpciconlib/icons/icon_list.txt
index 28555f764..542718077 100644
--- a/src/apps/mplayerc/mpciconlib/icons/icon_list.txt
+++ b/src/apps/mplayerc/mpciconlib/icons/icon_list.txt
@@ -1,39 +1,49 @@
-("wmv"), _T("wmv wmp wm asf")
-("wma"), _T("wma")
-("avi"), _T("avi")
-("wav"), _T("wav")
-("mpg"), _T("mpg mpeg mpe m1v m2v mpv2 mp2v ts tp tpr pva pss m2ts m2t mts evo")
-("mpa"), _T("mpa mp2 m1a m2a")
-("dvdf"), _T("vob ifo")
-("dvda"), _T("ac3 dts")
-("mp3"), _T("mp3")
-("mid"), _T("mid midi rmi")
-("ivf"), _T("ivf")
+("aac"), _T("aac m4a m4b")
+("ac3"), _T("ac3")
("aiff"), _T("aif aifc aiff")
+("alac"), _T("alac")
+("amr"), _T("amr")
+("ape"), _T("ape apl")
("au"), _T("au snd")
-("ogm"), _T("ogm ogv")
-("ogg"), _T("ogg oga")
+("avi"), _T("avi")
+("bink"), _T("bik")
("cda"), _T("cda")
-("flic"), _T("fli flc flic")
("d2v"), _T("d2v")
-("mp4"), _T("mp4 m4v hdmov 3gp 3gpp")
-("aac"), _T("m4a m4b aac")
-("mkv"), _T("mkv")
+("dat"), _T("dat")
+("drc"), _T("drc")
+("dsm"), _T("dsm dsv dsa dss")
+("dts"), _T("dts")
+("flac"), _T("flac")
+("flic"), _T("fli flc flic")
+("flv"), _T("flv iflv f4v")
+("ifo"), _T("ifo")
+("ivf"), _T("ivf")
+("midi"), _T("mid midi rmi")
("mka"), _T("mka")
-("bik"), _T("smk bik")
-("ratdvd"), _T("ratdvd")
+("mkv"), _T("mkv")
+("mov"), _T("mov 3g2 3gp2")
+("mp3"), _T("mp3")
+("mp4"), _T("mp4 m4v mp4v mpv4 hdmov 3gp 3gpp")
+("mpa"), _T("mpa mp2 m1a m2a")
+("mpc"), _T("mpc")
+("mpeg"), _T("mpg mpeg mpe m1v m2v mpv2 mp2v pva evo m2p")
+("ofr"), _T("ofr ofs")
+("ogg"), _T("ogg oga")
+("ogm"), _T("ogm ogv")
+("playlist"), _T("asx m3u pls wvx wax wmx mpcpl mpls bdmv")
+("ra"), _T("ra")
+("rardvd"), _T("ratdvd")
("roq"), _T("roq")
("rm"), _T("rm ram rpm rmm")
-("ra"), _T("ra")
("rt"), _T("rt rp smi smil")
-("drc"), _T("drc")
-("dsm"), _T("dsm dsv dsa dss")
-("mpc"), _T("mpc")
-("flac"), _T("flac")
-("alac"), _T("alac")
-("flv"), _T("flv")
+("smk"), _T("smk")
("swf"), _T("swf")
-("mov"), _T("mov qt amr 3g2 3gp2")
-("jpeg"), _T("jpeg jpg bmp gif pic png dib tiff tif")
-("plc"), _T("asx m3u pls wvx wax wmx mpcpl")
-("other"), _T("divx vp6 rmvb amv webm") \ No newline at end of file
+("ts"), _T("ts tp trp m2t m2ts mts")
+("tta"), _T("tta")
+("vob"), _T("vob")
+("wav"), _T("wav")
+("webm"), _T("webm")
+("wma"), _T("wma")
+("wmv"), _T("wmv wmp wm asf")
+("wv"), _T("wv")
+("other"), _T("divx rmvb amv") \ No newline at end of file
diff --git a/src/apps/mplayerc/mpciconlib/icons/ifo.ico b/src/apps/mplayerc/mpciconlib/icons/ifo.ico
new file mode 100644
index 000000000..e7b46437e
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ifo.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ifv.ico b/src/apps/mplayerc/mpciconlib/icons/ifv.ico
deleted file mode 100644
index 82375cd9c..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/ifv.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ivf.ico b/src/apps/mplayerc/mpciconlib/icons/ivf.ico
new file mode 100644
index 000000000..abbd32362
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ivf.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/jpeg.ico b/src/apps/mplayerc/mpciconlib/icons/jpeg.ico
deleted file mode 100644
index cd3045497..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/jpeg.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mid.ico b/src/apps/mplayerc/mpciconlib/icons/mid.ico
deleted file mode 100644
index 4468b18d8..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/mid.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/midi.ico b/src/apps/mplayerc/mpciconlib/icons/midi.ico
new file mode 100644
index 000000000..3cd00547a
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/midi.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mka.ico b/src/apps/mplayerc/mpciconlib/icons/mka.ico
index 595c45ddf..4695660f2 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mka.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mka.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mkv.ico b/src/apps/mplayerc/mpciconlib/icons/mkv.ico
index 003c85298..756e98628 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mkv.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mkv.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mov.ico b/src/apps/mplayerc/mpciconlib/icons/mov.ico
index 5c6670328..1e230a655 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mov.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mov.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mp3.ico b/src/apps/mplayerc/mpciconlib/icons/mp3.ico
index de57e2135..66d3cdc3f 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mp3.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mp3.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mp4.ico b/src/apps/mplayerc/mpciconlib/icons/mp4.ico
index 2a1cfb39b..4e4d3e06f 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mp4.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mp4.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mpa.ico b/src/apps/mplayerc/mpciconlib/icons/mpa.ico
index aea3337bb..6392d3cac 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mpa.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mpa.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mpc.ico b/src/apps/mplayerc/mpciconlib/icons/mpc.ico
index 8f4b5f3ad..4380f9b54 100644
--- a/src/apps/mplayerc/mpciconlib/icons/mpc.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/mpc.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mpeg.ico b/src/apps/mplayerc/mpciconlib/icons/mpeg.ico
new file mode 100644
index 000000000..3336a7663
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/mpeg.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/mpg.ico b/src/apps/mplayerc/mpciconlib/icons/mpg.ico
deleted file mode 100644
index 1f9ee287e..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/mpg.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ofr.ico b/src/apps/mplayerc/mpciconlib/icons/ofr.ico
new file mode 100644
index 000000000..ef0e20430
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ofr.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ogg.ico b/src/apps/mplayerc/mpciconlib/icons/ogg.ico
index 6424537e7..7ed51207e 100644
--- a/src/apps/mplayerc/mpciconlib/icons/ogg.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/ogg.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ogm.ico b/src/apps/mplayerc/mpciconlib/icons/ogm.ico
index f006a3e82..2f2498efb 100644
--- a/src/apps/mplayerc/mpciconlib/icons/ogm.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/ogm.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/other.ico b/src/apps/mplayerc/mpciconlib/icons/other.ico
index 7b63c2b90..393a712d3 100644
--- a/src/apps/mplayerc/mpciconlib/icons/other.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/other.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/playlist.ico b/src/apps/mplayerc/mpciconlib/icons/playlist.ico
new file mode 100644
index 000000000..f909cc415
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/playlist.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/plc.ico b/src/apps/mplayerc/mpciconlib/icons/plc.ico
deleted file mode 100644
index 68acfdd87..000000000
--- a/src/apps/mplayerc/mpciconlib/icons/plc.ico
+++ /dev/null
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ra.ico b/src/apps/mplayerc/mpciconlib/icons/ra.ico
index ef2e486fe..e0bb4e5af 100644
--- a/src/apps/mplayerc/mpciconlib/icons/ra.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/ra.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ratdvd.ico b/src/apps/mplayerc/mpciconlib/icons/ratdvd.ico
index cf745aa84..7d070739a 100644
--- a/src/apps/mplayerc/mpciconlib/icons/ratdvd.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/ratdvd.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/rm.ico b/src/apps/mplayerc/mpciconlib/icons/rm.ico
index d90ea4ecc..784875a27 100644
--- a/src/apps/mplayerc/mpciconlib/icons/rm.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/rm.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/rt.ico b/src/apps/mplayerc/mpciconlib/icons/rt.ico
index a0fed938a..777cc2a23 100644
--- a/src/apps/mplayerc/mpciconlib/icons/rt.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/rt.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/smk.ico b/src/apps/mplayerc/mpciconlib/icons/smk.ico
new file mode 100644
index 000000000..37be8b7d1
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/smk.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/swf.ico b/src/apps/mplayerc/mpciconlib/icons/swf.ico
index d863af772..f47e6abca 100644
--- a/src/apps/mplayerc/mpciconlib/icons/swf.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/swf.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/ts.ico b/src/apps/mplayerc/mpciconlib/icons/ts.ico
new file mode 100644
index 000000000..ddce190a4
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/ts.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/tta.ico b/src/apps/mplayerc/mpciconlib/icons/tta.ico
new file mode 100644
index 000000000..f3d116acb
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/tta.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/vob.ico b/src/apps/mplayerc/mpciconlib/icons/vob.ico
new file mode 100644
index 000000000..6b38f5383
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/vob.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/wav.ico b/src/apps/mplayerc/mpciconlib/icons/wav.ico
index 17067bde8..4b651a59a 100644
--- a/src/apps/mplayerc/mpciconlib/icons/wav.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/wav.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/webm.ico b/src/apps/mplayerc/mpciconlib/icons/webm.ico
new file mode 100644
index 000000000..8a0805618
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/webm.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/wma.ico b/src/apps/mplayerc/mpciconlib/icons/wma.ico
index 4a6de5338..a9c2a5040 100644
--- a/src/apps/mplayerc/mpciconlib/icons/wma.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/wma.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/wmv.ico b/src/apps/mplayerc/mpciconlib/icons/wmv.ico
index b34b7c450..9c972b1b8 100644
--- a/src/apps/mplayerc/mpciconlib/icons/wmv.ico
+++ b/src/apps/mplayerc/mpciconlib/icons/wmv.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/icons/wv.ico b/src/apps/mplayerc/mpciconlib/icons/wv.ico
new file mode 100644
index 000000000..52c449e10
--- /dev/null
+++ b/src/apps/mplayerc/mpciconlib/icons/wv.ico
Binary files differ
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.cpp b/src/apps/mplayerc/mpciconlib/mpciconlib.cpp
index e43b4ec63..63afd8885 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.cpp
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.cpp
@@ -8,212 +8,230 @@ int main()
int get_icon_index(CString ext)
{
- int iconindex = -1;
+ int iconindex = -1;// IDI_NONE
if(ext.CompareNoCase(_T(".3g2")) == 0) {
+ iconindex = IDI_MOV_ICON;
+ }else if(ext.CompareNoCase(_T(".3gp")) == 0) {
iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".3gp")) == 0) {
- iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".3gp2")) == 0) {
- iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".3gpp")) == 0) {
+ }else if(ext.CompareNoCase(_T(".3gp2")) == 0) {
+ iconindex = IDI_MOV_ICON;
+ }else if(ext.CompareNoCase(_T(".3gpp")) == 0) {
iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".aac")) == 0) {
+ }else if(ext.CompareNoCase(_T(".aac")) == 0) {
iconindex = IDI_AAC_ICON;
- } else if(ext.CompareNoCase(_T(".ac3")) == 0) {
- iconindex = IDI_DVDA_ICON;
- } else if(ext.CompareNoCase(_T(".aif")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ac3")) == 0) {
+ iconindex = IDI_AC3_ICON;
+ }else if(ext.CompareNoCase(_T(".aif")) == 0) {
iconindex = IDI_AIFF_ICON;
- } else if(ext.CompareNoCase(_T(".aifc")) == 0) {
+ }else if(ext.CompareNoCase(_T(".aifc")) == 0) {
iconindex = IDI_AIFF_ICON;
- } else if(ext.CompareNoCase(_T(".aiff")) == 0) {
+ }else if(ext.CompareNoCase(_T(".aiff")) == 0) {
iconindex = IDI_AIFF_ICON;
- } else if(ext.CompareNoCase(_T(".alac")) == 0) {
+ }else if(ext.CompareNoCase(_T(".alac")) == 0) {
iconindex = IDI_ALAC_ICON;
- } else if(ext.CompareNoCase(_T(".amr")) == 0) {
+ }else if(ext.CompareNoCase(_T(".amr")) == 0) {
+ iconindex = IDI_AMR_ICON;
+ }else if(ext.CompareNoCase(_T(".amv")) == 0) {
iconindex = IDI_OTHER_ICON;
- } else if(ext.CompareNoCase(_T(".amv")) == 0) {
- iconindex = IDI_OTHER_ICON;
- } else if(ext.CompareNoCase(_T(".ape")) == 0) {
- iconindex = IDI_NONE;
- } else if(ext.CompareNoCase(_T(".asf")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ape")) == 0) {
+ iconindex = IDI_APE_ICON;
+ }else if(ext.CompareNoCase(_T(".apl")) == 0) {
+ iconindex = IDI_APE_ICON;
+ }else if(ext.CompareNoCase(_T(".asf")) == 0) {
iconindex = IDI_WMV_ICON;
- } else if(ext.CompareNoCase(_T(".asx")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".au")) == 0) {
+ }else if(ext.CompareNoCase(_T(".asx")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".au")) == 0) {
iconindex = IDI_AU_ICON;
- } else if(ext.CompareNoCase(_T(".avi")) == 0) {
+ }else if(ext.CompareNoCase(_T(".avi")) == 0) {
iconindex = IDI_AVI_ICON;
- } else if(ext.CompareNoCase(_T(".bik")) == 0) {
- iconindex = IDI_BIK_ICON;
- } else if(ext.CompareNoCase(_T(".cda")) == 0) {
+ }else if(ext.CompareNoCase(_T(".bdmv")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".bik")) == 0) {
+ iconindex = IDI_BINK_ICON;
+ }else if(ext.CompareNoCase(_T(".cda")) == 0) {
iconindex = IDI_CDA_ICON;
- } else if(ext.CompareNoCase(_T(".d2v")) == 0) {
+ }else if(ext.CompareNoCase(_T(".d2v")) == 0) {
iconindex = IDI_D2V_ICON;
- } else if(ext.CompareNoCase(_T(".divx")) == 0) {
- iconindex = IDI_AVI_ICON;
- } else if(ext.CompareNoCase(_T(".drc")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dat")) == 0) {
+ iconindex = IDI_DAT_ICON;
+ }else if(ext.CompareNoCase(_T(".divx")) == 0) {
+ iconindex = IDI_OTHER_ICON;
+ }else if(ext.CompareNoCase(_T(".drc")) == 0) {
iconindex = IDI_DRC_ICON;
- } else if(ext.CompareNoCase(_T(".dsa")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dsa")) == 0) {
iconindex = IDI_DSM_ICON;
- } else if(ext.CompareNoCase(_T(".dsm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dsm")) == 0) {
iconindex = IDI_DSM_ICON;
- } else if(ext.CompareNoCase(_T(".dss")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dss")) == 0) {
iconindex = IDI_DSM_ICON;
- } else if(ext.CompareNoCase(_T(".dsv")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dsv")) == 0) {
iconindex = IDI_DSM_ICON;
- } else if(ext.CompareNoCase(_T(".dts")) == 0) {
- iconindex = IDI_DVDA_ICON;
- } else if(ext.CompareNoCase(_T(".evo")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".flac")) == 0) {
+ }else if(ext.CompareNoCase(_T(".dts")) == 0) {
+ iconindex = IDI_DTS_ICON;
+ }else if(ext.CompareNoCase(_T(".evo")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".f4v")) == 0) {
+ iconindex = IDI_FLV_ICON;
+ }else if(ext.CompareNoCase(_T(".flac")) == 0) {
iconindex = IDI_FLAC_ICON;
- } else if(ext.CompareNoCase(_T(".flic")) == 0) {
+ }else if(ext.CompareNoCase(_T(".flc")) == 0) {
iconindex = IDI_FLIC_ICON;
- } else if(ext.CompareNoCase(_T(".flv")) == 0) {
- iconindex = IDI_FLV_ICON;
- } else if(ext.CompareNoCase(_T(".iflv")) == 0) {
- iconindex = IDI_FLV_ICON;
- } else if(ext.CompareNoCase(_T(".f4v")) == 0) {
+ }else if(ext.CompareNoCase(_T(".fli")) == 0) {
+ iconindex = IDI_FLIC_ICON;
+ }else if(ext.CompareNoCase(_T(".flic")) == 0) {
+ iconindex = IDI_FLIC_ICON;
+ }else if(ext.CompareNoCase(_T(".flv")) == 0) {
iconindex = IDI_FLV_ICON;
- } else if(ext.CompareNoCase(_T(".hdmov")) == 0) {
+ }else if(ext.CompareNoCase(_T(".hdmov")) == 0) {
iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".ifo")) == 0) {
- iconindex = IDI_DVDF_ICON;
- } else if(ext.CompareNoCase(_T(".ivf")) == 0) {
+ }else if(ext.CompareNoCase(_T(".iflv")) == 0) {
+ iconindex = IDI_FLV_ICON;
+ }else if(ext.CompareNoCase(_T(".ifo")) == 0) {
+ iconindex = IDI_IFO_ICON;
+ }else if(ext.CompareNoCase(_T(".ivf")) == 0) {
iconindex = IDI_IVF_ICON;
- } else if(ext.CompareNoCase(_T(".m1a")) == 0) {
+ }else if(ext.CompareNoCase(_T(".m1a")) == 0) {
iconindex = IDI_MPA_ICON;
- } else if(ext.CompareNoCase(_T(".m1v")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".m2a")) == 0) {
+ }else if(ext.CompareNoCase(_T(".m1v")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".m2a")) == 0) {
iconindex = IDI_MPA_ICON;
- } else if(ext.CompareNoCase(_T(".m2t")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".m2ts")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".m2v")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".m3u")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".bdmv")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".m4a")) == 0) {
+ }else if(ext.CompareNoCase(_T(".m2p")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".m2t")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".m2ts")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".m2v")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".m3u")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".m4a")) == 0) {
iconindex = IDI_AAC_ICON;
- } else if(ext.CompareNoCase(_T(".m4b")) == 0) {
+ }else if(ext.CompareNoCase(_T(".m4b")) == 0) {
iconindex = IDI_AAC_ICON;
- } else if(ext.CompareNoCase(_T(".m4v")) == 0) {
+ }else if(ext.CompareNoCase(_T(".m4v")) == 0) {
iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".mid")) == 0) {
- iconindex = IDI_MID_ICON;
- } else if(ext.CompareNoCase(_T(".midi")) == 0) {
- iconindex = IDI_MID_ICON;
- } else if(ext.CompareNoCase(_T(".mka")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mid")) == 0) {
+ iconindex = IDI_MIDI_ICON;
+ }else if(ext.CompareNoCase(_T(".midi")) == 0) {
+ iconindex = IDI_MIDI_ICON;
+ }else if(ext.CompareNoCase(_T(".mka")) == 0) {
iconindex = IDI_MKA_ICON;
- } else if(ext.CompareNoCase(_T(".mkv")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mkv")) == 0) {
iconindex = IDI_MKV_ICON;
- } else if(ext.CompareNoCase(_T(".mov")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mov")) == 0) {
iconindex = IDI_MOV_ICON;
- } else if(ext.CompareNoCase(_T(".mp2")) == 0) {
- iconindex = IDI_MPC_ICON;
- } else if(ext.CompareNoCase(_T(".mp2v")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".mp3")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mp2")) == 0) {
+ iconindex = IDI_MPA_ICON;
+ }else if(ext.CompareNoCase(_T(".mp2v")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".mp3")) == 0) {
iconindex = IDI_MP3_ICON;
- } else if(ext.CompareNoCase(_T(".mp4")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mp4")) == 0) {
+ iconindex = IDI_MP4_ICON;
+ }else if(ext.CompareNoCase(_T(".mp4v")) == 0) {
iconindex = IDI_MP4_ICON;
- } else if(ext.CompareNoCase(_T(".mpa")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mpa")) == 0) {
iconindex = IDI_MPA_ICON;
- } else if(ext.CompareNoCase(_T(".mpc")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mpc")) == 0) {
iconindex = IDI_MPC_ICON;
- } else if(ext.CompareNoCase(_T(".mpcpl")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".mpe")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".mpeg")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".mpg")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".mpv2")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".mts")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".oga")) == 0) {
+ }else if(ext.CompareNoCase(_T(".mpcpl")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".mpe")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".mpeg")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".mpg")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".mpls")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".mpv2")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".mpv4")) == 0) {
+ iconindex = IDI_MP4_ICON;
+ }else if(ext.CompareNoCase(_T(".mts")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".ofr")) == 0) {
+ iconindex = IDI_OFR_ICON;
+ }else if(ext.CompareNoCase(_T(".ofs")) == 0) {
+ iconindex = IDI_OFR_ICON;
+ }else if(ext.CompareNoCase(_T(".oga")) == 0) {
iconindex = IDI_OGG_ICON;
- } else if(ext.CompareNoCase(_T(".ogg")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ogg")) == 0) {
iconindex = IDI_OGG_ICON;
- } else if(ext.CompareNoCase(_T(".ogm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ogm")) == 0) {
iconindex = IDI_OGM_ICON;
- } else if(ext.CompareNoCase(_T(".ogv")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ogv")) == 0) {
iconindex = IDI_OGM_ICON;
- } else if(ext.CompareNoCase(_T(".pls")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".pva")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".pss")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".qt")) == 0) {
- iconindex = IDI_MOV_ICON;
- } else if(ext.CompareNoCase(_T(".ra")) == 0) {
+ }else if(ext.CompareNoCase(_T(".pls")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".pva")) == 0) {
+ iconindex = IDI_MPEG_ICON;
+ }else if(ext.CompareNoCase(_T(".ra")) == 0) {
iconindex = IDI_RA_ICON;
- } else if(ext.CompareNoCase(_T(".ram")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ram")) == 0) {
iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".ratdvd")) == 0) {
+ }else if(ext.CompareNoCase(_T(".ratdvd")) == 0) {
iconindex = IDI_RATDVD_ICON;
- } else if(ext.CompareNoCase(_T(".rm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rm")) == 0) {
iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".rmi")) == 0) {
- iconindex = IDI_MID_ICON;
- } else if(ext.CompareNoCase(_T(".rmm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rmi")) == 0) {
+ iconindex = IDI_MIDI_ICON;
+ }else if(ext.CompareNoCase(_T(".rmm")) == 0) {
iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".rmvb")) == 0) {
- iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".roq")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rmvb")) == 0) {
+ iconindex = IDI_OTHER_ICON;
+ }else if(ext.CompareNoCase(_T(".roq")) == 0) {
iconindex = IDI_ROQ_ICON;
- } else if(ext.CompareNoCase(_T(".rp")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rp")) == 0) {
iconindex = IDI_RT_ICON;
- } else if(ext.CompareNoCase(_T(".rpm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rpm")) == 0) {
iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".rt")) == 0) {
+ }else if(ext.CompareNoCase(_T(".rt")) == 0) {
iconindex = IDI_RT_ICON;
- } else if(ext.CompareNoCase(_T(".smi")) == 0) {
- iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".smil")) == 0) {
- iconindex = IDI_RM_ICON;
- } else if(ext.CompareNoCase(_T(".smk")) == 0) {
- iconindex = IDI_OTHER_ICON;
- } else if(ext.CompareNoCase(_T(".snd")) == 0) {
+ }else if(ext.CompareNoCase(_T(".smi")) == 0) {
+ iconindex = IDI_RT_ICON;
+ }else if(ext.CompareNoCase(_T(".smil")) == 0) {
+ iconindex = IDI_RT_ICON;
+ }else if(ext.CompareNoCase(_T(".smk")) == 0) {
+ iconindex = IDI_SMK_ICON;
+ }else if(ext.CompareNoCase(_T(".snd")) == 0) {
iconindex = IDI_AU_ICON;
- } else if(ext.CompareNoCase(_T(".tp")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".tpr")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".ts")) == 0) {
- iconindex = IDI_MPG_ICON;
- } else if(ext.CompareNoCase(_T(".vob")) == 0) {
- iconindex = IDI_DVDF_ICON;
- } else if(ext.CompareNoCase(_T(".vp6")) == 0) {
- iconindex = IDI_OTHER_ICON;
- } else if(ext.CompareNoCase(_T(".wav")) == 0) {
+ }else if(ext.CompareNoCase(_T(".swf")) == 0) {
+ iconindex = IDI_SWF_ICON;
+ }else if(ext.CompareNoCase(_T(".tp")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".trp")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".ts")) == 0) {
+ iconindex = IDI_TS_ICON;
+ }else if(ext.CompareNoCase(_T(".tta")) == 0) {
+ iconindex = IDI_TTA_ICON;
+ }else if(ext.CompareNoCase(_T(".vob")) == 0) {
+ iconindex = IDI_VOB_ICON;
+ }else if(ext.CompareNoCase(_T(".wav")) == 0) {
iconindex = IDI_WAV_ICON;
- } else if(ext.CompareNoCase(_T(".wax")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".webm")) == 0) {
- iconindex = IDI_OTHER_ICON;
- } else if(ext.CompareNoCase(_T(".wm")) == 0) {
+ }else if(ext.CompareNoCase(_T(".wax")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".webm")) == 0) {
+ iconindex = IDI_WEBM_ICON;
+ }else if(ext.CompareNoCase(_T(".wm")) == 0) {
iconindex = IDI_WMV_ICON;
- } else if(ext.CompareNoCase(_T(".wma")) == 0) {
+ }else if(ext.CompareNoCase(_T(".wma")) == 0) {
iconindex = IDI_WMA_ICON;
- } else if(ext.CompareNoCase(_T(".wmp")) == 0) {
+ }else if(ext.CompareNoCase(_T(".wmp")) == 0) {
iconindex = IDI_WMV_ICON;
- } else if(ext.CompareNoCase(_T(".wmv")) == 0) {
+ }else if(ext.CompareNoCase(_T(".wmv")) == 0) {
iconindex = IDI_WMV_ICON;
- } else if(ext.CompareNoCase(_T(".wmx")) == 0) {
- iconindex = IDI_PLC_ICON;
- } else if(ext.CompareNoCase(_T(".wv")) == 0) {
- iconindex = IDI_NONE;
- } else if(ext.CompareNoCase(_T(".wvx")) == 0) {
- iconindex = IDI_PLC_ICON;
+ }else if(ext.CompareNoCase(_T(".wmx")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
+ }else if(ext.CompareNoCase(_T(".wv")) == 0) {
+ iconindex = IDI_WV_ICON;
+ }else if(ext.CompareNoCase(_T(".wvx")) == 0) {
+ iconindex = IDI_PLAYLIST_ICON;
}
return iconindex;
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.h b/src/apps/mplayerc/mpciconlib/mpciconlib.h
index 02a697776..159a6c151 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.h
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.h
@@ -4,44 +4,55 @@
* when adding/removing icons.
*/
-#define IDI_AVI_ICON 0
-#define IDI_MPG_ICON 1
-#define IDI_MP4_ICON 2
-#define IDI_MKV_ICON 3
-#define IDI_OGM_ICON 4
-#define IDI_FLV_ICON 5
-#define IDI_WMV_ICON 6
-#define IDI_MOV_ICON 7
-#define IDI_RM_ICON 8
-#define IDI_MP3_ICON 9
-#define IDI_OGG_ICON 10
-#define IDI_AAC_ICON 11
-#define IDI_MKA_ICON 12
-#define IDI_WMA_ICON 13
-#define IDI_RA_ICON 14
-#define IDI_WAV_ICON 15
-#define IDI_MPA_ICON 16
-#define IDI_CDA_ICON 17
-#define IDI_MPC_ICON 18
-#define IDI_FLAC_ICON 19
-#define IDI_ALAC_ICON 20
-#define IDI_PLC_ICON 21
-#define IDI_D2V_ICON 22
-#define IDI_MID_ICON 23
-#define IDI_AIFF_ICON 24
-#define IDI_AU_ICON 25
-#define IDI_IVF_ICON 26
-#define IDI_FLIC_ICON 27
-#define IDI_BIK_ICON 28
-#define IDI_RATDVD_ICON 29
-#define IDI_ROQ_ICON 30
-#define IDI_RT_ICON 31
-#define IDI_DRC_ICON 32
-#define IDI_DSM_ICON 33
-#define IDI_SWF_ICON 34
-#define IDI_OTHER_ICON 35
-#define IDI_DVDA_ICON 36
-#define IDI_DVDF_ICON 37
+#define IDI_OTHER_ICON 0
+#define IDI_AAC_ICON 1
+#define IDI_AC3_ICON 2
+#define IDI_AIFF_ICON 3
+#define IDI_ALAC_ICON 4
+#define IDI_AMR_ICON 5
+#define IDI_APE_ICON 6
+#define IDI_AU_ICON 7
+#define IDI_AVI_ICON 8
+#define IDI_BINK_ICON 9
+#define IDI_CDA_ICON 10
+#define IDI_D2V_ICON 11
+#define IDI_DAT_ICON 12
+#define IDI_DRC_ICON 13
+#define IDI_DSM_ICON 14
+#define IDI_DTS_ICON 15
+#define IDI_FLAC_ICON 16
+#define IDI_FLIC_ICON 17
+#define IDI_FLV_ICON 18
+#define IDI_IFO_ICON 19
+#define IDI_IVF_ICON 20
+#define IDI_MIDI_ICON 21
+#define IDI_MKA_ICON 22
+#define IDI_MKV_ICON 23
+#define IDI_MOV_ICON 24
+#define IDI_MP3_ICON 25
+#define IDI_MP4_ICON 26
+#define IDI_MPA_ICON 27
+#define IDI_MPC_ICON 28
+#define IDI_MPEG_ICON 29
+#define IDI_OFR_ICON 30
+#define IDI_OGG_ICON 31
+#define IDI_OGM_ICON 32
+#define IDI_PLAYLIST_ICON 33
+#define IDI_RA_ICON 34
+#define IDI_RATDVD_ICON 35
+#define IDI_RM_ICON 36
+#define IDI_ROQ_ICON 37
+#define IDI_RT_ICON 38
+#define IDI_SMK_ICON 39
+#define IDI_SWF_ICON 40
+#define IDI_TS_ICON 41
+#define IDI_TTA_ICON 42
+#define IDI_VOB_ICON 43
+#define IDI_WAV_ICON 44
+#define IDI_WEBM_ICON 45
+#define IDI_WMA_ICON 46
+#define IDI_WMV_ICON 47
+#define IDI_WV_ICON 48
#define IDI_NONE -1
@@ -49,7 +60,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 39
+#define _APS_NEXT_RESOURCE_VALUE 48
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.rc b/src/apps/mplayerc/mpciconlib/mpciconlib.rc
index fdca4d0fd..bcd20d165 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.rc
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.rc
@@ -55,44 +55,56 @@ END
// The icons should have the exact same order as in "mpciconlib.h" !
+IDI_OTHER_ICON ICON "icons\\other.ico"
+IDI_AAC_ICON ICON "icons\\aac.ico"
+IDI_AC3_ICON ICON "icons\\ac3.ico"
+IDI_AIFF_ICON ICON "icons\\aiff.ico"
+IDI_ALAC_ICON ICON "icons\\alac.ico"
+IDI_AMR_ICON ICON "icons\\amr.ico"
+IDI_APE_ICON ICON "icons\\ape.ico"
+IDI_AU_ICON ICON "icons\\au.ico"
IDI_AVI_ICON ICON "icons\\avi.ico"
-IDI_MPG_ICON ICON "icons\\mpg.ico"
-IDI_MP4_ICON ICON "icons\\mp4.ico"
-IDI_MKV_ICON ICON "icons\\mkv.ico"
-IDI_OGM_ICON ICON "icons\\ogm.ico"
+IDI_BINK_ICON ICON "icons\\bink.ico"
+IDI_CDA_ICON ICON "icons\\cda.ico"
+IDI_D2V_ICON ICON "icons\\d2v.ico"
+IDI_DAT_ICON ICON "icons\\dat.ico"
+IDI_DRC_ICON ICON "icons\\drc.ico"
+IDI_DSM_ICON ICON "icons\\dsm.ico"
+IDI_DTS_ICON ICON "icons\\dts.ico"
+IDI_FLAC_ICON ICON "icons\\flac.ico"
+IDI_FLIC_ICON ICON "icons\\flic.ico"
IDI_FLV_ICON ICON "icons\\flv.ico"
-IDI_WMV_ICON ICON "icons\\wmv.ico"
+IDI_IFO_ICON ICON "icons\\ifo.ico"
+IDI_IVF_ICON ICON "icons\\ivf.ico"
+IDI_MIDI_ICON ICON "icons\\midi.ico"
+IDI_MKA_ICON ICON "icons\\mka.ico"
+IDI_MKV_ICON ICON "icons\\mkv.ico"
IDI_MOV_ICON ICON "icons\\mov.ico"
-IDI_RM_ICON ICON "icons\\rm.ico"
IDI_MP3_ICON ICON "icons\\mp3.ico"
-IDI_OGG_ICON ICON "icons\\ogg.ico"
-IDI_AAC_ICON ICON "icons\\aac.ico"
-IDI_MKA_ICON ICON "icons\\mka.ico"
-IDI_WMA_ICON ICON "icons\\wma.ico"
-IDI_RA_ICON ICON "icons\\ra.ico"
-IDI_WAV_ICON ICON "icons\\wav.ico"
+IDI_MP4_ICON ICON "icons\\mp4.ico"
IDI_MPA_ICON ICON "icons\\mpa.ico"
-IDI_CDA_ICON ICON "icons\\cda.ico"
IDI_MPC_ICON ICON "icons\\mpc.ico"
-IDI_FLAC_ICON ICON "icons\\flac.ico"
-IDI_ALAC_ICON ICON "icons\\alac.ico"
-IDI_PLC_ICON ICON "icons\\plc.ico"
-IDI_D2V_ICON ICON "icons\\d2v.ico"
-IDI_MID_ICON ICON "icons\\mid.ico"
-IDI_AIFF_ICON ICON "icons\\aiff.ico"
-IDI_AU_ICON ICON "icons\\au.ico"
-IDI_IVF_ICON ICON "icons\\ifv.ico"
-IDI_FLIC_ICON ICON "icons\\flic.ico"
-IDI_BIK_ICON ICON "icons\\bik.ico"
+IDI_MPEG_ICON ICON "icons\\mpeg.ico"
+IDI_OFR_ICON ICON "icons\\ofr.ico"
+IDI_OGG_ICON ICON "icons\\ogg.ico"
+IDI_OGM_ICON ICON "icons\\ogm.ico"
+IDI_PLAYLIST_ICON ICON "icons\\playlist.ico"
+IDI_RA_ICON ICON "icons\\ra.ico"
IDI_RATDVD_ICON ICON "icons\\ratdvd.ico"
+IDI_RM_ICON ICON "icons\\rm.ico"
IDI_ROQ_ICON ICON "icons\\roq.ico"
IDI_RT_ICON ICON "icons\\rt.ico"
-IDI_DRC_ICON ICON "icons\\drc.ico"
-IDI_DSM_ICON ICON "icons\\dsm.ico"
+IDI_SMK_ICON ICON "icons\\smk.ico"
IDI_SWF_ICON ICON "icons\\swf.ico"
-IDI_OTHER_ICON ICON "icons\\other.ico"
-IDI_DVDA_ICON ICON "icons\\dvda.ico"
-IDI_DVDF_ICON ICON "icons\\dvdf.ico"
+IDI_TS_ICON ICON "icons\\ts.ico"
+IDI_TTA_ICON ICON "icons\\tta.ico"
+IDI_VOB_ICON ICON "icons\\vob.ico"
+IDI_WAV_ICON ICON "icons\\wav.ico"
+IDI_WEBM_ICON ICON "icons\\webm.ico"
+IDI_WMA_ICON ICON "icons\\wma.ico"
+IDI_WMV_ICON ICON "icons\\wmv.ico"
+IDI_WV_ICON ICON "icons\\wv.ico"
+
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.vcproj b/src/apps/mplayerc/mpciconlib/mpciconlib.vcproj
index 5b89d0046..23e7cc8b0 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.vcproj
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.vcproj
@@ -199,6 +199,10 @@
>
</File>
<File
+ RelativePath=".\icons\ac3.ico"
+ >
+ </File>
+ <File
RelativePath=".\icons\aiff.ico"
>
</File>
@@ -207,6 +211,14 @@
>
</File>
<File
+ RelativePath=".\icons\amr.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icons\ape.ico"
+ >
+ </File>
+ <File
RelativePath=".\icons\au.ico"
>
</File>
@@ -215,7 +227,7 @@
>
</File>
<File
- RelativePath=".\icons\bik.ico"
+ RelativePath=".\icons\bink.ico"
>
</File>
<File
@@ -227,19 +239,16 @@
>
</File>
<File
- RelativePath=".\icons\drc.ico"
+ RelativePath=".\icons\dat.ico"
>
</File>
- <File
+ RelativePath=".\icons\drc.ico"
+ > </File> <File
RelativePath=".\icons\dsm.ico"
>
</File>
<File
- RelativePath=".\icons\dvda.ico"
- >
- </File>
- <File
- RelativePath=".\icons\dvdf.ico"
+ RelativePath=".\icons\dts.ico"
>
</File>
<File
@@ -255,15 +264,15 @@
>
</File>
<File
- RelativePath=".\icons\ifv.ico"
+ RelativePath=".\icons\ifo.ico"
>
</File>
<File
- RelativePath=".\icons\jpeg.ico"
+ RelativePath=".\icons\ivf.ico"
>
</File>
<File
- RelativePath=".\icons\mid.ico"
+ RelativePath=".\icons\midi.ico"
>
</File>
<File
@@ -295,7 +304,11 @@
>
</File>
<File
- RelativePath=".\icons\mpg.ico"
+ RelativePath=".\icons\mpeg.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icons\ofr.ico"
>
</File>
<File
@@ -311,7 +324,7 @@
>
</File>
<File
- RelativePath=".\icons\plc.ico"
+ RelativePath=".\icons\playlist.ico"
>
</File>
<File
@@ -319,7 +332,7 @@
>
</File>
<File
- RelativePath=".\icons\ratdvd.ico"
+ RelativePath=".\icons\rardvd.ico"
>
</File>
<File
@@ -335,14 +348,34 @@
>
</File>
<File
+ RelativePath=".\icons\smk.ico"
+ >
+ </File>
+ <File
RelativePath=".\icons\swf.ico"
>
</File>
<File
+ RelativePath=".\icons\ts.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icons\tta.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icons\vob.ico"
+ >
+ </File>
+ <File
RelativePath=".\icons\wav.ico"
>
</File>
<File
+ RelativePath=".\icons\webm.ico"
+ >
+ </File>
+ <File
RelativePath=".\icons\wma.ico"
>
</File>
@@ -350,6 +383,10 @@
RelativePath=".\icons\wmv.ico"
>
</File>
+ <File
+ RelativePath=".\icons\wv.ico"
+ >
+ </File>
</Filter>
</Filter>
<File
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj b/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj
index e7159d790..b70991633 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj
@@ -71,6 +71,9 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp" />
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp" />
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp" />
<ClCompile Include="mpciconlib.cpp" />
</ItemGroup>
<ItemGroup>
@@ -82,23 +85,26 @@
</ItemGroup>
<ItemGroup>
<None Include="icons\aac.ico" />
+ <None Include="icons\ac3.ico" />
<None Include="icons\aiff.ico" />
<None Include="icons\alac.ico" />
+ <None Include="icons\amr.ico" />
+ <None Include="icons\ape.ico" />
<None Include="icons\au.ico" />
<None Include="icons\avi.ico" />
- <None Include="icons\bik.ico" />
+ <None Include="icons\bink.ico" />
<None Include="icons\cda.ico" />
<None Include="icons\d2v.ico" />
+ <None Include="icons\dat.ico" />
<None Include="icons\drc.ico" />
<None Include="icons\dsm.ico" />
- <None Include="icons\dvda.ico" />
- <None Include="icons\dvdf.ico" />
+ <None Include="icons\dts.ico" />
<None Include="icons\flac.ico" />
<None Include="icons\flic.ico" />
<None Include="icons\flv.ico" />
- <None Include="icons\ifv.ico" />
- <None Include="icons\jpeg.ico" />
- <None Include="icons\mid.ico" />
+ <None Include="icons\ifo.ico" />
+ <None Include="icons\ivf.ico" />
+ <None Include="icons\midi.ico" />
<None Include="icons\mka.ico" />
<None Include="icons\mkv.ico" />
<None Include="icons\mov.ico" />
@@ -106,20 +112,27 @@
<None Include="icons\mp4.ico" />
<None Include="icons\mpa.ico" />
<None Include="icons\mpc.ico" />
- <None Include="icons\mpg.ico" />
+ <None Include="icons\mpeg.ico" />
+ <None Include="icons\ofr.ico" />
<None Include="icons\ogg.ico" />
<None Include="icons\ogm.ico" />
<None Include="icons\other.ico" />
- <None Include="icons\plc.ico" />
+ <None Include="icons\playlist.ico" />
<None Include="icons\ra.ico" />
<None Include="icons\ratdvd.ico" />
<None Include="icons\rm.ico" />
<None Include="icons\roq.ico" />
<None Include="icons\rt.ico" />
+ <None Include="icons\smk.ico" />
<None Include="icons\swf.ico" />
+ <None Include="icons\ts.ico" />
+ <None Include="icons\tta.ico" />
+ <None Include="icons\vob.ico" />
<None Include="icons\wav.ico" />
+ <None Include="icons\webm.ico" />
<None Include="icons\wma.ico" />
<None Include="icons\wmv.ico" />
+ <None Include="icons\wv.ico" />
<None Include="mpciconlib.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj.filters b/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj.filters
index fbef5b77d..192f81869 100644
--- a/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj.filters
+++ b/src/apps/mplayerc/mpciconlib/mpciconlib.vcxproj.filters
@@ -18,6 +18,15 @@
</Filter>
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="mpciconlib.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -42,19 +51,28 @@
<None Include="icons\aac.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\ac3.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
<None Include="icons\aiff.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\alac.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\amr.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
+ <None Include="icons\ape.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
<None Include="icons\au.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\avi.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\bik.ico">
+ <None Include="icons\bink.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\cda.ico">
@@ -63,16 +81,14 @@
<None Include="icons\d2v.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\drc.ico">
- <Filter>Resource Files\icons</Filter>
- </None>
- <None Include="icons\dsm.ico">
+ <None Include="icons\dat.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\dvda.ico">
+ <None Include="icons\drc.ico">
+ <Filter>Resource Files\icons</Filter> </None> <None Include="icons\dsm.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\dvdf.ico">
+ <None Include="icons\dts.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\flac.ico">
@@ -84,13 +100,13 @@
<None Include="icons\flv.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\ifv.ico">
+ <None Include="icons\ifo.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\jpeg.ico">
+ <None Include="icons\ivf.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\mid.ico">
+ <None Include="icons\midi.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\mka.ico">
@@ -114,7 +130,10 @@
<None Include="icons\mpc.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\mpg.ico">
+ <None Include="icons\mpeg.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
+ <None Include="icons\ofr.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\ogg.ico">
@@ -126,7 +145,7 @@
<None Include="icons\other.ico">
<Filter>Resource Files\icons</Filter>
</None>
- <None Include="icons\plc.ico">
+ <None Include="icons\playlist.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\ra.ico">
@@ -144,17 +163,35 @@
<None Include="icons\rt.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\smk.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
<None Include="icons\swf.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\ts.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
+ <None Include="icons\tta.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
+ <None Include="icons\vob.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
<None Include="icons\wav.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\webm.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
<None Include="icons\wma.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\wmv.ico">
<Filter>Resource Files\icons</Filter>
</None>
+ <None Include="icons\wv.ico">
+ <Filter>Resource Files\icons</Filter>
+ </None>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.br.rc b/src/apps/mplayerc/mpcresources/mplayerc.br.rc
index c267a194d..7a4b3ab05 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.br.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.br.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.by.rc b/src/apps/mplayerc/mpcresources/mplayerc.by.rc
index 98a13edbc..a9b25e4ce 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.by.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.by.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ca.rc b/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
index c132d8d5a..ef4c8074f 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.cz.rc b/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
index b0dd405de..d61b0295d 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.de.rc b/src/apps/mplayerc/mpcresources/mplayerc.de.rc
index a36061c54..e05f145c1 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.de.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.de.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.es.rc b/src/apps/mplayerc/mpcresources/mplayerc.es.rc
index 04ba4c4bf..341d36af2 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.es.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.es.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.fr.rc b/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
index 7f48c176b..f43e0e09c 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.hu.rc b/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
index c91742cb0..526038f78 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.hy.rc b/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
index ee0aa334d..8e7a0f19d 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.it.rc b/src/apps/mplayerc/mpcresources/mplayerc.it.rc
index 40e254ecf..65f748a62 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.it.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.it.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ja.rc b/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
index 897001b0d..a4ed401ec 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.kr.rc b/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
index 24cf854fc..a39578fcc 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.nl.rc b/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
index b6adfde8d..9e12b7baa 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.pl.rc b/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
index 308c87afe..6a98af0d4 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ru.rc b/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
index 9abce160d..a65233a9f 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sc.rc b/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
index 9ec96d91f..d5f6e4493 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sk.rc b/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
index bb587d76d..7d9c8feaf 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sv.rc b/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
index 4063fbb38..aa658b1eb 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.tc.rc b/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
index 96625f639..921d738dc 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.tr.rc b/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
index fb140f3fa..0aba858b6 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ua.rc b/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
index f9983d80b..9061204d7 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
index 5cdf73e36..cb153e0a8 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
index 5c5062922..3dcf99837 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
index 87fd0bffc..c0da4049f 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
index 973a86c02..9e55a9a92 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
index 8cad041ef..35914ef23 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
index 439d0762d..50b2d03fe 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
index ab08337e7..b189365f9 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
index a5e81892a..3f2dbf707 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
index f939640d2..04a31bba4 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
index 5e3cbfae7..61bdeb3c2 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
index a7f2a213e..a1f5132e0 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
index e9f7a7db1..a2f099d9a 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
index ca52a3af4..0bed51e81 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
index 53130e684..f93f81f16 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt
index 3c0986343..2ea2829be 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
index ec291d929..53d216435 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
index 765da9666..1b597dad8 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
index 6ad202493..a52285630 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
index f0055ee05..dc925682b 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
index 994e7b95b..c63bd7bf2 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
index e7a2d77d2..e2e309c9b 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
index 99415ed72..9e5c1e0d0 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc
index f91c91f53..fdc6ab051 100644
--- a/src/apps/mplayerc/mplayerc.rc
+++ b/src/apps/mplayerc/mplayerc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.vcxproj b/src/apps/mplayerc/mplayerc.vcxproj
index 0ab9f89da..4b81edff2 100644
--- a/src/apps/mplayerc/mplayerc.vcxproj
+++ b/src/apps/mplayerc/mplayerc.vcxproj
@@ -198,6 +198,9 @@ update_version.bat
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\thirdparty\mfc\afxctrlcontainer.cpp" />
+ <ClCompile Include="..\..\thirdparty\mfc\afxglobals.cpp" />
+ <ClCompile Include="..\..\thirdparty\mfc\winmdi.cpp" />
<ClCompile Include="AppSettings.cpp" />
<ClCompile Include="AuthDlg.cpp" />
<ClCompile Include="BaseGraph.cpp" />
@@ -583,9 +586,6 @@ update_version.bat
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="mplayerc.rc">
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_DEBUG;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NDEBUG;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/apps/mplayerc/mplayerc.vcxproj.filters b/src/apps/mplayerc/mplayerc.vcxproj.filters
index b6321432b..692a8a7f0 100644
--- a/src/apps/mplayerc/mplayerc.vcxproj.filters
+++ b/src/apps/mplayerc/mplayerc.vcxproj.filters
@@ -342,6 +342,15 @@
<ClCompile Include="AppSettings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="AuthDlg.h">
diff --git a/src/apps/mplayerc/resource.h b/src/apps/mplayerc/resource.h
index 345265dd8..18d910625 100644
--- a/src/apps/mplayerc/resource.h
+++ b/src/apps/mplayerc/resource.h
Binary files differ
diff --git a/src/apps/mplayerc/stdafx.h b/src/apps/mplayerc/stdafx.h
index c580fc393..fc64a27bc 100644
--- a/src/apps/mplayerc/stdafx.h
+++ b/src/apps/mplayerc/stdafx.h
@@ -21,41 +21,23 @@
*
*/
-#if !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
-#define AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_
-
#pragma once
-#include "../../DSUtil/SharedInclude.h"
-
-#define HITTEST_RET LRESULT
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#undef _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
+#include "../../../../include/stdafx_common_afx2.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#include <afxwin.h> // MFC core and standard components
-#include <afxext.h> // MFC extensions
-#include <afxdisp.h> // MFC Automation classes
-#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxdlgs.h>
-#define ResStr(id) CString(MAKEINTRESOURCE(id))
-
-#include <afxdisp.h>
-#include <afxole.h>
#include <Shlwapi.h>
#include <atlcoll.h>
#include <atlpath.h>
-#include "../../thirdparty/zlib/zlib.h"
-#include <streams.h>
-#include <dvdmedia.h>
-#include <mpconfig.h>
-#ifndef _WIN64
-#include <qt/qt.h>
-#endif
+#define HITTEST_RET LRESULT
+#include "../../thirdparty/zlib/zlib.h"
#include "../../CmdUI/CmdUI.h"
#include "../../thirdparty/ui/ResizableLib/ResizableDialog.h"
#include "../../thirdparty/ui/ResizableLib/ResizablePage.h"
@@ -66,15 +48,17 @@
#include "../../thirdparty/ui/TreePropSheet/TreePropSheet.h"
#include "../../DSUtil/DSUtil.h"
+#ifndef _WIN64
+#include <qt/qt.h>
+#endif
+
#include <gdiplus.h>
+#include <mpconfig.h>
+
+#define ResStr(id) CString(MAKEINTRESOURCE(id))
template <class T = CString, class S = CString>
class CAtlStringMap : public CAtlMap<S, T, CStringElementTraits<S> > {};
#define CheckAndLog(x, msg) hr = ##x; if (FAILED (hr)) { TRACE(msg" : 0x%08x\n", hr); return hr; }
#define CheckNoLog(x) hr = ##x; if (FAILED (hr)) { return hr; }
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
diff --git a/src/common.props b/src/common.props
index 4c29c4ced..c99f8a2b0 100644
--- a/src/common.props
+++ b/src/common.props
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <PreprocessorDefinitions>WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WINVER=0x0601;PSAPI_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
@@ -40,7 +40,6 @@
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <BufferSecurityCheck>true</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
@@ -48,8 +47,6 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LargeAddressAware>true</LargeAddressAware>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>true</DataExecutionPrevention>
<LinkIncremental>false</LinkIncremental>
</Link>
</ItemDefinitionGroup>
@@ -59,7 +56,6 @@
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <BufferSecurityCheck>true</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
@@ -67,8 +63,6 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LargeAddressAware>true</LargeAddressAware>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>true</DataExecutionPrevention>
<LinkIncremental>false</LinkIncremental>
</Link>
</ItemDefinitionGroup>
diff --git a/src/filters/BaseClasses/BaseClasses.vcxproj b/src/filters/BaseClasses/BaseClasses.vcxproj
index ebf11e6eb..3faabd994 100644
--- a/src/filters/BaseClasses/BaseClasses.vcxproj
+++ b/src/filters/BaseClasses/BaseClasses.vcxproj
@@ -84,6 +84,7 @@
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>strmiids.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -99,6 +100,7 @@
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>strmiids.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -111,6 +113,7 @@
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>strmiids.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -126,6 +129,7 @@
<PreprocessorDefinitions>_WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>strmiids.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/src/filters/BaseClasses/combase.cpp b/src/filters/BaseClasses/combase.cpp
index 25ed0c65d..254ca0f1d 100644
--- a/src/filters/BaseClasses/combase.cpp
+++ b/src/filters/BaseClasses/combase.cpp
@@ -164,6 +164,7 @@ STDMETHODIMP_(ULONG) CUnknown::NonDelegatingAddRef()
{
LONG lRef = InterlockedIncrement( &m_cRef );
ASSERT(lRef > 0);
+ UNREFERENCED_PARAMETER(lRef);
DbgLog((LOG_MEMORY,3,TEXT(" Obj %d ref++ = %d"),
m_dwCookie, m_cRef));
return ourmax(ULONG(m_cRef), 1ul);
diff --git a/src/filters/BaseClasses/combase.h b/src/filters/BaseClasses/combase.h
index 7b0d1edae..d051bf925 100644
--- a/src/filters/BaseClasses/combase.h
+++ b/src/filters/BaseClasses/combase.h
@@ -113,6 +113,14 @@ AMOVIESETUP_MEDIATYPE, * PAMOVIESETUP_MEDIATYPE, * FAR LPAMOVIESETUP_MEDIATYPE;
typedef REGFILTERPINS
AMOVIESETUP_PIN, * PAMOVIESETUP_PIN, * FAR LPAMOVIESETUP_PIN;
+// warning C4510: '_AMOVIESETUP_FILTER' : default constructor could not be generated, see declaration of '_AMOVIESETUP_FILTER'
+// warning C4610: struct '_AMOVIESETUP_FILTER' can never be instantiated - user defined constructor required
+// http://msdn.microsoft.com/en-us/library/2c8f766e(v=VS.100).aspx
+// 'once' - Display the specified message(s) only one time.
+// warning-specifier 'once' doesn't work
+//#pragma warning( once : 4510 4610 )
+#pragma warning( push )
+#pragma warning( disable : 4510 4610 )
typedef struct _AMOVIESETUP_FILTER
{
const CLSID * clsID;
@@ -123,8 +131,9 @@ typedef struct _AMOVIESETUP_FILTER
const CLSID filterCategory;
}
AMOVIESETUP_FILTER, * PAMOVIESETUP_FILTER, * FAR LPAMOVIESETUP_FILTER;
+#pragma warning( pop )
-/* The DLLENTRY module initialises the module handle on loading */
+/* The DLLENTRY module initializes the module handle on loading */
extern HINSTANCE g_hInst;
diff --git a/src/filters/BaseClasses/cprop.cpp b/src/filters/BaseClasses/cprop.cpp
index 7bd76b4e3..53aa9fdf8 100644
--- a/src/filters/BaseClasses/cprop.cpp
+++ b/src/filters/BaseClasses/cprop.cpp
@@ -54,6 +54,7 @@ STDMETHODIMP_(ULONG) CBasePropertyPage::NonDelegatingAddRef()
{
LONG lRef = InterlockedIncrement(&m_cRef);
ASSERT(lRef > 0);
+ UNREFERENCED_PARAMETER(lRef);
return max(ULONG(m_cRef),1ul);
}
diff --git a/src/filters/BaseClasses/ctlutil.cpp b/src/filters/BaseClasses/ctlutil.cpp
index 8ccb9dc3c..469dae754 100644
--- a/src/filters/BaseClasses/ctlutil.cpp
+++ b/src/filters/BaseClasses/ctlutil.cpp
@@ -2380,6 +2380,7 @@ CCmdQueue::SetTimeAdvise(void)
&m_dwAdvise);
ASSERT(SUCCEEDED(hr));
+ UNREFERENCED_PARAMETER(hr);
m_tCurrentAdvise = current;
}
}
diff --git a/src/filters/BaseClasses/dllsetup.cpp b/src/filters/BaseClasses/dllsetup.cpp
index c14c2f8e1..d14687a5b 100644
--- a/src/filters/BaseClasses/dllsetup.cpp
+++ b/src/filters/BaseClasses/dllsetup.cpp
@@ -126,6 +126,7 @@ AMovieSetupRegisterServer( CLSID clsServer
, szCLSID
, CHARS_IN_GUID );
ASSERT( SUCCEEDED(hr) );
+ UNREFERENCED_PARAMETER(hr);
// create key
//
diff --git a/src/filters/BaseClasses/transip.cpp b/src/filters/BaseClasses/transip.cpp
index e8e12eb5c..9910afd35 100644
--- a/src/filters/BaseClasses/transip.cpp
+++ b/src/filters/BaseClasses/transip.cpp
@@ -553,7 +553,9 @@ __out_opt IMediaSample * CTransInPlaceFilter::Copy(IMediaSample *pSource)
// Copy the sample data
{
BYTE *pSourceBuffer, *pDestBuffer;
+#ifdef _DEBUG
long lSourceSize = pSource->GetSize();
+#endif
long lDestSize = pDest->GetSize();
ASSERT(lDestSize >= lSourceSize && lDestSize >= lDataLength);
@@ -772,15 +774,16 @@ CTransInPlaceInputPin::NotifyAllocator(
hr = pAllocator->GetProperties(&Props);
if (SUCCEEDED(hr)) {
hr = pOutputAllocator->SetProperties(&Props, &Actual);
- }
- if (SUCCEEDED(hr)) {
- if ( (Props.cBuffers > Actual.cBuffers)
- || (Props.cbBuffer > Actual.cbBuffer)
- || (Props.cbAlign > Actual.cbAlign)
- ) {
- hr = E_FAIL;
- }
- }
+
+ if (SUCCEEDED(hr)) {
+ if ( (Props.cBuffers > Actual.cBuffers)
+ || (Props.cbBuffer > Actual.cbBuffer)
+ || (Props.cbAlign > Actual.cbAlign)
+ ) {
+ hr = E_FAIL;
+ }
+ }
+ }
// Set the allocator on the output pin
if (SUCCEEDED(hr)) {
diff --git a/src/filters/BaseClasses/winutil.cpp b/src/filters/BaseClasses/winutil.cpp
index 2648da5fa..ac6ff1aa4 100644
--- a/src/filters/BaseClasses/winutil.cpp
+++ b/src/filters/BaseClasses/winutil.cpp
@@ -455,7 +455,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, // Window handle
SetLastError(0); // because of the way SetWindowLong works
#endif
- LONG_PTR rc = _SetWindowLongPtr(hwnd, (DWORD) 0, pBaseWindow);
+#ifdef _DEBUG
+ LONG_PTR rc =
+#endif
+ _SetWindowLongPtr(hwnd, (DWORD) 0, pBaseWindow);
#ifdef _DEBUG
@@ -1005,6 +1008,7 @@ void CDrawImage::UpdateColourTable(HDC hdc,__in BITMAPINFOHEADER *pbmi)
// Should always succeed but check in debug builds
ASSERT(uiReturn == pbmi->biClrUsed);
+ UNREFERENCED_PARAMETER(uiReturn);
}
diff --git a/src/filters/BaseClasses/wxutil.cpp b/src/filters/BaseClasses/wxutil.cpp
index ad086d10b..e6ec5c203 100644
--- a/src/filters/BaseClasses/wxutil.cpp
+++ b/src/filters/BaseClasses/wxutil.cpp
@@ -344,7 +344,7 @@ CMsgThread::GetThreadMsg(__out CMsg *msg)
break;
}
}
- // the semaphore will be signalled when it is non-empty
+ // the semaphore will be signaled when it is non-empty
WaitForSingleObject(m_hSem, INFINITE);
}
// copy fields to caller's CMsg
@@ -619,8 +619,8 @@ DWORD WINAPI WaitDispatchingMessages(
{
BOOL bPeeked = FALSE;
DWORD dwResult;
- DWORD dwStart;
- DWORD dwThreadPriority;
+ DWORD dwStart = 0;
+ DWORD dwThreadPriority = THREAD_PRIORITY_NORMAL;
static UINT uMsgId = 0;
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
index ace44ad5a..bcad00bcc 100644
--- a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
+++ b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="DSMMuxer.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
index db6d2a69b..cb5b513a7 100644
--- a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
+++ b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="DSMMuxer.def">
diff --git a/src/filters/muxer/DSMMuxer/stdafx.h b/src/filters/muxer/DSMMuxer/stdafx.h
index bc925c87a..62aa27f45 100644
--- a/src/filters/muxer/DSMMuxer/stdafx.h
+++ b/src/filters/muxer/DSMMuxer/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -19,25 +16,13 @@
*
*/
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
#include <atlpath.h>
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
-
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
index 81cf5599d..2ea0246c6 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="MatroskaFile.cpp" />
<ClCompile Include="MatroskaMuxer.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
index d653d4775..5ac276fe6 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="MatroskaMuxer.def">
diff --git a/src/filters/muxer/MatroskaMuxer/stdafx.h b/src/filters/muxer/MatroskaMuxer/stdafx.h
index a24b77625..41145a210 100644
--- a/src/filters/muxer/MatroskaMuxer/stdafx.h
+++ b/src/filters/muxer/MatroskaMuxer/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -19,21 +16,9 @@
*
*/
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/muxer/WavDest/WavDest.vcxproj b/src/filters/muxer/WavDest/WavDest.vcxproj
index 28d06c2a5..255104b48 100644
--- a/src/filters/muxer/WavDest/WavDest.vcxproj
+++ b/src/filters/muxer/WavDest/WavDest.vcxproj
@@ -214,7 +214,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -232,11 +231,22 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">Create</PrecompiledHeader>
diff --git a/src/filters/muxer/WavDest/WavDest.vcxproj.filters b/src/filters/muxer/WavDest/WavDest.vcxproj.filters
index 6717c6254..835e73c72 100644
--- a/src/filters/muxer/WavDest/WavDest.vcxproj.filters
+++ b/src/filters/muxer/WavDest/WavDest.vcxproj.filters
@@ -17,6 +17,15 @@
<ClCompile Include="WavDest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="WavDest.def">
diff --git a/src/filters/muxer/WavDest/stdafx.h b/src/filters/muxer/WavDest/stdafx.h
index 811869bff..592d74bc5 100644
--- a/src/filters/muxer/WavDest/stdafx.h
+++ b/src/filters/muxer/WavDest/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -19,17 +16,8 @@
*
*/
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
diff --git a/src/filters/parser/AviSplitter/AviFile.cpp b/src/filters/parser/AviSplitter/AviFile.cpp
index 9b51d9fb0..dee5ffc40 100644
--- a/src/filters/parser/AviSplitter/AviFile.cpp
+++ b/src/filters/parser/AviSplitter/AviFile.cpp
@@ -39,7 +39,7 @@ HRESULT CAviFile::Init()
return E_FAIL;
}
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
if(s->strh.fccType != FCC('auds')) {
continue;
@@ -299,7 +299,7 @@ REFERENCE_TIME CAviFile::GetTotalTime()
{
REFERENCE_TIME t = 0/*10i64*m_avih.dwMicroSecPerFrame*m_avih.dwTotalFrames*/;
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
REFERENCE_TIME t2 = s->GetRefTime(s->cs.GetCount(), s->totalsize);
t = max(t, t2);
@@ -318,7 +318,7 @@ HRESULT CAviFile::BuildIndex()
DWORD nSuperIndexes = 0;
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
if(s->indx && s->indx->nEntriesInUse > 0) {
nSuperIndexes++;
@@ -326,14 +326,14 @@ HRESULT CAviFile::BuildIndex()
}
if(nSuperIndexes == m_avih.dwStreams) {
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
AVISUPERINDEX* idx = (AVISUPERINDEX*)s->indx;
DWORD nEntriesInUse = 0;
- for(int j = 0; j < (int)idx->nEntriesInUse; j++) {
+ for(DWORD j = 0; j < idx->nEntriesInUse; ++j) {
Seek(idx->aIndex[j].qwOffset);
AVISTDINDEX stdidx;
@@ -350,7 +350,7 @@ HRESULT CAviFile::BuildIndex()
DWORD frame = 0;
UINT64 size = 0;
- for(int j = 0; j < (int)idx->nEntriesInUse; j++) {
+ for(DWORD j = 0; j < idx->nEntriesInUse; ++j) {
Seek(idx->aIndex[j].qwOffset);
CAutoPtr<AVISTDINDEX> p((AVISTDINDEX*)DNew BYTE[idx->aIndex[j].dwSize]);
@@ -359,7 +359,7 @@ HRESULT CAviFile::BuildIndex()
return E_FAIL;
}
- for(int k = 0; k < (int)p->nEntriesInUse; k++) {
+ for(DWORD k = 0; k < p->nEntriesInUse; ++k) {
s->cs[frame].size = size;
s->cs[frame].filepos = p->qwBaseOffset + p->aIndex[k].dwOffset;
s->cs[frame].fKeyFrame = !(p->aIndex[k].dwSize&AVISTDINDEX_DELTAFRAME)
@@ -372,7 +372,7 @@ HRESULT CAviFile::BuildIndex()
s->cs[frame].fChunkHdr = true;
}
- frame++;
+ ++frame;
size += s->GetChunkSize(p->aIndex[k].dwSize&AVISTDINDEX_SIZEMASK);
}
}
@@ -380,18 +380,18 @@ HRESULT CAviFile::BuildIndex()
s->totalsize = size;
}
} else if(AVIOLDINDEX* idx = m_idx1) {
- int len = idx->cb/sizeof(idx->aIndex[0]);
+ DWORD len = idx->cb / sizeof(idx->aIndex[0]);
UINT64 offset = m_movis.GetHead() + 8;
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
- int nFrames = 0;
+ DWORD nFrames = 0;
- for(int j = 0; j < len; j++) {
+ for(DWORD j = 0; j < len; ++j) {
if(TRACKNUM(idx->aIndex[j].dwChunkId) == i) {
- nFrames++;
+ ++nFrames;
}
}
@@ -400,7 +400,7 @@ HRESULT CAviFile::BuildIndex()
DWORD frame = 0;
UINT64 size = 0;
- for(int j = 0; j < len; j++) {
+ for(DWORD j = 0; j < len; ++j) {
DWORD TrackNumber = TRACKNUM(idx->aIndex[j].dwChunkId);
if(TrackNumber == i) {
@@ -422,7 +422,7 @@ HRESULT CAviFile::BuildIndex()
s->cs[frame].fChunkHdr = j == len-1 || idx->aIndex[j].dwOffset != idx->aIndex[j+1].dwOffset;
s->cs[frame].orgsize = idx->aIndex[j].dwSize;
- frame++;
+ ++frame;
size += s->GetChunkSize(idx->aIndex[j].dwSize);
}
}
@@ -432,7 +432,7 @@ HRESULT CAviFile::BuildIndex()
}
m_idx1.Free();
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
m_strms[i]->indx.Free();
}
@@ -441,7 +441,7 @@ HRESULT CAviFile::BuildIndex()
void CAviFile::EmptyIndex()
{
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
strm_t* s = m_strms[i];
s->cs.RemoveAll();
s->totalsize = 0;
@@ -457,7 +457,7 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
if(m_avih.dwFlags&AVIF_ISINTERLEAVED) // not reliable, nandub can write f*cked up files and still sets it
return(true);
*/
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
m_strms[i]->cs2.SetCount(m_strms[i]->cs.GetCount());
}
@@ -473,8 +473,8 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
UINT64 fpmin = _I64_MAX;
DWORD n = (DWORD)-1;
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
- int curchunk = curchunks[i];
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
+ DWORD curchunk = curchunks[i];
CAtlArray<strm_t::chunk>& cs = m_strms[i]->cs;
if(curchunk >= cs.GetCount()) {
continue;
@@ -501,7 +501,7 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
}
cursize = s->cs[curchunk].size;
- curchunk++;
+ ++curchunk;
}
memset(curchunks, 0, sizeof(DWORD)*m_avih.dwStreams);
@@ -513,9 +513,9 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
while(fInterleaved) {
strm_t::chunk2 cs2min = {LONG_MAX, LONG_MAX};
- int n = -1;
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
- int curchunk = curchunks[i];
+ DWORD n = (DWORD)-1;
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
+ DWORD curchunk = curchunks[i];
if(curchunk >= m_strms[i]->cs2.GetCount()) {
continue;
}
@@ -529,7 +529,7 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
break;
}
- curchunks[n]++;
+ ++curchunks[n];
if(cs2last.t >= 0 && abs((int)cs2min.n - (int)cs2last.n) >= 1000) {
fInterleaved = false;
@@ -543,7 +543,7 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
if(fInterleaved && !fKeepInfo) {
// this is not needed anymore, let's save a little memory then
- for(int i = 0; i < (int)m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < m_avih.dwStreams; ++i) {
m_strms[i]->cs2.RemoveAll();
}
}
diff --git a/src/filters/parser/AviSplitter/AviReportWnd.cpp b/src/filters/parser/AviSplitter/AviReportWnd.cpp
index 18b2dc44f..d522ebbee 100644
--- a/src/filters/parser/AviSplitter/AviReportWnd.cpp
+++ b/src/filters/parser/AviSplitter/AviReportWnd.cpp
@@ -15,7 +15,7 @@ bool CAviReportWnd::DoModal(CAviFile* pAF, bool fHideChecked, bool fShowWarningT
m_nChunks = 0;
m_rtDur = 0;
- for(int i = 0; i < (int)pAF->m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < pAF->m_avih.dwStreams; ++i) {
int cnt = pAF->m_strms[i]->cs2.GetCount();
if(cnt <= 0) {
continue;
@@ -232,8 +232,8 @@ bool CAviPlotterWnd::Create(CAviFile* pAF, CRect r, CWnd* pParentWnd)
COLORREF clr[] = {0x0000ff,0xff0000,0x40ffff,0xff40ff,0xffff40,0xffffff};
- for(int i = 0, y = 40, dy = m_dc.GetTextExtent(_T("Stream N")).cy + 1; i < (int)pAF->m_avih.dwStreams; i++, y += dy) {
- m_dc.SetTextColor(clr[i%pAF->m_avih.dwStreams]);
+ for(DWORD i = 0, y = 40, dy = m_dc.GetTextExtent(_T("Stream N")).cy + 1; i < pAF->m_avih.dwStreams; ++i, y += dy) {
+ m_dc.SetTextColor(clr[i % pAF->m_avih.dwStreams]);
m_dc.SetBkMode(TRANSPARENT);
CString str;
str.Format(_T("Stream %d"), i);
@@ -242,7 +242,7 @@ bool CAviPlotterWnd::Create(CAviFile* pAF, CRect r, CWnd* pParentWnd)
DWORD nmax = 0, tmax = 0;
- for(int i = 0; i < (int)pAF->m_avih.dwStreams; i++) {
+ for(DWORD i = 0; i < pAF->m_avih.dwStreams; ++i) {
int cnt = pAF->m_strms[i]->cs2.GetCount();
if(cnt <= 0) {
continue;
@@ -276,9 +276,9 @@ bool CAviPlotterWnd::Create(CAviFile* pAF, CRect r, CWnd* pParentWnd)
while(1) {
CAviFile::strm_t::chunk2 cs2min = {LONG_MAX, LONG_MAX};
- int n = -1;
- for(int i = 0; i < (int)pAF->m_avih.dwStreams; i++) {
- int curchunk = curchunks[i];
+ DWORD n = (DWORD)-1;
+ for(DWORD i = 0; i < pAF->m_avih.dwStreams; ++i) {
+ DWORD curchunk = curchunks[i];
if(curchunk >= pAF->m_strms[i]->cs2.GetCount()) {
continue;
}
diff --git a/src/filters/parser/AviSplitter/AviSplitter.cpp b/src/filters/parser/AviSplitter/AviSplitter.cpp
index da1093520..3dd2c7052 100644
--- a/src/filters/parser/AviSplitter/AviSplitter.cpp
+++ b/src/filters/parser/AviSplitter/AviSplitter.cpp
@@ -359,7 +359,7 @@ bool CAviSplitterFilter::DemuxInit()
bool fReIndex = false;
- for(int i = 0; i < (int)m_pFile->m_avih.dwStreams && !fReIndex; i++) {
+ for(DWORD i = 0; i < m_pFile->m_avih.dwStreams && !fReIndex; ++i) {
if(m_pFile->m_strms[i]->cs.GetCount() == 0 && GetOutputPin(i)) {
fReIndex = true;
}
@@ -471,7 +471,7 @@ void CAviSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
if(rt > 0) {
UINT64 minfp = _I64_MAX;
- for(int j = 0; j < (int)m_pFile->m_strms.GetCount(); j++) {
+ for(size_t j = 0; j < m_pFile->m_strms.GetCount(); ++j) {
CAviFile::strm_t* s = m_pFile->m_strms[j];
int f = s->GetKeyFrame(rt);
@@ -482,10 +482,10 @@ void CAviSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
}
}
- for(int j = 0; j < (int)m_pFile->m_strms.GetCount(); j++) {
+ for(size_t j = 0; j < m_pFile->m_strms.GetCount(); ++j) {
CAviFile::strm_t* s = m_pFile->m_strms[j];
- for(int i = 0; i < s->cs.GetCount(); i++) {
+ for(size_t i = 0; i < s->cs.GetCount(); ++i) {
CAviFile::strm_t::chunk& c = s->cs[i];
if(c.filepos >= minfp) {
m_tFrame[j] = i;
@@ -502,17 +502,17 @@ bool CAviSplitterFilter::DemuxLoop()
{
HRESULT hr = S_OK;
- int nTracks = (int)m_pFile->m_strms.GetCount();
+ size_t nTracks = m_pFile->m_strms.GetCount();
CAtlArray<BOOL> fDiscontinuity;
fDiscontinuity.SetCount(nTracks);
memset(fDiscontinuity.GetData(), 0, nTracks*sizeof(bool));
while(SUCCEEDED(hr) && !CheckRequest(NULL)) {
- int minTrack = nTracks;
+ size_t minTrack = nTracks;
UINT64 minFilePos = _I64_MAX;
- for(int i = 0; i < nTracks; i++) {
+ for(size_t i = 0; i < nTracks; ++i) {
CAviFile::strm_t* s = m_pFile->m_strms[i];
DWORD f = m_tFrame[i];
@@ -605,7 +605,7 @@ STDMETHODIMP CAviSplitterFilter::GetDuration(LONGLONG* pDuration)
CheckPointer(m_pFile, VFW_E_NOT_CONNECTED);
if(m_timeformat == TIME_FORMAT_FRAME) {
- for(int i = 0; i < (int)m_pFile->m_strms.GetCount(); i++) {
+ for(size_t i = 0; i < m_pFile->m_strms.GetCount(); ++i) {
CAviFile::strm_t* s = m_pFile->m_strms[i];
if(s->strh.fccType == FCC('vids')) {
*pDuration = s->cs.GetCount();
diff --git a/src/filters/parser/AviSplitter/AviSplitter.vcxproj b/src/filters/parser/AviSplitter/AviSplitter.vcxproj
index 7487efaaa..4b2a88383 100644
--- a/src/filters/parser/AviSplitter/AviSplitter.vcxproj
+++ b/src/filters/parser/AviSplitter/AviSplitter.vcxproj
@@ -222,7 +222,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AviSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -245,7 +244,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AviSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -253,6 +251,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="AviFile.cpp" />
<ClCompile Include="AviReportWnd.cpp" />
<ClCompile Include="AviSplitter.cpp" />
diff --git a/src/filters/parser/AviSplitter/AviSplitter.vcxproj.filters b/src/filters/parser/AviSplitter/AviSplitter.vcxproj.filters
index 4723c62cc..cf151abcf 100644
--- a/src/filters/parser/AviSplitter/AviSplitter.vcxproj.filters
+++ b/src/filters/parser/AviSplitter/AviSplitter.vcxproj.filters
@@ -27,6 +27,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="AviSplitter.def">
diff --git a/src/filters/parser/AviSplitter/stdafx.h b/src/filters/parser/AviSplitter/stdafx.h
index 37bcea3a7..41145a210 100644
--- a/src/filters/parser/AviSplitter/stdafx.h
+++ b/src/filters/parser/AviSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,19 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
-#include "../../../DSUtil/DSUtil.h"
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index 9749ac27a..c7bbbd1aa 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
@@ -1229,7 +1229,7 @@ STDMETHODIMP CBaseSplitterFilter::Load(LPCOLESTR pszFileName, const AM_MEDIA_TYP
{
CString str;
CHdmvClipInfo::PlaylistChapter& chap = Chapters.GetNext(pos);
- if (chap.m_nMarkType == CHdmvClipInfo::PlaylistMarkType::EntryMark)
+ if (chap.m_nMarkType == CHdmvClipInfo::EntryMark)
{
str.Format (_T("Chapter %d"), i);
ChapAppend (chap.m_rtTimestamp, str);
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
index 31db85b0e..759e9547b 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
@@ -1251,6 +1251,24 @@ bool CBaseSplitterFileEx::Read(pvahdr& h, bool fSync)
return(true);
}
+void CBaseSplitterFileEx::HrdParameters(CGolombBuffer& gb)
+{
+ unsigned int cnt = gb.UExpGolombRead(); // cpb_cnt_minus1
+ gb.BitRead(4); // bit_rate_scale
+ gb.BitRead(4); // cpb_size_scale
+
+ for(unsigned int i = 0; i <= cnt; i++ ) {
+ gb.UExpGolombRead(); // bit_rate_value_minus1
+ gb.UExpGolombRead(); // cpb_size_value_minus1
+ gb.BitRead(1); // cbr_flag
+ }
+
+ gb.BitRead(5); // initial_cpb_removal_delay_length_minus1
+ gb.BitRead(5); // cpb_removal_delay_length_minus1
+ gb.BitRead(5); // dpb_output_delay_length_minus1
+ gb.BitRead(5); // time_offset_length
+}
+
void CBaseSplitterFileEx::RemoveMpegEscapeCode(BYTE* dst, BYTE* src, int length)
{
int si=0;
@@ -1283,7 +1301,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
bool repeat = false;
// At least a SPS (normal or subset) and a PPS is required
- while(GetPos() < endpos+4 && (!h.spspps[index_sps].complete || !h.spspps[index_pps].complete || repeat))
+ while(GetPos() < endpos+4 && (!(h.spspps[index_sps].complete || h.spspps[index_subsetsps].complete) || !h.spspps[index_pps1].complete || repeat))
{
BYTE id = h.lastid;
repeat = false;
@@ -1294,8 +1312,10 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
if((id&0x60) != 0) {
if((id&0x9f) == 0x07) {
index = index_sps;
+ } else if((id&0x9f) == 0x0F) {
+ index = index_subsetsps;
} else if((id&0x9f) == 0x08) {
- index = h.spspps[index_pps].complete ? index_pps2 : index_pps;
+ index = h.spspps[index_pps1].complete ? index_pps2 : index_pps1;
}
}
@@ -1355,19 +1375,8 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
}
// Exit and wait for next packet if there is no SPS and PPS yet
- if(!h.spspps[index_sps].complete || !h.spspps[index_pps].complete || repeat) {
- return(false);
- }
+ if((!h.spspps[index_sps].complete && !h.spspps[index_subsetsps].complete) || !h.spspps[index_pps1].complete || repeat) {
- if(!((h.level == 10) || (h.level == 11) || (h.level == 12) ||
- (h.level == 13) || (h.level == 20) || (h.level == 21) ||
- (h.level == 22) || (h.level == 30) || (h.level == 31) ||
- (h.level == 32) || (h.level == 40) || (h.level == 41) ||
- (h.level == 42) || (h.level == 50) || (h.level == 51))) {
- return(false);
- }
-
- if(h.height<300 || h.width<300) {
return(false);
}
@@ -1378,25 +1387,45 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
{
// Calculate size of extra data
int extra = 0;
- for(int i = 0; i < 3; i++) {
+ for(int i = 0; i < 4; i++) {
if(h.spspps[i].complete)
extra += 2+(h.spspps[i].size);
}
pmt->majortype = MEDIATYPE_Video;
- pmt->subtype = FOURCCMap('1CVA'); // AVC stream
+ if (h.spspps[index_subsetsps].complete && !h.spspps[index_sps].complete) {
+ pmt->subtype = FOURCCMap('CVME'); // MVC stream without base view
+ } else if (h.spspps[index_subsetsps].complete && h.spspps[index_sps].complete) {
+ pmt->subtype = FOURCCMap('CVMA'); // MVC stream with base view
+ } else {
+ pmt->subtype = FOURCCMap('1CVA'); // AVC stream
+ }
+ //pmt->subtype = MEDIASUBTYPE_H264; // TODO : put MEDIASUBTYPE_H264 to support Windows 7 decoder !
pmt->formattype = FORMAT_MPEG2_VIDEO;
int len = FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader) + extra;
MPEG2VIDEOINFO* vi = (MPEG2VIDEOINFO*)DNew BYTE[len];
memset(vi, 0, len);
// vi->hdr.dwBitRate = ;
vi->hdr.AvgTimePerFrame = h.AvgTimePerFrame;
- vi->hdr.dwPictAspectRatioX = h.width;
- vi->hdr.dwPictAspectRatioY = h.height;
+ if(!h.sar.num) h.sar.num = 1;
+ if(!h.sar.den) h.sar.den = 1;
+ CSize aspect(h.width * h.sar.num, h.height * h.sar.den);
+ int lnko = LNKO(aspect.cx, aspect.cy);
+ if(lnko > 1) {
+ aspect.cx /= lnko, aspect.cy /= lnko;
+ }
+ vi->hdr.dwPictAspectRatioX = aspect.cx;
+ vi->hdr.dwPictAspectRatioY = aspect.cy;
vi->hdr.bmiHeader.biSize = sizeof(vi->hdr.bmiHeader);
vi->hdr.bmiHeader.biWidth = h.width;
vi->hdr.bmiHeader.biHeight = h.height;
- vi->hdr.bmiHeader.biCompression = '1CVA';
+ if (h.spspps[index_subsetsps].complete && !h.spspps[index_sps].complete) {
+ vi->hdr.bmiHeader.biCompression = 'CVME';
+ } else if (h.spspps[index_subsetsps].complete && h.spspps[index_sps].complete) {
+ vi->hdr.bmiHeader.biCompression = 'CVMA';
+ } else {
+ vi->hdr.bmiHeader.biCompression = '1CVA';
+ }
vi->dwProfile = h.profile;
vi->dwFlags = 4; // ?
vi->dwLevel = h.level;
@@ -1404,7 +1433,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
// Copy extra data
BYTE* p = (BYTE*)&vi->dwSequenceHeader[0];
- for(int i = 0; i < 3; i++) {
+ for(int i = 0; i < 4; i++) {
if(h.spspps[i].complete) {
*p++ = (h.spspps[i].size) >> 8;
*p++ = (h.spspps[i].size) & 0xff;
@@ -1423,7 +1452,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt)
bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
{
// Only care about SPS and subset SPS
- if(index != index_sps)
+ if(index != index_sps && index != index_subsetsps)
return true;
// Manage escape codes
@@ -1473,6 +1502,8 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
for(int i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {
gb.SExpGolombRead(); // offset_for_ref_frame[i]
}
+ } else if(pic_order_cnt_type != 2) {
+ return(false);
}
gb.UExpGolombRead(); // num_ref_frames
@@ -1492,7 +1523,12 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
if(!frame_mbs_only_flag) {
gb.BitRead(1); // mb_adaptive_frame_field_flag
}
- gb.BitRead(1); // direct_8x8_inference_flag
+
+ BYTE direct_8x8_inference_flag = (BYTE)gb.BitRead(1); // direct_8x8_inference_flag
+ if(!frame_mbs_only_flag && !direct_8x8_inference_flag) {
+ return(false);
+ }
+
if(gb.BitRead(1)) { // frame_cropping_flag
gb.UExpGolombRead(); // frame_cropping_rect_left_offset
gb.UExpGolombRead(); // frame_cropping_rect_right_offset
@@ -1502,10 +1538,19 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
if(gb.BitRead(1)) { // vui_parameters_present_flag
if(gb.BitRead(1)) { // aspect_ratio_info_present_flag
- if(255==(BYTE)gb.BitRead(8)) { // aspect_ratio_idc
- gb.BitRead(16); // sar_width
- gb.BitRead(16); // sar_height
+ BYTE aspect_ratio_idc = gb.BitRead(8); // aspect_ratio_idc
+ if(255==(BYTE)aspect_ratio_idc) {
+ h.sar.num = gb.BitRead(16); // sar_width
+ h.sar.den = gb.BitRead(16); // sar_height
+ } else if(aspect_ratio_idc < 17) {
+ h.sar.num = pixel_aspect[aspect_ratio_idc][0];
+ h.sar.den = pixel_aspect[aspect_ratio_idc][1];
+ } else {
+ return (false);
}
+ } else {
+ h.sar.num = 1;
+ h.sar.den = 1;
}
if(gb.BitRead(1)) { // overscan_info_present_flag
@@ -1528,7 +1573,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
if(gb.BitRead(1)) { // timing_info_present_flag
__int64 num_units_in_tick = gb.BitRead(32);
__int64 time_scale = gb.BitRead(32);
- long fixed_frame_rate_flag = gb.BitRead(1);
+ /*long fixed_frame_rate_flag = */gb.BitRead(1);
// Trick for weird parameters
if ((num_units_in_tick < 1000) || (num_units_in_tick > 1001)) {
@@ -1546,7 +1591,117 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
h.AvgTimePerFrame = (10000000I64*num_units_in_tick)/time_scale;
}
}
+
+ bool nalflag = gb.BitRead(1); // nal_hrd_parameters_present_flag
+ if(nalflag) {
+ HrdParameters(gb);
+ }
+ bool vlcflag = gb.BitRead(1); // vlc_hrd_parameters_present_flag
+ if(vlcflag) {
+ HrdParameters(gb);
+ }
+ if(nalflag || vlcflag) {
+ gb.BitRead(1); // low_delay_hrd_flag
+ }
+
+ gb.BitRead(1); // pic_struct_present_flag
+ if(gb.BitRead(1)) { // bitstream_restriction_flag
+ gb.BitRead(1); // motion_vectors_over_pic_boundaries_flag
+ gb.UExpGolombRead(); // max_bytes_per_pic_denom
+ gb.UExpGolombRead(); // max_bits_per_mb_denom
+ gb.UExpGolombRead(); // log2_max_mv_length_horizontal
+ gb.UExpGolombRead(); // log2_max_mv_length_vertical
+ gb.UExpGolombRead(); // num_reorder_frames
+ gb.UExpGolombRead(); // max_dec_frame_buffering
+ }
+ }
+
+ if(index == index_subsetsps) {
+ if(h.profile == 83 || h.profile == 86) {
+ // TODO: SVC extensions
+ return false;
+ } else if(h.profile == 118 || h.profile == 128) {
+ gb.BitRead(1); // bit_equal_to_one
+
+ // seq_parameter_set_mvc_extension
+ h.views = (unsigned int) gb.UExpGolombRead()+1;
+
+ /*
+ for(unsigned int i = 0; i < h.views; i++) {
+ gb.UExpGolombRead(); // view_id
+ }
+
+ for(unsigned int i = 1; i < h.views; i++) {
+ for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l0
+ gb.UExpGolombRead(); // anchor_refs_l0
+ }
+ for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l1
+ gb.UExpGolombRead(); // anchor_refs_l1
+ }
+ }
+
+ for(unsigned int i = 1; i < h.views; i++) {
+ for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l0
+ gb.UExpGolombRead(); // non_anchor_refs_l0
+ }
+ for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l1
+ gb.UExpGolombRead(); // non_anchor_refs_l1
+ }
+ }
+
+ for(unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // num_level_values_signalled_minus1
+ gb.BitRead(8); // level_idc
+ for(int j = 0; j <= gb.UExpGolombRead(); j++) { // num_applicable_ops_minus1
+ gb.BitRead(3); // applicable_op_temporal_id
+ for(int k = 0; k <= gb.UExpGolombRead(); k++) { // applicable_op_num_target_views_minus1
+ gb.UExpGolombRead(); // applicable_op_traget_view_id
+ }
+ gb.UExpGolombRead(); // applicable_op_num_views_minus1
+ }
+ }
+
+ if(gb.BitRead(1)) { // mvc_vui_parameters_present_flag
+ // mvc_vui_parameters_extension
+ for(unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // vui_mvc_num_ops_minus1
+ gb.BitRead(3);
+ for(unsigned int j = 0; j <= gb.UExpGolombRead(); j++) { // vui_mvc_num_target_output_views_minus1
+ gb.UExpGolombRead(); // vui_mvc_view_id
+ }
+ if(gb.BitRead(1)) { // vui_mvc_timing_info_present_flag
+ gb.BitRead(32); // vui_mvc_num_units_in_tick
+ gb.BitRead(32); // vui_mvc_time_scale
+ gb.BitRead(1); // vui_mvc_fixed_frame_rate_flag
+ }
+ bool nalflag = gb.BitRead(1); // vui_mvc_nal_hrd_parameters_present_flag
+ if(nalflag) {
+ HrdParameters(gb);
+ }
+ bool vclflag = gb.BitRead(1); // vui_mvc_vcl_hrd_parameters_present_flag
+ if(vclflag) {
+ HrdParameters(gb);
+ }
+ if(nalflag || vclflag) {
+ gb.BitRead(1); // vui_mvc_low_delay_hrd_flag
+ }
+ gb.BitRead(1); // vui_mvc_pic_struct_present_flag
+ }
+ }
+ */
+ }
+ }
+
+ if(!((h.level == 10) || (h.level == 11) || (h.level == 12) ||
+ (h.level == 13) || (h.level == 20) || (h.level == 21) ||
+ (h.level == 22) || (h.level == 30) || (h.level == 31) ||
+ (h.level == 32) || (h.level == 40) || (h.level == 41) ||
+ (h.level == 42) || (h.level == 50) || (h.level == 51))) {
+ return(false);
}
+
+ if(h.height<300 || h.width<300) {
+ return(false);
+ }
+
return true;
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h
index 23571c4b2..04498c136 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h
+++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h
@@ -24,6 +24,27 @@
#include "BaseSplitterFile.h"
#define MAX_SPSPPS 256 // Max size for a SPS/PPS packet
+class CGolombBuffer;
+
+static const byte pixel_aspect[17][2]={
+ {0, 1},
+ {1, 1},
+ {12, 11},
+ {10, 11},
+ {16, 11},
+ {40, 33},
+ {24, 11},
+ {20, 11},
+ {32, 11},
+ {80, 33},
+ {18, 11},
+ {15, 11},
+ {64, 33},
+ {160,99},
+ {4, 3},
+ {3, 2},
+ {2, 1},
+};
class CBaseSplitterFileEx : public CBaseSplitterFile
{
@@ -323,8 +344,9 @@ public:
enum spsppsindex {
index_unknown = -1,
+ index_subsetsps = 0,
index_sps = 1,
- index_pps = 2,
+ index_pps1 = 2,
index_pps2 = 3,
};
@@ -337,15 +359,21 @@ public:
struct avchdr {
BYTE profile, level;
unsigned int width, height;
+ unsigned int views;
__int64 AvgTimePerFrame;
+ struct sar{
+ BYTE num;
+ BYTE den;
+ }sar;
- spsppsdata spspps[3];
+ spsppsdata spspps[4];
BYTE lastid;
avchdr()
{
memset(spspps, 0, sizeof(spspps));
lastid = 0;
+ views = 1;
AvgTimePerFrame = 0;
}
};
@@ -396,5 +424,6 @@ public:
bool Read(dvbsub& h, int len, CMediaType* pmt = NULL);
bool Read(avchdr& h, spsppsindex index);
+ void HrdParameters(CGolombBuffer& gb);
void RemoveMpegEscapeCode(BYTE* dst, BYTE* src, int length);
};
diff --git a/src/filters/parser/BaseSplitter/stdafx.h b/src/filters/parser/BaseSplitter/stdafx.h
index eb1a0a29e..41145a210 100644
--- a/src/filters/parser/BaseSplitter/stdafx.h
+++ b/src/filters/parser/BaseSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,18 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
index 6c9f32a6c..b3e74a3f0 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
@@ -222,7 +222,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -243,7 +242,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -251,6 +249,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="DSMSplitter.cpp" />
<ClCompile Include="DSMSplitterFile.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
index cabc05e43..7178783c8 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="DSMSplitter.def">
diff --git a/src/filters/parser/DSMSplitter/stdafx.h b/src/filters/parser/DSMSplitter/stdafx.h
index 9b252ac14..75b000d77 100644
--- a/src/filters/parser/DSMSplitter/stdafx.h
+++ b/src/filters/parser/DSMSplitter/stdafx.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2003-2006 Gabest
* http://www.gabest.org
- *
+/*
* This Program 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 2, or (at your option)
@@ -20,19 +20,10 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
#include <atlcoll.h>
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
diff --git a/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj b/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj
index a3d4ebfaa..9b517ab51 100644
--- a/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj
+++ b/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj
@@ -241,6 +241,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="DiracSplitter.cpp" />
<ClCompile Include="DiracSplitterFile.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj.filters b/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj.filters
index a7523d573..5759af729 100644
--- a/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj.filters
+++ b/src/filters/parser/DiracSplitter/DiracSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="DiracSplitter.def">
diff --git a/src/filters/parser/DiracSplitter/stdafx.h b/src/filters/parser/DiracSplitter/stdafx.h
index 80f199e99..8d78ef60d 100644
--- a/src/filters/parser/DiracSplitter/stdafx.h
+++ b/src/filters/parser/DiracSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,21 +17,11 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
diff --git a/src/filters/parser/FLVSplitter/FLVSplitter.cpp b/src/filters/parser/FLVSplitter/FLVSplitter.cpp
index 9dfd01bb6..75725a765 100644
--- a/src/filters/parser/FLVSplitter/FLVSplitter.cpp
+++ b/src/filters/parser/FLVSplitter/FLVSplitter.cpp
@@ -702,8 +702,8 @@ bool CFLVSplitterFilter::DemuxLoop()
CAutoPtr<Packet> p;
Tag t;
- AudioTag at;
- VideoTag vt;
+ AudioTag at = {};
+ VideoTag vt = {};
while(SUCCEEDED(hr) && !CheckRequest(NULL) && m_pFile->GetRemaining()) {
if(!ReadTag(t)) {
diff --git a/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj b/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj
index 2670ec27e..f774fc110 100644
--- a/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj
+++ b/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj
@@ -222,7 +222,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FLVSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -243,7 +242,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FLVSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -251,6 +249,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="FLVSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj.filters b/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj.filters
index 064873ff6..2ff1792ed 100644
--- a/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj.filters
+++ b/src/filters/parser/FLVSplitter/FLVSplitter.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="FLVSplitter.def">
diff --git a/src/filters/parser/FLVSplitter/stdafx.h b/src/filters/parser/FLVSplitter/stdafx.h
index 9b252ac14..41145a210 100644
--- a/src/filters/parser/FLVSplitter/stdafx.h
+++ b/src/filters/parser/FLVSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,19 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-#include <atlcoll.h>
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4Atom.h b/src/filters/parser/MP4Splitter/AP4/Core/Ap4Atom.h
index 69339653d..cd3941852 100644
--- a/src/filters/parser/MP4Splitter/AP4/Core/Ap4Atom.h
+++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4Atom.h
@@ -305,6 +305,8 @@ const AP4_Atom::Type AP4_ATOM_TYPE_3IV2 = AP4_ATOM_TYPE('3','I','V','2');
const AP4_Atom::Type AP4_ATOM_TYPE_IV32 = AP4_ATOM_TYPE('I','V','3','2');
const AP4_Atom::Type AP4_ATOM_TYPE_VP31 = AP4_ATOM_TYPE('V','P','3','1');
const AP4_Atom::Type AP4_ATOM_TYPE_YV12 = AP4_ATOM_TYPE('y','v','1','2');
+
+const AP4_Atom::Type AP4_ATOM_TYPE_PASP = AP4_ATOM_TYPE('p','a','s','p');
/*----------------------------------------------------------------------
| AP4_AtomListInspector
+---------------------------------------------------------------------*/
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomFactory.cpp b/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomFactory.cpp
index e90e66294..304ad443b 100644
--- a/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomFactory.cpp
+++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomFactory.cpp
@@ -70,6 +70,7 @@
#include "Ap4DcomAtom.h"
#include "Ap4CmvdAtom.h"
#include "Ap4EndaAtom.h"
+#include "Ap4PaspAtom.h"
/*----------------------------------------------------------------------
| class variables
+---------------------------------------------------------------------*/
@@ -461,6 +462,10 @@ AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream& stream,
atom = DNew AP4_EndaAtom(size, stream);
break;
+ case AP4_ATOM_TYPE_PASP:
+ atom = DNew AP4_PaspAtom(size, stream);
+ break;
+
default:
if(parent && parent->GetType() == AP4_ATOM_TYPE_STSD && (type & 0xffff0000) == AP4_ATOM_TYPE('m', 's', 0, 0))
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.cpp b/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.cpp
new file mode 100644
index 000000000..ba140a524
--- /dev/null
+++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.cpp
@@ -0,0 +1,26 @@
+/*****************************************************************
+|
+| AP4 - pasp Atom
+|
+| Copyright 2011 Aleksoid1978
+|
+ ****************************************************************/
+
+/*----------------------------------------------------------------------
+| includes
++---------------------------------------------------------------------*/
+
+#include "Ap4PaspAtom.h"
+
+/*----------------------------------------------------------------------
+| AP4_PaspAtom::AP4_PaspAtom
++---------------------------------------------------------------------*/
+
+AP4_PaspAtom::AP4_PaspAtom(AP4_Size size,
+ AP4_ByteStream& stream)
+ : AP4_Atom(AP4_ATOM_TYPE_PASP)
+{
+ size -= AP4_ATOM_HEADER_SIZE;
+ stream.ReadUI32(m_num);
+ stream.ReadUI32(m_den);
+}
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.h b/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.h
new file mode 100644
index 000000000..8947ac79b
--- /dev/null
+++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4PaspAtom.h
@@ -0,0 +1,41 @@
+/*****************************************************************
+|
+| AP4 - pasp Atom
+|
+| Copyright 2011 Aleksoid1978
+|
+ ****************************************************************/
+
+#ifndef _AP4_PASP_ATOM_H_
+#define _AP4_PASP_ATOM_H_
+
+/*----------------------------------------------------------------------
+| includes
++---------------------------------------------------------------------*/
+#include "Ap4Atom.h"
+#include "Ap4Types.h"
+#include "Ap4Array.h"
+#include "Ap4DataBuffer.h"
+
+/*----------------------------------------------------------------------
+| AP4_PaspAtom
++---------------------------------------------------------------------*/
+
+class AP4_PaspAtom : public AP4_Atom
+{
+public:
+ AP4_PaspAtom(AP4_Size size,
+ AP4_ByteStream& stream);
+
+ AP4_Result WriteFields(AP4_ByteStream& stream) { return AP4_FAILURE; }
+
+ AP4_UI32 GetNum() const { return m_num; }
+ AP4_UI32 GetDen() const { return m_den; }
+
+private:
+ AP4_UI32 m_num;
+ AP4_UI32 m_den;
+
+};
+
+#endif // _AP4_PASP_ATOM_H_
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.cpp b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
index ba7a1d307..812d40737 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.cpp
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
@@ -36,6 +36,7 @@
#include "Ap4ChplAtom.h"
#include "Ap4FtabAtom.h"
#include "Ap4DataAtom.h"
+#include "Ap4PaspAtom.h"
#ifdef REGISTER_FILTER
@@ -393,6 +394,14 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
if(!di) {
di = &empty;
}
+ int num = 1;
+ int den = 1;
+ if(AP4_PaspAtom* pasp = dynamic_cast<AP4_PaspAtom*>(avc1->GetChild(AP4_ATOM_TYPE_PASP))) {
+ num = pasp->GetNum();
+ den = pasp->GetDen();
+ }
+ if(!num) num = 1;
+ if(!den) den = 1;
const AP4_Byte* data = di->GetData();
AP4_Size size = di->GetDataSize();
@@ -409,8 +418,14 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
vih->hdr.bmiHeader.biCompression = '1cva';
vih->hdr.bmiHeader.biPlanes = 1;
vih->hdr.bmiHeader.biBitCount = 24;
- vih->hdr.dwPictAspectRatioX = vih->hdr.bmiHeader.biWidth;
- vih->hdr.dwPictAspectRatioY = vih->hdr.bmiHeader.biHeight;
+
+ CSize aspect(vih->hdr.bmiHeader.biWidth * num, vih->hdr.bmiHeader.biHeight * den);
+ int lnko = LNKO(aspect.cx, aspect.cy);
+ if(lnko > 1) {
+ aspect.cx /= lnko, aspect.cy /= lnko;
+ }
+ vih->hdr.dwPictAspectRatioX = aspect.cx;
+ vih->hdr.dwPictAspectRatioY = aspect.cy;
if (item->GetData()->GetSampleCount() > 1) {
vih->hdr.AvgTimePerFrame = item->GetData()->GetDurationMs()*10000 / (item->GetData()->GetSampleCount()-1);
}
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.vcproj b/src/filters/parser/MP4Splitter/MP4Splitter.vcproj
index d28a7d669..200f79410 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.vcproj
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.vcproj
@@ -856,6 +856,14 @@
>
</File>
<File
+ RelativePath=".\AP4\Core\Ap4PaspAtom.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AP4\Core\Ap4PaspAtom.h"
+ >
+ </File>
+ <File
RelativePath=".\AP4\Core\Ap4DataBuffer.cpp"
>
</File>
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj b/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj
index 0fa76aaab..cd61eda06 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj
@@ -230,7 +230,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MP4Splitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -252,7 +251,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MP4Splitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -260,6 +258,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="Ap4AsyncReaderStream.cpp" />
<ClCompile Include="AP4\Core\Ap4Atom.cpp" />
<ClCompile Include="AP4\Core\Ap4AtomFactory.cpp" />
@@ -272,6 +282,7 @@
<ClCompile Include="AP4\Core\Ap4ContainerAtom.cpp" />
<ClCompile Include="AP4\Core\Ap4CttsAtom.cpp" />
<ClCompile Include="AP4\Core\Ap4DataAtom.cpp" />
+ <ClCompile Include="AP4\Core\Ap4PaspAtom.cpp" />
<ClCompile Include="AP4\Core\Ap4DataBuffer.cpp" />
<ClCompile Include="AP4\Core\Ap4DcomAtom.cpp" />
<ClCompile Include="AP4\Core\Ap4Debug.cpp" />
@@ -363,6 +374,7 @@
<ClInclude Include="AP4\Core\Ap4ContainerAtom.h" />
<ClInclude Include="AP4\Core\Ap4CttsAtom.h" />
<ClInclude Include="AP4\Core\Ap4DataAtom.h" />
+ <ClInclude Include="AP4\Core\Ap4PaspAtom.h" />
<ClInclude Include="AP4\Core\Ap4DataBuffer.h" />
<ClInclude Include="AP4\Core\Ap4DcomAtom.h" />
<ClInclude Include="AP4\Core\Ap4Debug.h" />
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj.filters b/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj.filters
index 11a34b5d9..44c1dac93 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj.filters
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.vcxproj.filters
@@ -75,6 +75,9 @@
<ClCompile Include="AP4\Core\Ap4DataAtom.cpp">
<Filter>AP4\Core</Filter>
</ClCompile>
+ <ClCompile Include="AP4\Core\Ap4PaspAtom.cpp">
+ <Filter>AP4\Core</Filter>
+ </ClCompile>
<ClCompile Include="AP4\Core\Ap4DataBuffer.cpp">
<Filter>AP4\Core</Filter>
</ClCompile>
@@ -243,6 +246,15 @@
<ClCompile Include="AP4\Crypto\Ap4StreamCipher.cpp">
<Filter>AP4\Crypto</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Ap4AsyncReaderStream.h">
@@ -302,6 +314,9 @@
<ClInclude Include="AP4\Core\Ap4DataAtom.h">
<Filter>AP4\Core</Filter>
</ClInclude>
+ <ClInclude Include="AP4\Core\Ap4PaspAtom.h">
+ <Filter>AP4\Core</Filter>
+ </ClInclude>
<ClInclude Include="AP4\Core\Ap4DataBuffer.h">
<Filter>AP4\Core</Filter>
</ClInclude>
diff --git a/src/filters/parser/MP4Splitter/stdafx.h b/src/filters/parser/MP4Splitter/stdafx.h
index 9b252ac14..41145a210 100644
--- a/src/filters/parser/MP4Splitter/stdafx.h
+++ b/src/filters/parser/MP4Splitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,19 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-#include <atlcoll.h>
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
index f7a3c87b4..6dfb93640 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
@@ -604,7 +604,7 @@ avcsuccess:
HRESULT hr;
- CAutoPtr<CBaseSplitterOutputPin> pPinOut(DNew CMatroskaSplitterOutputPin((int)pTE->MinCache, pTE->DefaultDuration/100, mts, Name, this, this, &hr));
+ CAutoPtr<CBaseSplitterOutputPin> pPinOut(DNew CMatroskaSplitterOutputPin(pTE->MinCache, pTE->DefaultDuration / 100, mts, Name, this, this, &hr));
if(!pTE->Name.IsEmpty()) {
pPinOut->SetProperty(L"NAME", pTE->Name);
}
@@ -613,10 +613,10 @@ avcsuccess:
}
if (!isSub) {
- pinOut.InsertAt((iVideo+iAudio-3),DNew CMatroskaSplitterOutputPin((int)pTE->MinCache, pTE->DefaultDuration/100, mts, Name, this, this, &hr),1);
- pinOutTE.InsertAt((iVideo+iAudio-3),pTE,1);
+ pinOut.InsertAt((iVideo + iAudio - 3), DNew CMatroskaSplitterOutputPin(pTE->MinCache, pTE->DefaultDuration / 100, mts, Name, this, this, &hr), 1);
+ pinOutTE.InsertAt((iVideo + iAudio - 3), pTE, 1);
} else {
- pinOut.Add(DNew CMatroskaSplitterOutputPin((int)pTE->MinCache, pTE->DefaultDuration/100, mts, Name, this, this, &hr));
+ pinOut.Add(DNew CMatroskaSplitterOutputPin(pTE->MinCache, pTE->DefaultDuration / 100, mts, Name, this, this, &hr));
pinOutTE.Add(pTE);
}
@@ -1128,7 +1128,7 @@ CMatroskaSourceFilter::CMatroskaSourceFilter(LPUNKNOWN pUnk, HRESULT* phr)
//
CMatroskaSplitterOutputPin::CMatroskaSplitterOutputPin(
- int nMinCache, REFERENCE_TIME rtDefaultDuration,
+ unsigned int nMinCache, REFERENCE_TIME rtDefaultDuration,
CAtlArray<CMediaType>& mts, LPCWSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
: CBaseSplitterOutputPin(mts, pName, pFilter, pLock, phr)
, m_nMinCache(nMinCache), m_rtDefaultDuration(rtDefaultDuration)
@@ -1197,7 +1197,8 @@ HRESULT CMatroskaSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p)
m_packets.AddTail(p2);
POSITION pos = m_rob.GetTailPosition();
- for(int i = m_nMinCache-1; i > 0 && pos && mp->bg->ReferencePriority < m_rob.GetAt(pos)->bg->ReferencePriority; i--) {
+ _ASSERTE(m_nMinCache > 0);
+ for(int i = m_nMinCache - 1; i > 0 && pos && mp->bg->ReferencePriority < m_rob.GetAt(pos)->bg->ReferencePriority; --i) {
m_rob.GetPrev(pos);
}
@@ -1209,7 +1210,7 @@ HRESULT CMatroskaSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p)
mp = NULL;
- if(m_rob.GetCount() == m_nMinCache+1) {
+ if(m_rob.GetCount() == m_nMinCache + 1) {
ASSERT(m_nMinCache > 0);
pos = m_rob.GetHeadPosition();
MatroskaPacket* mp1 = m_rob.GetNext(pos);
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.h b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.h
index a81b6d45a..6e609cf58 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.h
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.h
@@ -46,7 +46,7 @@ class CMatroskaSplitterOutputPin : public CBaseSplitterOutputPin
{
HRESULT DeliverBlock(MatroskaPacket* p);
- int m_nMinCache;
+ unsigned int m_nMinCache;
REFERENCE_TIME m_rtDefaultDuration;
CCritSec m_csQueue;
@@ -63,7 +63,7 @@ protected:
public:
CMatroskaSplitterOutputPin(
- int nMinCache, REFERENCE_TIME rtDefaultDuration,
+ unsigned int nMinCache, REFERENCE_TIME rtDefaultDuration,
CAtlArray<CMediaType>& mts, LPCWSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
virtual ~CMatroskaSplitterOutputPin();
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj
index 285338019..9c2e7e2bc 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MatroskaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MatroskaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="MatroskaFile.cpp" />
<ClCompile Include="MatroskaSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj.filters b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj.filters
index 776a3a888..b2101be9b 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj.filters
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="MatroskaSplitter.def">
diff --git a/src/filters/parser/MatroskaSplitter/stdafx.h b/src/filters/parser/MatroskaSplitter/stdafx.h
index 37bcea3a7..8839eccc1 100644
--- a/src/filters/parser/MatroskaSplitter/stdafx.h
+++ b/src/filters/parser/MatroskaSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,19 +17,9 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include "../../../DSUtil/DSUtil.h"
diff --git a/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj b/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj
index 59521a867..f22d8dce3 100644
--- a/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj
+++ b/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="MpaSplitter.cpp" />
<ClCompile Include="MpaSplitterFile.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj.filters b/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj.filters
index a0433ea57..9412a34ff 100644
--- a/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj.filters
+++ b/src/filters/parser/MpaSplitter/MpaSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="MpaSplitter.def">
diff --git a/src/filters/parser/MpaSplitter/stdafx.h b/src/filters/parser/MpaSplitter/stdafx.h
index 114712db9..25ac576a9 100644
--- a/src/filters/parser/MpaSplitter/stdafx.h
+++ b/src/filters/parser/MpaSplitter/stdafx.h
@@ -2,6 +2,7 @@
* Copyright (C) 2003-2006 Gabest
* http://www.gabest.org
*
+/*
* This Program 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 2, or (at your option)
@@ -20,21 +21,11 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
diff --git a/src/filters/parser/MpegSplitter/IMpegSplitterFilter.h b/src/filters/parser/MpegSplitter/IMpegSplitterFilter.h
index b9613bf30..1b9983657 100644
--- a/src/filters/parser/MpegSplitter/IMpegSplitterFilter.h
+++ b/src/filters/parser/MpegSplitter/IMpegSplitterFilter.h
@@ -30,11 +30,11 @@ public IUnknown {
STDMETHOD(SetFastStreamChange(BOOL nValue)) = 0;
STDMETHOD_(BOOL, GetFastStreamChange()) = 0;
- STDMETHOD(SetAudioLanguageOrder(CString nValue)) = 0;
- STDMETHOD_(CString, GetAudioLanguageOrder()) = 0;
+ STDMETHOD(SetAudioLanguageOrder(WCHAR *nValue)) = 0;
+ STDMETHOD_(WCHAR *, GetAudioLanguageOrder()) = 0;
- STDMETHOD(SetSubtitlesLanguageOrder(CString nValue)) = 0;
- STDMETHOD_(CString, GetSubtitlesLanguageOrder()) = 0;
+ STDMETHOD(SetSubtitlesLanguageOrder(WCHAR *nValue)) = 0;
+ STDMETHOD_(WCHAR *, GetSubtitlesLanguageOrder()) = 0;
STDMETHOD(SetVC1_GuidFlag(int nValue)) = 0;
STDMETHOD_(int, GetVC1_GuidFlag()) = 0;
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
index 362ef132b..d81bb1326 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
@@ -29,6 +29,38 @@
#include "../../../apps/mplayerc/SettingsDefines.h"
+TCHAR* MPEG2_Profile[]=
+{
+ L"0",
+ L"High Profile",
+ L"Spatially Scalable Profile",
+ L"SNR Scalable Profile",
+ L"Main Profile",
+ L"Simple Profile",
+ L"6",
+ L"7",
+};
+
+TCHAR* MPEG2_Level[]=
+{
+ L"0",
+ L"1",
+ L"2",
+ L"3",
+ L"High Level",
+ L"4",
+ L"High1440 Level",
+ L"5",
+ L"Main Level",
+ L"6",
+ L"Low Level",
+ L"7",
+ L"8",
+ L"9",
+ L"10",
+ L"11",
+};
+
#ifdef REGISTER_FILTER
const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = {
@@ -177,12 +209,20 @@ CString GetMediaTypeDesc(const CMediaType *_pMediaType, const CHdmvClipInfo::Str
pVideoInfo2 = &pInfo->hdr;
bool bIsAVC = false;
+ bool bIsMPEG2 = false;
if (pInfo->hdr.bmiHeader.biCompression == '1CVA') {
bIsAVC = true;
Infos.AddTail(L"AVC (H.264)");
+ } else if (pInfo->hdr.bmiHeader.biCompression == 'CVMA') {
+ bIsAVC = true;
+ Infos.AddTail(L"MVC (Full)");
+ } else if (pInfo->hdr.bmiHeader.biCompression == 'CVME') {
+ bIsAVC = true;
+ Infos.AddTail(L"MVC (Subset)");
} else if (pInfo->hdr.bmiHeader.biCompression == 0) {
Infos.AddTail(L"MPEG2");
+ bIsMPEG2 = true;
} else {
WCHAR Temp[5];
memset(Temp, 0, sizeof(Temp));
@@ -193,84 +233,60 @@ CString GetMediaTypeDesc(const CMediaType *_pMediaType, const CHdmvClipInfo::Str
Infos.AddTail(Temp);
}
- switch (pInfo->dwProfile) {
- case AM_MPEG2Profile_Simple:
- Infos.AddTail(L"Simple Profile");
- break;
- case AM_MPEG2Profile_Main:
- Infos.AddTail(L"Main Profile");
- break;
- case AM_MPEG2Profile_SNRScalable:
- Infos.AddTail(L"SNR Scalable Profile");
- break;
- case AM_MPEG2Profile_SpatiallyScalable:
- Infos.AddTail(L"Spatially Scalable Profile");
- break;
- case AM_MPEG2Profile_High:
- Infos.AddTail(L"High Profile");
- break;
- default:
- if (pInfo->dwProfile) {
- if (bIsAVC) {
- switch (pInfo->dwProfile) {
- case 44:
- Infos.AddTail(L"CAVLC Profile");
- break;
- case 66:
- Infos.AddTail(L"Baseline Profile");
- break;
- case 77:
- Infos.AddTail(L"Main Profile");
- break;
- case 88:
- Infos.AddTail(L"Extended Profile");
- break;
- case 100:
- Infos.AddTail(L"High Profile");
- break;
- case 110:
- Infos.AddTail(L"High 10 Profile");
- break;
- case 122:
- Infos.AddTail(L"High 4:2:2 Profile");
- break;
- case 244:
- Infos.AddTail(L"High 4:4:4 Profile");
- break;
-
- default:
- Infos.AddTail(FormatString(L"Profile %d", pInfo->dwProfile));
- break;
- }
- } else {
+ if(bIsMPEG2) {
+ Infos.AddTail(MPEG2_Profile[pInfo->dwProfile]);
+ } else
+ if (pInfo->dwProfile) {
+ if (bIsAVC) {
+ switch (pInfo->dwProfile) {
+ case 44:
+ Infos.AddTail(L"CAVLC Profile");
+ break;
+ case 66:
+ Infos.AddTail(L"Baseline Profile");
+ break;
+ case 77:
+ Infos.AddTail(L"Main Profile");
+ break;
+ case 88:
+ Infos.AddTail(L"Extended Profile");
+ break;
+ case 100:
+ Infos.AddTail(L"High Profile");
+ break;
+ case 110:
+ Infos.AddTail(L"High 10 Profile");
+ break;
+ case 118:
+ Infos.AddTail(L"Multiview High Profile");
+ break;
+ case 122:
+ Infos.AddTail(L"High 4:2:2 Profile");
+ break;
+ case 244:
+ Infos.AddTail(L"High 4:4:4 Profile");
+ break;
+ case 128:
+ Infos.AddTail(L"Stereo High Profile");
+ break;
+ default:
Infos.AddTail(FormatString(L"Profile %d", pInfo->dwProfile));
- }
+ break;
}
- break;
+ } else {
+ Infos.AddTail(FormatString(L"Profile %d", pInfo->dwProfile));
+ }
}
- switch (pInfo->dwLevel) {
- case AM_MPEG2Level_Low:
- Infos.AddTail(L"Low Level");
- break;
- case AM_MPEG2Level_Main:
- Infos.AddTail(L"Main Level");
- break;
- case AM_MPEG2Level_High1440:
- Infos.AddTail(L"High1440 Level");
- break;
- case AM_MPEG2Level_High:
- Infos.AddTail(L"High Level");
- break;
- default:
- if (pInfo->dwLevel) {
- if (bIsAVC) {
- Infos.AddTail(FormatString(L"Level %1.1f", double(pInfo->dwLevel)/10.0));
- } else {
- Infos.AddTail(FormatString(L"Level %d", pInfo->dwLevel));
- }
- }
- break;
+ if(bIsMPEG2) {
+ Infos.AddTail(MPEG2_Level[pInfo->dwLevel]);
+ } else
+ if (pInfo->dwLevel) {
+ if (bIsAVC) {
+ Infos.AddTail(FormatString(L"Level %1.1f", double(pInfo->dwLevel)/10.0));
+ } else {
+ Infos.AddTail(FormatString(L"Level %d", pInfo->dwLevel));
+ }
}
} else if (_pMediaType->formattype == FORMAT_VIDEOINFO2) {
const VIDEOINFOHEADER2 *pInfo = GetFormatHelper(pInfo, _pMediaType);
@@ -557,10 +573,20 @@ void CMpegSplitterFilter::ReadClipInfo(LPCOLESTR pszFileName)
if (_wsplitpath_s (pszFileName, Drive, countof(Drive), Dir, countof(Dir), Filename, countof(Filename), Ext, countof(Ext)) == 0) {
CString strClipInfo;
- if (Drive[0]) {
- strClipInfo.Format (_T("%s\\%s\\..\\CLIPINF\\%s.clpi"), Drive, Dir, Filename);
+ _wcslwr_s(Ext, countof(Ext));
+
+ if (wcscmp(Ext, L".ssif") == 0) {
+ if (Drive[0]) {
+ strClipInfo.Format (_T("%s\\%s\\..\\..\\CLIPINF\\%s.clpi"), Drive, Dir, Filename);
+ } else {
+ strClipInfo.Format (_T("%s\\..\\..\\CLIPINF\\%s.clpi"), Dir, Filename);
+ }
} else {
- strClipInfo.Format (_T("%s\\..\\CLIPINF\\%s.clpi"), Dir, Filename);
+ if (Drive[0]) {
+ strClipInfo.Format (_T("%s\\%s\\..\\CLIPINF\\%s.clpi"), Drive, Dir, Filename);
+ } else {
+ strClipInfo.Format (_T("%s\\..\\CLIPINF\\%s.clpi"), Dir, Filename);
+ }
}
m_ClipInfo.ReadInfo (strClipInfo);
@@ -1415,28 +1441,28 @@ STDMETHODIMP_(BOOL) CMpegSplitterFilter::GetFastStreamChange()
return m_useFastStreamChange;
}
-STDMETHODIMP CMpegSplitterFilter::SetAudioLanguageOrder(CString nValue)
+STDMETHODIMP CMpegSplitterFilter::SetAudioLanguageOrder(WCHAR *nValue)
{
CAutoLock cAutoLock(&m_csProps);
m_csAudioLanguageOrder = nValue;
return S_OK;
}
-STDMETHODIMP_(CString) CMpegSplitterFilter::GetAudioLanguageOrder()
+STDMETHODIMP_(WCHAR *) CMpegSplitterFilter::GetAudioLanguageOrder()
{
CAutoLock cAutoLock(&m_csProps);
- return m_csAudioLanguageOrder;
+ return m_csAudioLanguageOrder.GetBuffer();
}
-STDMETHODIMP CMpegSplitterFilter::SetSubtitlesLanguageOrder(CString nValue)
+STDMETHODIMP CMpegSplitterFilter::SetSubtitlesLanguageOrder(WCHAR *nValue)
{
CAutoLock cAutoLock(&m_csProps);
m_csSubtitlesLanguageOrder = nValue;
return S_OK;
}
-STDMETHODIMP_(CString) CMpegSplitterFilter::GetSubtitlesLanguageOrder()
+STDMETHODIMP_(WCHAR *) CMpegSplitterFilter::GetSubtitlesLanguageOrder()
{
CAutoLock cAutoLock(&m_csProps);
- return m_csSubtitlesLanguageOrder;
+ return m_csSubtitlesLanguageOrder.GetBuffer();
}
STDMETHODIMP CMpegSplitterFilter::SetVC1_GuidFlag(int nValue)
@@ -1618,7 +1644,7 @@ HRESULT CMpegSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p)
}
return S_OK;
- } else if(m_mt.subtype == FOURCCMap('1CVA') || m_mt.subtype == FOURCCMap('1cva')) { // just like aac, this has to be starting nalus, more can be packed together
+ } else if(m_mt.subtype == FOURCCMap('1CVA') || m_mt.subtype == FOURCCMap('1cva') || m_mt.subtype == FOURCCMap('CVMA') || m_mt.subtype == FOURCCMap('CVME')) {
if(!m_p) {
m_p.Attach(DNew Packet());
m_p->TrackNumber = p->TrackNumber;
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.h b/src/filters/parser/MpegSplitter/MpegSplitter.h
index 12e12a7aa..8343e1712 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.h
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.h
@@ -104,11 +104,11 @@ public:
STDMETHODIMP SetFastStreamChange(BOOL nValue);
STDMETHODIMP_(BOOL) GetFastStreamChange();
- STDMETHODIMP SetAudioLanguageOrder(CString nValue);
- STDMETHODIMP_(CString) GetAudioLanguageOrder();
+ STDMETHODIMP SetAudioLanguageOrder(WCHAR *nValue);
+ STDMETHODIMP_(WCHAR *) GetAudioLanguageOrder();
- STDMETHODIMP SetSubtitlesLanguageOrder(CString nValue);
- STDMETHODIMP_(CString) GetSubtitlesLanguageOrder();
+ STDMETHODIMP SetSubtitlesLanguageOrder(WCHAR *nValue);
+ STDMETHODIMP_(WCHAR *) GetSubtitlesLanguageOrder();
STDMETHODIMP SetVC1_GuidFlag(int nValue);
STDMETHODIMP_(int) GetVC1_GuidFlag();
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj b/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj
index 4a7a783a3..ccc1c4b7c 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpegSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpegSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="MpegSplitter.cpp" />
<ClCompile Include="MpegSplitterFile.cpp" />
<ClCompile Include="MpegSplitterSettingsWnd.cpp" />
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj.filters b/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj.filters
index 89492dcbf..4412d2052 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj.filters
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.vcxproj.filters
@@ -27,6 +27,15 @@
<ClCompile Include="MpegSplitterSettingsWnd.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="MpegSplitter.def">
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp
index 0a2ebe0ca..51cd604eb 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp
@@ -455,9 +455,16 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len)
Seek(pos);
if(type == unknown) {
- // CMpegSplitterFile::avchdr h; <= PPS and SPS can be present on differents packets !
- if(!m_streams[video].Find(s) && Read(avch, len, &s.mt)) {
- type = video;
+ // PPS and SPS can be present on differents packets
+ // and can also be split into multiple packets
+ if (!avch.Lookup(pid))
+ memset(&avch[pid], 0, sizeof(CMpegSplitterFile::avchdr));
+ if(!m_streams[video].Find(s) && !m_streams[stereo].Find(s) && Read(avch[pid], len, &s.mt))
+ {
+ if (avch[pid].spspps[index_subsetsps].complete)
+ type = stereo;
+ else
+ type = video;
}
}
} else if(pesid >= 0xc0 && pesid < 0xe0) { // mpeg audio
@@ -686,6 +693,7 @@ CAtlList<CMpegSplitterFile::stream>* CMpegSplitterFile::GetMasterStream()
!m_streams[video].IsEmpty() ? &m_streams[video] :
!m_streams[audio].IsEmpty() ? &m_streams[audio] :
!m_streams[subpic].IsEmpty() ? &m_streams[subpic] :
+ !m_streams[stereo].IsEmpty() ? &m_streams[stereo] :
NULL;
}
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.h b/src/filters/parser/MpegSplitter/MpegSplitterFile.h
index 121721cc1..6c9650f54 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitterFile.h
+++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.h
@@ -31,7 +31,7 @@
class CMpegSplitterFile : public CBaseSplitterFileEx
{
CAtlMap<WORD, BYTE> m_pid2pes;
- CMpegSplitterFile::avchdr avch;
+ CAtlMap<WORD, CMpegSplitterFile::avchdr> avch;
bool m_bIsHdmv;
@@ -72,7 +72,7 @@ public:
}
};
- enum {video, audio, subpic, unknown};
+ enum {video, audio, subpic, stereo, unknown};
class CStreamList : public CAtlList<stream>
{
@@ -95,6 +95,7 @@ public:
type == video ? L"Video" :
type == audio ? L"Audio" :
type == subpic ? L"Subtitle" :
+ type == stereo ? L"Stereo" :
L"Unknown";
}
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterSettingsWnd.cpp b/src/filters/parser/MpegSplitter/MpegSplitterSettingsWnd.cpp
index 18919afa7..2a530ab22 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitterSettingsWnd.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitterSettingsWnd.cpp
@@ -121,9 +121,9 @@ bool CMpegSplitterSettingsWnd::OnApply()
#ifdef REGISTER_FILTER
CString str = _T("");
m_edtAudioLanguageOrder.GetWindowText(str);
- m_pMSF->SetAudioLanguageOrder(str);
+ m_pMSF->SetAudioLanguageOrder(str.GetBuffer());
m_edtSubtitlesLanguageOrder.GetWindowText(str);
- m_pMSF->SetSubtitlesLanguageOrder(str);
+ m_pMSF->SetSubtitlesLanguageOrder(str.GetBuffer());
#endif
m_pMSF->Apply();
}
diff --git a/src/filters/parser/MpegSplitter/stdafx.h b/src/filters/parser/MpegSplitter/stdafx.h
index 5560c6425..e2e2751e9 100644
--- a/src/filters/parser/MpegSplitter/stdafx.h
+++ b/src/filters/parser/MpegSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,27 +17,10 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
-
-#include <atlbase.h>
-#include <atlcoll.h>
-#include "../../../DSUtil/DSUtil.h"
-#include "../../../DSUtil/MediaTypes.h"
-#include "../../../DSUtil/vd.h"
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#define EVO_SUPPORT 0 \ No newline at end of file
+#define EVO_SUPPORT 0
diff --git a/src/filters/parser/NutSplitter/NutSplitter.vcxproj b/src/filters/parser/NutSplitter/NutSplitter.vcxproj
index 873742b58..f882b4ae1 100644
--- a/src/filters/parser/NutSplitter/NutSplitter.vcxproj
+++ b/src/filters/parser/NutSplitter/NutSplitter.vcxproj
@@ -235,6 +235,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="NutFile.cpp" />
<ClCompile Include="NutSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/parser/NutSplitter/NutSplitter.vcxproj.filters b/src/filters/parser/NutSplitter/NutSplitter.vcxproj.filters
index 12d7ee498..c514f3d75 100644
--- a/src/filters/parser/NutSplitter/NutSplitter.vcxproj.filters
+++ b/src/filters/parser/NutSplitter/NutSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="NutSplitter.def">
diff --git a/src/filters/parser/NutSplitter/stdafx.h b/src/filters/parser/NutSplitter/stdafx.h
index 8f287fec1..12319d47e 100644
--- a/src/filters/parser/NutSplitter/stdafx.h
+++ b/src/filters/parser/NutSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -19,28 +16,12 @@
*
*/
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
#include "../../../DSUtil/DSUtil.h"
diff --git a/src/filters/parser/OggSplitter/OggSplitter.cpp b/src/filters/parser/OggSplitter/OggSplitter.cpp
index 7a341b12b..1d5796456 100644
--- a/src/filters/parser/OggSplitter/OggSplitter.cpp
+++ b/src/filters/parser/OggSplitter/OggSplitter.cpp
@@ -638,7 +638,7 @@ void COggSplitterOutputPin::ResetState(DWORD seqnum)
HRESULT COggSplitterOutputPin::UnpackPage(OggPage& page)
{
- if(m_lastseqnum != page.m_hdr.page_sequence_number-1) {
+ if(m_lastseqnum != page.m_hdr.page_sequence_number - 1) {
ResetState(page.m_hdr.page_sequence_number);
return S_FALSE; // FIXME
} else {
@@ -809,7 +809,7 @@ HRESULT COggVorbisOutputPin::UnpackInitPage(OggPage& page)
;
}
for(int cnt = 0; bs.hasbits(-8-16-16-1-6); cnt++) {
- unsigned int modes = bs.showbits(-6)+1;
+ unsigned int modes = bs.showbits(-6) + 1;
unsigned int mapping = bs.getbits(-8);
unsigned int transformtype = bs.getbits(-16);
@@ -819,6 +819,7 @@ HRESULT COggVorbisOutputPin::UnpackInitPage(OggPage& page)
if(transformtype != 0 || windowtype != 0) {
ASSERT(modes == cnt);
+ UNREFERENCED_PARAMETER(modes);
break;
}
diff --git a/src/filters/parser/OggSplitter/OggSplitter.h b/src/filters/parser/OggSplitter/OggSplitter.h
index 3d7ae5975..c2067d735 100644
--- a/src/filters/parser/OggSplitter/OggSplitter.h
+++ b/src/filters/parser/OggSplitter/OggSplitter.h
@@ -52,7 +52,7 @@ protected:
CCritSec m_csPackets;
CAutoPtrList<OggPacket> m_packets;
CAutoPtr<OggPacket> m_lastpacket;
- int m_lastseqnum;
+ DWORD m_lastseqnum;
REFERENCE_TIME m_rtLast;
bool m_fSkip;
diff --git a/src/filters/parser/OggSplitter/OggSplitter.vcxproj b/src/filters/parser/OggSplitter/OggSplitter.vcxproj
index 36d0d1355..87f7c1dbf 100644
--- a/src/filters/parser/OggSplitter/OggSplitter.vcxproj
+++ b/src/filters/parser/OggSplitter/OggSplitter.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>OggSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>OggSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="OggFile.cpp" />
<ClCompile Include="OggSplitter.cpp" />
<ClCompile Include="stdafx.cpp" />
diff --git a/src/filters/parser/OggSplitter/OggSplitter.vcxproj.filters b/src/filters/parser/OggSplitter/OggSplitter.vcxproj.filters
index 75c544937..139270130 100644
--- a/src/filters/parser/OggSplitter/OggSplitter.vcxproj.filters
+++ b/src/filters/parser/OggSplitter/OggSplitter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="OggSplitter.def">
diff --git a/src/filters/parser/OggSplitter/stdafx.h b/src/filters/parser/OggSplitter/stdafx.h
index f8e9cd301..41145a210 100644
--- a/src/filters/parser/OggSplitter/stdafx.h
+++ b/src/filters/parser/OggSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,18 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
-#include "../../../DSUtil/DSUtil.h"
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
index 50b9c752b..0844d1119 100644
--- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
+++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
@@ -1703,7 +1703,8 @@ HRESULT CRealVideoDecoder::Transform(IMediaSample* pIn)
m_lastBuffSizeDim = size;
ATLTRACE("resize out put buff %d" ,size);
- if ( m_pI420 = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16))) {
+ m_pI420 = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16));
+ if ( m_pI420 ) {
ATLTRACE(" m_pI420.Allocated 1" );
memset(m_pI420, 0, size);
ATLTRACE(" m_pI420.Allocated 2" );
@@ -1713,7 +1714,8 @@ HRESULT CRealVideoDecoder::Transform(IMediaSample* pIn)
ATLTRACE(" m_pI420.Allocate fail %d" ,size*3/2);
return S_OK;
}
- if( m_pI420Tmp = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16))) {
+ m_pI420Tmp = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16));
+ if ( m_pI420Tmp ) {
ATLTRACE(" m_pI420Tmp.Allocated 1" );
memset(m_pI420Tmp, 0, size);
ATLTRACE(" m_pI420Tmp.Allocated 2" );
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj
index 8ad95d2a6..8b57ca45b 100644
--- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj
+++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj
@@ -232,7 +232,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>RealMediaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -253,7 +252,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>RealMediaSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -261,6 +259,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="RealMediaSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj.filters b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj.filters
index 6399d4aff..b84783d40 100644
--- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj.filters
+++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="RealMediaSplitter.def">
diff --git a/src/filters/parser/RealMediaSplitter/stdafx.h b/src/filters/parser/RealMediaSplitter/stdafx.h
index eb1a0a29e..41145a210 100644
--- a/src/filters/parser/RealMediaSplitter/stdafx.h
+++ b/src/filters/parser/RealMediaSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,18 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj b/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj
index f4c9552aa..b58519802 100644
--- a/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj
+++ b/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj
@@ -233,6 +233,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="RoQSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj.filters b/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj.filters
index 5bbdbd683..3e1d8752e 100644
--- a/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj.filters
+++ b/src/filters/parser/RoQSplitter/RoQSplitter.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="RoQSplitter.def">
diff --git a/src/filters/parser/RoQSplitter/stdafx.h b/src/filters/parser/RoQSplitter/stdafx.h
index bf58d6fb9..f6fd36d34 100644
--- a/src/filters/parser/RoQSplitter/stdafx.h
+++ b/src/filters/parser/RoQSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -21,21 +18,9 @@
#pragma once
#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
-
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
#include "../../../DSUtil/DSUtil.h"
diff --git a/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj b/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj
index 89526f1cf..4c7c17a8f 100644
--- a/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj
+++ b/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>SSFSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>SSFSplitter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="SSFSplitter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj.filters b/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj.filters
index a324b4656..08a287bff 100644
--- a/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj.filters
+++ b/src/filters/parser/SSFSplitter/SSFSplitter.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="SSFSplitter.def">
diff --git a/src/filters/parser/SSFSplitter/stdafx.h b/src/filters/parser/SSFSplitter/stdafx.h
index 432a74d80..09a0f4b69 100644
--- a/src/filters/parser/SSFSplitter/stdafx.h
+++ b/src/filters/parser/SSFSplitter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,23 +17,12 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include <atlbase.h>
#include <atlcoll.h>
#include "../../../DSUtil/DSUtil.h"
-
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
index f30688cf3..682c2b062 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
@@ -222,7 +222,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -243,7 +242,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -251,6 +249,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">Create</PrecompiledHeader>
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
index 1ac31bb0e..bf0dc2729 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="StreamDriveThru.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="StreamDriveThru.def">
diff --git a/src/filters/parser/StreamDriveThru/stdafx.h b/src/filters/parser/StreamDriveThru/stdafx.h
index a8c9e282b..41145a210 100644
--- a/src/filters/parser/StreamDriveThru/stdafx.h
+++ b/src/filters/parser/StreamDriveThru/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/reader/CDDAReader/CDDAReader.vcxproj b/src/filters/reader/CDDAReader/CDDAReader.vcxproj
index 9401b7ecd..cd9d11821 100644
--- a/src/filters/reader/CDDAReader/CDDAReader.vcxproj
+++ b/src/filters/reader/CDDAReader/CDDAReader.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="CDDAReader.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters b/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
index 07df72a2c..83a1071b7 100644
--- a/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
+++ b/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="CDDAReader.def">
diff --git a/src/filters/reader/CDDAReader/stdafx.h b/src/filters/reader/CDDAReader/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/reader/CDDAReader/stdafx.h
+++ b/src/filters/reader/CDDAReader/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/reader/CDXAReader/CDXAReader.vcxproj b/src/filters/reader/CDXAReader/CDXAReader.vcxproj
index f2900e655..ac669acf5 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.vcxproj
+++ b/src/filters/reader/CDXAReader/CDXAReader.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="CDXAReader.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters b/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
index 05dfa7455..41e9398ea 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
+++ b/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="CDXAReader.def">
diff --git a/src/filters/reader/CDXAReader/stdafx.h b/src/filters/reader/CDXAReader/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/reader/CDXAReader/stdafx.h
+++ b/src/filters/reader/CDXAReader/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/reader/UDPReader/UDPReader.vcxproj b/src/filters/reader/UDPReader/UDPReader.vcxproj
index d1f127339..da496c7ff 100644
--- a/src/filters/reader/UDPReader/UDPReader.vcxproj
+++ b/src/filters/reader/UDPReader/UDPReader.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>UDPReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>UDPReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">Create</PrecompiledHeader>
diff --git a/src/filters/reader/UDPReader/UDPReader.vcxproj.filters b/src/filters/reader/UDPReader/UDPReader.vcxproj.filters
index 631c98c5f..a5b2b96fb 100644
--- a/src/filters/reader/UDPReader/UDPReader.vcxproj.filters
+++ b/src/filters/reader/UDPReader/UDPReader.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="UDPReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="UDPReader.def">
diff --git a/src/filters/reader/UDPReader/stdafx.h b/src/filters/reader/UDPReader/stdafx.h
index 934cd148d..a7870f691 100644
--- a/src/filters/reader/UDPReader/stdafx.h
+++ b/src/filters/reader/UDPReader/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,18 +17,11 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
#include <afxsock.h>
#include <atlcoll.h>
-
-#include <streams.h>
diff --git a/src/filters/reader/VTSReader/VTSReader.vcxproj b/src/filters/reader/VTSReader/VTSReader.vcxproj
index 8d2aefc13..2e1473784 100644
--- a/src/filters/reader/VTSReader/VTSReader.vcxproj
+++ b/src/filters/reader/VTSReader/VTSReader.vcxproj
@@ -220,7 +220,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -241,7 +240,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">Create</PrecompiledHeader>
diff --git a/src/filters/reader/VTSReader/VTSReader.vcxproj.filters b/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
index aa6f07b48..ce871e556 100644
--- a/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
+++ b/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="VTSReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="VTSReader.def">
diff --git a/src/filters/reader/VTSReader/stdafx.h b/src/filters/reader/VTSReader/stdafx.h
index d8d4e35e7..41145a210 100644
--- a/src/filters/reader/VTSReader/stdafx.h
+++ b/src/filters/reader/VTSReader/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,16 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp
index 22665477f..8744a4f70 100644
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp
+++ b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp
@@ -1100,9 +1100,9 @@ HRESULT CMpcAudioRenderer::GetAvailableAudioDevices(IMMDeviceCollection **ppMMDe
return S_FALSE;
}
- IMMDevice* pEndpoint = NULL;
- IPropertyStore* pProps = NULL;
- LPWSTR pwszID = NULL;
+ //IMMDevice* pEndpoint = NULL;
+ //IPropertyStore* pProps = NULL;
+ //LPWSTR pwszID = NULL;
enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, ppMMDevices);
UINT count(0);
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj
index 1d5ed0313..176eb6186 100644
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj
+++ b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj
@@ -131,6 +131,7 @@
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>REGISTER_FILTER;WIN32;_DEBUG;_USRDLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>BaseClasses.lib;DSUtil.lib;dsound.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -152,6 +153,7 @@
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>REGISTER_FILTER;WIN32;_DEBUG;_USRDLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>BaseClasses.lib;DSUtil.lib;dsound.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -168,13 +170,13 @@
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>REGISTER_FILTER;WIN32;NDEBUG;_USRDLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>BaseClasses.lib;DSUtil.lib;dsound.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -189,13 +191,13 @@
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;REGISTER_FILTER;WIN32;NDEBUG;_USRDLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>BaseClasses.lib;DSUtil.lib;dsound.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -206,6 +208,7 @@
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -221,6 +224,7 @@
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;_DEBUG;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -232,7 +236,7 @@
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;FLAC__NO_DLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4127;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -248,6 +252,7 @@
<AdditionalIncludeDirectories>..\..\..\..\include;SoundTouch\include;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;NDEBUG;FLAC__NO_DLL;SOUNDTOUCH_INTEGER_SAMPLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<Lib>
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -256,6 +261,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\..\FilterApp.cpp" />
<ClCompile Include="MpcAudioRenderer.cpp" />
<ClCompile Include="MpcAudioRendererSettingsWnd.cpp" />
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj.filters b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj.filters
index 8a1a00c93..9610a5437 100644
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj.filters
+++ b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcxproj.filters
@@ -69,6 +69,15 @@
<ClCompile Include="MpcAudioRendererSettingsWnd.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="MpcAudioRenderer.def">
diff --git a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/FIRFilter.cpp b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/FIRFilter.cpp
index 161d68516..50c4f62ee 100644
--- a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/FIRFilter.cpp
+++ b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/FIRFilter.cpp
@@ -219,7 +219,7 @@ uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSample
// Operator 'new' is overloaded so that it automatically creates a suitable instance
// depending on if we've a MMX-capable CPU available or not.
-void * FIRFilter::operator new(size_t s)
+void * FIRFilter::operator new(size_t /*s*/)
{
// Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead!
throw std::runtime_error("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!");
diff --git a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/RateTransposer.cpp b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/RateTransposer.cpp
index 2afc18750..c288fddb9 100644
--- a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/RateTransposer.cpp
+++ b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/RateTransposer.cpp
@@ -106,7 +106,7 @@ public:
// Operator 'new' is overloaded so that it automatically creates a suitable instance
// depending on if we've a MMX/SSE/etc-capable CPU available or not.
-void * RateTransposer::operator new(size_t s)
+void * RateTransposer::operator new(size_t /*s*/)
{
throw runtime_error("Error in RateTransoser::new: don't use \"new TDStretch\" directly, use \"newInstance\" to create a new instance instead!");
return NULL;
diff --git a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/TDStretch.cpp b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/TDStretch.cpp
index 97109aa70..dd7a43eb5 100644
--- a/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/TDStretch.cpp
+++ b/src/filters/renderer/MpcAudioRenderer/SoundTouch/source/TDStretch.cpp
@@ -728,7 +728,7 @@ void TDStretch::acceptNewOverlapLength(int newOverlapLength)
// Operator 'new' is overloaded so that it automatically creates a suitable instance
// depending on if we've a MMX/SSE/etc-capable CPU available or not.
-void * TDStretch::operator new(size_t s)
+void * TDStretch::operator new(size_t /*s*/)
{
// Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead!
throw std::runtime_error("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!");
diff --git a/src/filters/renderer/MpcAudioRenderer/stdafx.h b/src/filters/renderer/MpcAudioRenderer/stdafx.h
index 964d7222c..08cfba6de 100644
--- a/src/filters/renderer/MpcAudioRenderer/stdafx.h
+++ b/src/filters/renderer/MpcAudioRenderer/stdafx.h
@@ -1,38 +1,26 @@
/*
- * $Id$
+ * This Program 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 2, or (at your option)
+ * any later version.
*
- * (C) 2006-2010 see AUTHORS
+ * This Program 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.
*
- * 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/>.
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
*
*/
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN
-#endif
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-#include <streams.h>
-#include <dvdmedia.h>
#include <dsound.h>
diff --git a/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp b/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
index 15fd3b686..2a2a50ecc 100644
--- a/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
+++ b/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
@@ -54,29 +54,42 @@ HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAlloca
HRESULT hr = E_FAIL;
CString Error;
- if(clsid == CLSID_VMR9AllocatorPresenter && !(*ppAP = DNew CVMR9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
- || clsid == CLSID_RM9AllocatorPresenter && !(*ppAP = DNew CRM9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
- || clsid == CLSID_QT9AllocatorPresenter && !(*ppAP = DNew CQT9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
- || clsid == CLSID_DXRAllocatorPresenter && !(*ppAP = DNew CDXRAllocatorPresenter(hWnd, hr, Error))
- || clsid == CLSID_madVRAllocatorPresenter && !(*ppAP = DNew CmadVRAllocatorPresenter(hWnd, hr, Error))) {
- return E_OUTOFMEMORY;
- }
- if(*ppAP == NULL) {
+ if ( IsEqualCLSID(clsid, CLSID_VMR9AllocatorPresenter) ) {
+ *ppAP = DNew CVMR9AllocatorPresenter(hWnd, bFullscreen, hr, Error);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_RM9AllocatorPresenter) ) {
+ *ppAP = DNew CRM9AllocatorPresenter(hWnd, bFullscreen, hr, Error);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_QT9AllocatorPresenter) ) {
+ *ppAP = DNew CQT9AllocatorPresenter(hWnd, bFullscreen, hr, Error);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_DXRAllocatorPresenter) ) {
+ *ppAP = DNew CDXRAllocatorPresenter(hWnd, hr, Error);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_madVRAllocatorPresenter) ) {
+ *ppAP = DNew CmadVRAllocatorPresenter(hWnd, hr, Error);
+ }
+ else {
return E_FAIL;
}
+ if ( *ppAP == NULL ) {
+ return E_OUTOFMEMORY;
+ }
+
(*ppAP)->AddRef();
- if(FAILED(hr)) {
+ if ( FAILED(hr) ) {
Error += L"\n";
Error += GetWindowsErrorMessage(hr, NULL);
- MessageBox(hWnd, Error, L"Error creating DX9 allocation presenter", MB_OK|MB_ICONERROR);
+ MessageBox(hWnd, Error, L"Error creating DX9 allocation presenter", MB_OK | MB_ICONERROR);
(*ppAP)->Release();
*ppAP = NULL;
- } else if (!Error.IsEmpty()) {
- MessageBox(hWnd, Error, L"Warning creating DX9 allocation presenter", MB_OK|MB_ICONWARNING);
+ }
+ else if ( !Error.IsEmpty() ) {
+ MessageBox(hWnd, Error, L"Warning creating DX9 allocation presenter", MB_OK | MB_ICONWARNING);
}
return hr;
diff --git a/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp b/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp
index 5ccb89a19..dd665c78b 100644
--- a/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp
+++ b/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp
@@ -53,16 +53,24 @@ HRESULT CreateAP7(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppA
*ppAP = NULL;
HRESULT hr = S_OK;
- if(clsid == CLSID_VMR7AllocatorPresenter && !(*ppAP = DNew CVMR7AllocatorPresenter(hWnd, hr))
- || clsid == CLSID_RM7AllocatorPresenter && !(*ppAP = DNew CRM7AllocatorPresenter(hWnd, hr))
- || clsid == CLSID_QT7AllocatorPresenter && !(*ppAP = DNew CQT7AllocatorPresenter(hWnd, hr))) {
- return E_OUTOFMEMORY;
- }
- if(*ppAP == NULL) {
+ if ( IsEqualCLSID(clsid, CLSID_VMR7AllocatorPresenter) ) {
+ *ppAP = DNew CVMR7AllocatorPresenter(hWnd, hr);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_RM7AllocatorPresenter) ) {
+ *ppAP = DNew CRM7AllocatorPresenter(hWnd, hr);
+ }
+ else if ( IsEqualCLSID(clsid, CLSID_QT7AllocatorPresenter) ) {
+ *ppAP = DNew CQT7AllocatorPresenter(hWnd, hr);
+ }
+ else {
return E_FAIL;
}
+ if ( *ppAP == NULL ) {
+ return E_OUTOFMEMORY;
+ }
+
(*ppAP)->AddRef();
if(FAILED(hr)) {
diff --git a/src/filters/renderer/VideoRenderers/IPinHook.cpp b/src/filters/renderer/VideoRenderers/IPinHook.cpp
index b4eb482d6..9ca8d2b35 100644
--- a/src/filters/renderer/VideoRenderers/IPinHook.cpp
+++ b/src/filters/renderer/VideoRenderers/IPinHook.cpp
@@ -31,8 +31,14 @@
#include "IPinHook.h"
#include "AllocatorCommon.h"
-#ifdef _DEBUG
-#define LOG_FILE _T("dxva.log")
+#define DXVA_LOGFILE_A
+
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_A)
+#define LOG_FILE_DXVA _T("dxva_ipinhook.log")
+#define LOG_FILE_PICTURE _T("picture.log")
+#define LOG_FILE_SLICELONG _T("slicelong.log")
+#define LOG_FILE_SLICESHORT _T("sliceshort.log")
+#define LOG_FILE_BITSTREAM _T("bitstream.log")
#endif
//#define LOG_BITSTREAM
@@ -282,7 +288,9 @@ static HRESULT ( STDMETHODCALLTYPE *ReleaseBufferOrg )( IAMVideoAcceleratorC * T
static HRESULT ( STDMETHODCALLTYPE *ExecuteOrg )( IAMVideoAcceleratorC * This,/* [in] */ DWORD dwFunction,/* [in] */ LPVOID lpPrivateInputData,/* [in] */ DWORD cbPrivateInputData,/* [in] */ LPVOID lpPrivateOutputDat,/* [in] */ DWORD cbPrivateOutputData,/* [in] */ DWORD dwNumBuffers,/* [in] */ const AMVABUFFERINFO *pamvaBufferInfo) = NULL;
static HRESULT ( STDMETHODCALLTYPE *QueryRenderStatusOrg )( IAMVideoAcceleratorC * This,/* [in] */ DWORD dwTypeIndex,/* [in] */ DWORD dwBufferIndex,/* [in] */ DWORD dwFlags) = NULL;
static HRESULT ( STDMETHODCALLTYPE *DisplayFrameOrg )( IAMVideoAcceleratorC * This,/* [in] */ DWORD dwFlipToIndex,/* [in] */ IMediaSample *pMediaSample) = NULL;
+#endif
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_A)
static void LOG_TOFILE(LPCTSTR FileName, LPCTSTR fmt, ...)
{
va_list args;
@@ -309,7 +317,7 @@ static void LOG(LPCTSTR fmt, ...)
TCHAR buff[3000];
FILE* f;
_vstprintf_s(buff, countof(buff), fmt, args);
- if(_tfopen_s(&f, LOG_FILE, _T("at")) == 0) {
+ if(_tfopen_s(&f, LOG_FILE_DXVA, _T("at")) == 0) {
fseek(f, 0, 2);
_ftprintf(f, _T("%s\n"), buff);
fclose(f);
@@ -351,7 +359,7 @@ static void LogDXVA_PicParams_H264 (DXVA_PicParams_H264* pPic)
static bool bFirstParam = true;
if (bFirstParam) {
- LOG_TOFILE (_T("picture.log"), _T("RefPicFlag,wFrameWidthInMbsMinus1,wFrameHeightInMbsMinus1,CurrPic.Index7Bits,num_ref_frames,wBitFields,bit_depth_luma_minus8,bit_depth_chroma_minus8,Reserved16Bits,StatusReportFeedbackNumber,RFL.Index7Bits[0],") \
+ LOG_TOFILE (LOG_FILE_PICTURE, _T("RefPicFlag,wFrameWidthInMbsMinus1,wFrameHeightInMbsMinus1,CurrPic.Index7Bits,num_ref_frames,wBitFields,bit_depth_luma_minus8,bit_depth_chroma_minus8,Reserved16Bits,StatusReportFeedbackNumber,RFL.Index7Bits[0],") \
_T("RFL.Index7Bits[1],RFL.Index7Bits[2],RFL.Index7Bits[3],RFL.Index7Bits[4],RFL.Index7Bits[5],") \
_T("RFL.Index7Bits[6],RFL.Index7Bits[7],RFL.Index7Bits[8],RFL.Index7Bits[9],RFL.Index7Bits[10],") \
_T("RFL.Index7Bits[11],RFL.Index7Bits[12],RFL.Index7Bits[13],RFL.Index7Bits[14],RFL.Index7Bits[15],") \
@@ -454,7 +462,7 @@ static void LogDXVA_PicParams_H264 (DXVA_PicParams_H264* pPic)
// fwrite (pPic, sizeof (DXVA_PicParams_H264), 1, hPict);
//}
- LOG_TOFILE (_T("picture.log"), strRes);
+ LOG_TOFILE (LOG_FILE_PICTURE, strRes);
}
static void LogH264SliceShort (DXVA_Slice_H264_Short* pSlice, int nCount)
@@ -464,7 +472,7 @@ static void LogH264SliceShort (DXVA_Slice_H264_Short* pSlice, int nCount)
if (bFirstSlice) {
strRes = _T("nCnt, BSNALunitDataLocation, SliceBytesInBuffer, wBadSliceChopping");
- LOG_TOFILE (_T("sliceshort.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICESHORT, strRes);
strRes = "";
bFirstSlice = false;
}
@@ -475,7 +483,7 @@ static void LogH264SliceShort (DXVA_Slice_H264_Short* pSlice, int nCount)
strRes.AppendFormat(_T("%d,"), pSlice[i].SliceBytesInBuffer);
strRes.AppendFormat(_T("%d"), pSlice[i].wBadSliceChopping);
- LOG_TOFILE (_T("sliceshort.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICESHORT, strRes);
strRes = "";
}
}
@@ -488,7 +496,7 @@ static void LogSliceInfo (DXVA_SliceInfo* pSlice, int nCount)
if (bFirstSlice) {
strRes = _T("nCnt, wHorizontalPosition, wVerticalPosition, dwSliceBitsInBuffer,dwSliceDataLocation, bStartCodeBitOffset, bReservedBits, wMBbitOffset, wNumberMBsInSlice, wQuantizerScaleCode, wBadSliceChopping");
- LOG_TOFILE (_T("sliceshort.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICESHORT, strRes);
strRes = "";
bFirstSlice = false;
}
@@ -506,7 +514,7 @@ static void LogSliceInfo (DXVA_SliceInfo* pSlice, int nCount)
strRes.AppendFormat(_T("%d,"), pSlice[i].wQuantizerScaleCode);
strRes.AppendFormat(_T("%d"), pSlice[i].wBadSliceChopping);
- LOG_TOFILE (_T("sliceshort.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICESHORT, strRes);
strRes = "";
}
}
@@ -542,7 +550,7 @@ static void LogH264SliceLong (DXVA_Slice_H264_Long* pSlice, int nCount)
}
- LOG_TOFILE (_T("slicelong.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICELONG, strRes);
strRes = "";
}
bFirstSlice = false;
@@ -594,7 +602,7 @@ static void LogH264SliceLong (DXVA_Slice_H264_Long* pSlice, int nCount)
}
}
- LOG_TOFILE (_T("slicelong.log"), strRes);
+ LOG_TOFILE (LOG_FILE_SLICELONG, strRes);
strRes = "";
}
}
@@ -605,7 +613,7 @@ static void LogDXVA_PictureParameters (DXVA_PictureParameters* pPic)
CString strRes;
if (bFirstPictureParam) {
- LOG_TOFILE (_T("picture.log"), _T("wDecodedPictureIndex,wDeblockedPictureIndex,wForwardRefPictureIndex,wBackwardRefPictureIndex,wPicWidthInMBminus1,wPicHeightInMBminus1,bMacroblockWidthMinus1,bMacroblockHeightMinus1,bBlockWidthMinus1,bBlockHeightMinus1,bBPPminus1,bPicStructure,bSecondField,bPicIntra,bPicBackwardPrediction,bBidirectionalAveragingMode,bMVprecisionAndChromaRelation,bChromaFormat,bPicScanFixed,bPicScanMethod,bPicReadbackRequests,bRcontrol,bPicSpatialResid8,bPicOverflowBlocks,bPicExtrapolation,bPicDeblocked,bPicDeblockConfined,bPic4MVallowed,bPicOBMC,bPicBinPB,bMV_RPS,bReservedBits,wBitstreamFcodes,wBitstreamPCEelements,bBitstreamConcealmentNeed,bBitstreamConcealmentMethod"));
+ LOG_TOFILE (LOG_FILE_PICTURE, _T("wDecodedPictureIndex,wDeblockedPictureIndex,wForwardRefPictureIndex,wBackwardRefPictureIndex,wPicWidthInMBminus1,wPicHeightInMBminus1,bMacroblockWidthMinus1,bMacroblockHeightMinus1,bBlockWidthMinus1,bBlockHeightMinus1,bBPPminus1,bPicStructure,bSecondField,bPicIntra,bPicBackwardPrediction,bBidirectionalAveragingMode,bMVprecisionAndChromaRelation,bChromaFormat,bPicScanFixed,bPicScanMethod,bPicReadbackRequests,bRcontrol,bPicSpatialResid8,bPicOverflowBlocks,bPicExtrapolation,bPicDeblocked,bPicDeblockConfined,bPic4MVallowed,bPicOBMC,bPicBinPB,bMV_RPS,bReservedBits,wBitstreamFcodes,wBitstreamPCEelements,bBitstreamConcealmentNeed,bBitstreamConcealmentMethod"));
}
bFirstPictureParam = false;
@@ -647,7 +655,7 @@ static void LogDXVA_PictureParameters (DXVA_PictureParameters* pPic)
pPic->bBitstreamConcealmentNeed,
pPic->bBitstreamConcealmentMethod);
- LOG_TOFILE (_T("picture.log"), strRes);
+ LOG_TOFILE (LOG_FILE_PICTURE, strRes);
}
void LogDXVA_Bitstream(BYTE* pBuffer, int nSize)
@@ -656,7 +664,7 @@ void LogDXVA_Bitstream(BYTE* pBuffer, int nSize)
static bool bFirstBitstream = true;
if (bFirstBitstream) {
- LOG_TOFILE (_T("bitstream.log"), _T("Size,Start, Stop"));
+ LOG_TOFILE (LOG_FILE_BITSTREAM, _T("Size,Start, Stop"));
}
bFirstBitstream = false;
@@ -679,7 +687,7 @@ void LogDXVA_Bitstream(BYTE* pBuffer, int nSize)
}
}
- LOG_TOFILE (_T("bitstream.log"), strRes);
+ LOG_TOFILE (LOG_FILE_BITSTREAM, strRes);
}
@@ -954,7 +962,7 @@ static HRESULT STDMETHODCALLTYPE ExecuteMine(IAMVideoAcceleratorC* This, DWORD d
if (pamvaBufferInfo[i].dwTypeIndex == DXVA_PICTURE_DECODE_BUFFER) {
if (g_guidDXVADecoder == DXVA2_ModeH264_E || g_guidDXVADecoder == DXVA_Intel_H264_ClearVideo) {
LogDXVA_PicParams_H264 ((DXVA_PicParams_H264*)g_ppBuffer[pamvaBufferInfo[i].dwTypeIndex]);
- } else if (g_guidDXVADecoder == DXVA2_ModeVC1_D) {
+ } else if (g_guidDXVADecoder == DXVA2_ModeVC1_D || g_guidDXVADecoder == DXVA_Intel_VC1_ClearVideo) {
LogDXVA_PictureParameters((DXVA_PictureParameters*)g_ppBuffer[pamvaBufferInfo[i].dwTypeIndex]);
}
} else if (pamvaBufferInfo[i].dwTypeIndex == DXVA_SLICE_CONTROL_BUFFER && (pamvaBufferInfo[i].dwDataSize % sizeof(DXVA_Slice_H264_Short)) == 0) {
@@ -1082,11 +1090,13 @@ void HookAMVideoAccelerator(IAMVideoAcceleratorC* pAMVideoAcceleratorC)
res = VirtualProtect(pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorC), PAGE_EXECUTE, &flOldProtect);
- ::DeleteFile (LOG_FILE);
- ::DeleteFile (_T("picture.log"));
- ::DeleteFile (_T("slicelong.log"));
- ::DeleteFile (_T("sliceshort.log"));
- ::DeleteFile (_T("bitstream.log"));
+#ifdef DXVA_LOGFILE_A
+ ::DeleteFile (LOG_FILE_DXVA);
+ ::DeleteFile (LOG_FILE_PICTURE);
+ ::DeleteFile (LOG_FILE_SLICELONG);
+ ::DeleteFile (LOG_FILE_SLICESHORT);
+ ::DeleteFile (LOG_FILE_BITSTREAM);
+#endif
#endif
}
@@ -1182,7 +1192,7 @@ public :
}
virtual HRESULT STDMETHODCALLTYPE Execute(const DXVA2_DecodeExecuteParams *pExecuteParams) {
-#ifdef _DEBUG
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_A)
for (DWORD i=0; i<pExecuteParams->NumCompBuffers; i++) {
CString strBuffer;
@@ -1201,7 +1211,7 @@ public :
if (pExecuteParams->pCompressedBuffers[i].CompressedBufferType == DXVA2_PictureParametersBufferType) {
if (g_guidDXVADecoder == DXVA2_ModeH264_E || g_guidDXVADecoder == DXVA_Intel_H264_ClearVideo) {
LogDXVA_PicParams_H264 ((DXVA_PicParams_H264*)m_ppBuffer[pExecuteParams->pCompressedBuffers[i].CompressedBufferType]);
- } else if (g_guidDXVADecoder == DXVA2_ModeVC1_D || g_guidDXVADecoder == DXVA2_ModeMPEG2_VLD) {
+ } else if (g_guidDXVADecoder == DXVA2_ModeVC1_D || g_guidDXVADecoder == DXVA2_ModeMPEG2_VLD || g_guidDXVADecoder == DXVA_Intel_VC1_ClearVideo) {
LogDXVA_PictureParameters((DXVA_PictureParameters*)m_ppBuffer[pExecuteParams->pCompressedBuffers[i].CompressedBufferType]);
}
}
@@ -1455,6 +1465,7 @@ static HRESULT STDMETHODCALLTYPE CreateVideoDecoderMine(
if ((Guid == DXVA2_ModeH264_E) ||
(Guid == DXVA2_ModeVC1_D) ||
(Guid == DXVA_Intel_H264_ClearVideo) ||
+ (Guid == DXVA_Intel_VC1_ClearVideo) ||
(Guid == DXVA2_ModeMPEG2_VLD)) {
*ppDecode = DNew CFakeDirectXVideoDecoder (NULL, *ppDecode);
(*ppDecode)->AddRef();
@@ -1535,10 +1546,10 @@ void HookDirectXVideoDecoderService(void* pIDirectXVideoDecoderService)
}
// TODO : remove log file !!
-#ifdef _DEBUG
- ::DeleteFile (LOG_FILE);
- ::DeleteFile (_T("picture.log"));
- ::DeleteFile (_T("slicelong.log"));
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_A)
+ ::DeleteFile (LOG_FILE_DXVA);
+ ::DeleteFile (LOG_FILE_PICTURE);
+ ::DeleteFile (LOG_FILE_SLICELONG);
#endif
if (!g_pIDirectXVideoDecoderServiceCVtbl && pIDirectXVideoDecoderService) {
diff --git a/src/filters/source/D2VSource/D2VSource.vcxproj b/src/filters/source/D2VSource/D2VSource.vcxproj
index a2d25325e..a0e07bdce 100644
--- a/src/filters/source/D2VSource/D2VSource.vcxproj
+++ b/src/filters/source/D2VSource/D2VSource.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>D2VSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>D2VSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -251,6 +249,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="D2VSource.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
diff --git a/src/filters/source/D2VSource/D2VSource.vcxproj.filters b/src/filters/source/D2VSource/D2VSource.vcxproj.filters
index f059b4781..2c9ea014f 100644
--- a/src/filters/source/D2VSource/D2VSource.vcxproj.filters
+++ b/src/filters/source/D2VSource/D2VSource.vcxproj.filters
@@ -30,6 +30,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="D2VSource.def">
diff --git a/src/filters/source/D2VSource/MPEG2Dec.cpp b/src/filters/source/D2VSource/MPEG2Dec.cpp
index 4e7bdc87c..190768532 100644
--- a/src/filters/source/D2VSource/MPEG2Dec.cpp
+++ b/src/filters/source/D2VSource/MPEG2Dec.cpp
@@ -1244,7 +1244,7 @@ void CMPEG2Dec::picture_data()
/* return -1: go to next picture */
int CMPEG2Dec::slice(int MBAmax)
{
- int MBA = 0, MBAinc =0, macroblock_type, motion_type, dct_type, ret;
+ int MBA = 0, MBAinc =0, macroblock_type, motion_type, dct_type = -1, ret;
int dc_dct_pred[3], PMV[2][2][2], motion_vertical_field_select[2][2], dmvector[2];
if ((ret=start_of_slice(&MBA, &MBAinc, dc_dct_pred, PMV))!=1)
@@ -1281,6 +1281,7 @@ resync:
/* ISO/IEC 13818-2 section 7.6.6 */
skipped_macroblock(dc_dct_pred, PMV, &motion_type, motion_vertical_field_select, &macroblock_type);
+ _ASSERTE(dct_type != -1); // This should never happened
/* ISO/IEC 13818-2 section 7.6 */
motion_compensation(MBA, macroblock_type, motion_type, PMV,
motion_vertical_field_select, dmvector, dct_type);
diff --git a/src/filters/source/D2VSource/stdafx.h b/src/filters/source/D2VSource/stdafx.h
index ea1e96289..41145a210 100644
--- a/src/filters/source/D2VSource/stdafx.h
+++ b/src/filters/source/D2VSource/stdafx.h
@@ -1,15 +1,24 @@
-#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+/*
+ * This Program 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 2, or (at your option)
+ * any later version.
+ *
+ * This Program 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 GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
+#pragma once
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj b/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj
index dd15c1c8b..2c1c793d7 100644
--- a/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj
+++ b/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj
@@ -218,7 +218,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DTSAC3Source.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -239,7 +238,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DTSAC3Source.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="DTSAC3Source.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj.filters b/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj.filters
index a495b93fe..219b20d08 100644
--- a/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj.filters
+++ b/src/filters/source/DTSAC3Source/DTSAC3Source.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="DTSAC3Source.def">
diff --git a/src/filters/source/DTSAC3Source/stdafx.h b/src/filters/source/DTSAC3Source/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/source/DTSAC3Source/stdafx.h
+++ b/src/filters/source/DTSAC3Source/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/source/FLICSource/FLICSource.vcxproj b/src/filters/source/FLICSource/FLICSource.vcxproj
index 83e2126df..2c24aa0d9 100644
--- a/src/filters/source/FLICSource/FLICSource.vcxproj
+++ b/src/filters/source/FLICSource/FLICSource.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FLICSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FLICSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="FLICSource.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/source/FLICSource/FLICSource.vcxproj.filters b/src/filters/source/FLICSource/FLICSource.vcxproj.filters
index 9dba87b53..682e961d5 100644
--- a/src/filters/source/FLICSource/FLICSource.vcxproj.filters
+++ b/src/filters/source/FLICSource/FLICSource.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="FLICSource.def">
diff --git a/src/filters/source/FLICSource/stdafx.h b/src/filters/source/FLICSource/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/source/FLICSource/stdafx.h
+++ b/src/filters/source/FLICSource/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/source/FlacSource/FlacSource.vcxproj b/src/filters/source/FlacSource/FlacSource.vcxproj
index f9edcbafa..38d34c89d 100644
--- a/src/filters/source/FlacSource/FlacSource.vcxproj
+++ b/src/filters/source/FlacSource/FlacSource.vcxproj
@@ -227,7 +227,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FlacSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -248,7 +247,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>FlacSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -256,6 +254,18 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="FlacSource.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/source/FlacSource/FlacSource.vcxproj.filters b/src/filters/source/FlacSource/FlacSource.vcxproj.filters
index c33b77216..afe5ad0ef 100644
--- a/src/filters/source/FlacSource/FlacSource.vcxproj.filters
+++ b/src/filters/source/FlacSource/FlacSource.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="FlacSource.def">
diff --git a/src/filters/source/FlacSource/stdafx.h b/src/filters/source/FlacSource/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/source/FlacSource/stdafx.h
+++ b/src/filters/source/FlacSource/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj b/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj
index c9e4a8a76..dc075160a 100644
--- a/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj
+++ b/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>ShoutcastSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>ShoutcastSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="ShoutcastSource.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj.filters b/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj.filters
index 40b70e35d..4ca17e93a 100644
--- a/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj.filters
+++ b/src/filters/source/ShoutcastSource/ShoutcastSource.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="ShoutcastSource.def">
diff --git a/src/filters/source/ShoutcastSource/stdafx.h b/src/filters/source/ShoutcastSource/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/source/ShoutcastSource/stdafx.h
+++ b/src/filters/source/ShoutcastSource/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.cpp b/src/filters/source/SubtitleSource/SubtitleSource.cpp
index 8bd54eb70..c6e0f0ffd 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.cpp
+++ b/src/filters/source/SubtitleSource/SubtitleSource.cpp
@@ -188,11 +188,12 @@ STDMETHODIMP CSubtitleSource::Load(LPCOLESTR pszFileName, const AM_MEDIA_TYPE* p
STDMETHODIMP CSubtitleSource::GetCurFile(LPOLESTR* ppszFileName, AM_MEDIA_TYPE* pmt)
{
- if(!ppszFileName) {
+ if (!ppszFileName) {
return E_POINTER;
}
-
- if(!(*ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength()+1)*sizeof(WCHAR)))) {
+
+ *ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength() + 1) * sizeof(WCHAR));
+ if (!*ppszFileName) {
return E_OUTOFMEMORY;
}
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
index f36c38aef..7eb565bb2 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
+++ b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -249,6 +247,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">Create</PrecompiledHeader>
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
index 5cd8db6ef..ae66f7c8e 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
+++ b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="SubtitleSource.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="SubtitleSource.def">
diff --git a/src/filters/source/SubtitleSource/stdafx.h b/src/filters/source/SubtitleSource/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/source/SubtitleSource/stdafx.h
+++ b/src/filters/source/SubtitleSource/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/stdafx.h b/src/filters/stdafx.h
index a6b2179fe..b4623000c 100644
--- a/src/filters/stdafx.h
+++ b/src/filters/stdafx.h
@@ -22,18 +22,8 @@
*/
#pragma once
-#include "../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <dshow.h>
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../DSUtil/SharedInclude.h"
+#include "../../../include/stdafx_common.h"
+#include "../../../include/stdafx_common_afx.h"
+#include "../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
index ef327a3cf..5cea04628 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
@@ -170,7 +170,6 @@
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -189,7 +188,6 @@
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -241,6 +239,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="Audio.cpp" />
<ClCompile Include="AudioSwitcher.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
index e1f89e55d..9b5bc798c 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
@@ -23,6 +23,15 @@
<ClCompile Include="StreamSwitcher.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="AudioSwitcher.def">
diff --git a/src/filters/switcher/AudioSwitcher/stdafx.h b/src/filters/switcher/AudioSwitcher/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/switcher/AudioSwitcher/stdafx.h
+++ b/src/filters/switcher/AudioSwitcher/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
index fadd20108..f5e09a33e 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -247,6 +245,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="AVI2AC3Filter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
index ca353514b..4bf920164 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
@@ -21,6 +21,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="AVI2AC3Filter.def">
diff --git a/src/filters/transform/AVI2AC3Filter/stdafx.h b/src/filters/transform/AVI2AC3Filter/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/transform/AVI2AC3Filter/stdafx.h
+++ b/src/filters/transform/AVI2AC3Filter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/BaseVideoFilter/stdafx.h b/src/filters/transform/BaseVideoFilter/stdafx.h
index 79bb9cc0d..41145a210 100644
--- a/src/filters/transform/BaseVideoFilter/stdafx.h
+++ b/src/filters/transform/BaseVideoFilter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,18 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
-#include <amvideo.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/BufferFilter/BufferFilter.vcxproj b/src/filters/transform/BufferFilter/BufferFilter.vcxproj
index 720a8a17e..a26d12030 100644
--- a/src/filters/transform/BufferFilter/BufferFilter.vcxproj
+++ b/src/filters/transform/BufferFilter/BufferFilter.vcxproj
@@ -167,7 +167,6 @@
<OutputFile>$(OutDir)$(ProjectName).ax</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -185,7 +184,6 @@
<OutputFile>$(OutDir)$(ProjectName).ax</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -235,6 +233,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="BufferFilter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters b/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
index afadbd9f5..42cf11ff9 100644
--- a/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
+++ b/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
@@ -17,6 +17,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="BufferFilter.def">
diff --git a/src/filters/transform/BufferFilter/stdafx.h b/src/filters/transform/BufferFilter/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/transform/BufferFilter/stdafx.h
+++ b/src/filters/transform/BufferFilter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
index 2ad3f023c..650db0be6 100644
--- a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
+++ b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
@@ -167,7 +167,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -185,7 +184,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -235,6 +233,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="DeCSSFilter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">Create</PrecompiledHeader>
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
index c74cc5eda..176cf094e 100644
--- a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
+++ b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
@@ -17,6 +17,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="DeCSSFilter.def">
diff --git a/src/filters/transform/DeCSSFilter/stdafx.h b/src/filters/transform/DeCSSFilter/stdafx.h
index d1c3768d8..41145a210 100644
--- a/src/filters/transform/DeCSSFilter/stdafx.h
+++ b/src/filters/transform/DeCSSFilter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.c b/src/filters/transform/MPCVideoDec/FfmpegContext.c
index 25e01ad5f..8a5cf596e 100644
--- a/src/filters/transform/MPCVideoDec/FfmpegContext.c
+++ b/src/filters/transform/MPCVideoDec/FfmpegContext.c
@@ -333,8 +333,10 @@ HRESULT FFH264BuildPicParams (DXVA_PicParams_H264* pDXVAPicParams, DXVA_Qmatrix_
pDXVAPicParams->log2_max_frame_num_minus4 = cur_sps->log2_max_frame_num - 4; // log2_max_frame_num_minus4;
pDXVAPicParams->pic_order_cnt_type = cur_sps->poc_type; // pic_order_cnt_type;
- pDXVAPicParams->log2_max_pic_order_cnt_lsb_minus4 = cur_sps->log2_max_poc_lsb - 4; // log2_max_pic_order_cnt_lsb_minus4;
- pDXVAPicParams->delta_pic_order_always_zero_flag = cur_sps->delta_pic_order_always_zero_flag;
+ if(cur_sps->poc_type == 0)
+ pDXVAPicParams->log2_max_pic_order_cnt_lsb_minus4 = cur_sps->log2_max_poc_lsb - 4; // log2_max_pic_order_cnt_lsb_minus4;
+ else if(cur_sps->poc_type == 1)
+ pDXVAPicParams->delta_pic_order_always_zero_flag = cur_sps->delta_pic_order_always_zero_flag;
pDXVAPicParams->direct_8x8_inference_flag = cur_sps->direct_8x8_inference_flag;
pDXVAPicParams->entropy_coding_mode_flag = cur_pps->cabac; // entropy_coding_mode_flag;
pDXVAPicParams->pic_order_present_flag = cur_pps->pic_order_present; // pic_order_present_flag;
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj b/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj
index 84490b863..21cd10600 100644
--- a/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj
+++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)lib;$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MPCVideoDec.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -195,7 +194,6 @@
<AdditionalLibraryDirectories>$(SolutionDir)lib64;$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>MPCVideoDec.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -265,6 +263,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="CpuId.cpp" />
<ClCompile Include="DXVADecoder.cpp" />
<ClCompile Include="DXVADecoderH264.cpp" />
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj.filters b/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj.filters
index aee6128c9..a1cd6862c 100644
--- a/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj.filters
+++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.vcxproj.filters
@@ -57,6 +57,15 @@
<ClCompile Include="VideoDecOutputPin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CpuId.h">
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/gccbuild.bat b/src/filters/transform/MPCVideoDec/ffmpeg/gccbuild.bat
index 0b80e35ae..b52923339 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/gccbuild.bat
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/gccbuild.bat
@@ -41,9 +41,9 @@ IF "%~1" == "" (
SET "make_args=-j4"
IF /I "%BUILDTYPE%"=="clean" SET "make_args="
-TITLE "make.exe 64BIT=yes %make_args% %*"
-ECHO make.exe 64BIT=yes %make_args% %*
-make.exe 64BIT=yes %make_args% %*
+TITLE "make.exe %make_args% %*"
+ECHO make.exe %make_args% %*
+make.exe %make_args% %*
EXIT /B
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg_x64/buildmingwlibs.sh b/src/filters/transform/MPCVideoDec/ffmpeg_x64/buildmingwlibs.sh
index b1e71664a..5f9778c6e 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg_x64/buildmingwlibs.sh
+++ b/src/filters/transform/MPCVideoDec/ffmpeg_x64/buildmingwlibs.sh
@@ -10,7 +10,8 @@ GCCVER=`$CC -v 2>&1 | tail -1 | awk '{print $3}'`
updatemingw="false"
-while opt=$1 && shift; do
+while opt=$1 && shift
+do
case "$opt" in
"--help" )
cat << EOF
@@ -38,7 +39,7 @@ To use this script, you should first:
--help Displays this text
- --update Gets the latest MinGW64 and rebuilds the library
+ --update Gets the latest MinGW64
--compile Starts MinGW64 compilation
EOF
@@ -57,20 +58,22 @@ EOF
esac
done
-for i in "$PF" "$PF/$TGT" "build" "$BD/mingw" "$BD/mingw/build-$HST"; do
+for i in "$PF" "$PF/$TGT" "build" "$BD/mingw" "$BD/mingw/build-$HST"
+do
[ -d "$i" ] || mkdir "$i" || updatemingw="true"
done
-if [[ $updatemingw == "true" ]]; then
+if [[ $updatemingw == "true" ]]
+then
echo "Downloading MinGW64 crt and headers..."
cd "$BD/mingw"
# remove patched files
- if [ -f mingw-w64-crt/misc/delayimp.c ];
+ if [ -f mingw-w64-crt/misc/delayimp.c ]
then
rm mingw-w64-crt/misc/delayimp.c
fi
- if [ -f mingw-w64-crt/misc/mingw_getsp.S ];
+ if [ -f mingw-w64-crt/misc/mingw_getsp.S ]
then
rm mingw-w64-crt/misc/mingw_getsp.S
fi
@@ -84,11 +87,12 @@ if [[ $updatemingw == "true" ]]; then
[ -d "$dest" ] && echo "$dest" already exists || ( cp -prf mingw-w64-headers/include "$dest" && /bin/find "$dest" -name ".svn" | xargs rm -rf )
fi
-if [[ $compilewmingw == "true" ]]; then
+if [[ $compilewmingw == "true" ]]
+then
echo "Compiling MinGW64 crt and headers..."
cd "$BD/mingw/build-$HST"
../mingw-w64-crt/configure --prefix="$PF" --with-sysroot="$PF" --host="$TGT" --disable-lib32 || exit 1
- make CFLAGS="-fno-leading-underscore" -s && make install || exit 1
+ make -j4 CFLAGS="-fno-leading-underscore" -s && make install || exit 1
cp "/mingw/lib/gcc/x86_64-w64-mingw32/$GCCVER/libgcc.a" "$BD/../../../../../../lib64/libgcc.a"
cp "$PF/x86_64-w64-mingw32/lib/libmingwex.a" "$BD/../../../../../../lib64/libmingwex.a"
fi
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg_x64/mpchc_Mingw64.patch b/src/filters/transform/MPCVideoDec/ffmpeg_x64/mpchc_Mingw64.patch
index 9e5ad7ca2..470a34829 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg_x64/mpchc_Mingw64.patch
+++ b/src/filters/transform/MPCVideoDec/ffmpeg_x64/mpchc_Mingw64.patch
@@ -1,43 +1,13 @@
Index: mingw-w64-crt/misc/delayimp.c
===================================================================
---- mingw-w64-crt/misc/delayimp.c (revision 2509)
+--- mingw-w64-crt/misc/delayimp.c (revision 4166)
+++ mingw-w64-crt/misc/delayimp.c (working copy)
-@@ -132,6 +132,7 @@
- /*typedef unsigned long *PULONG_PTR;*/
- #endif
-
-+/*
- FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd,FARPROC *ppfnIATEntry);
-
- FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd,FARPROC *ppfnIATEntry)
-@@ -277,3 +278,5 @@
- }
- return hrRet;
+@@ -47,7 +47,7 @@
+ return (unsigned) (pitdCur - pitdBase);
}
-+
-+*/
-\ No newline at end of file
-Index: mingw-w64-crt/misc/mingw_getsp.S
-===================================================================
---- mingw-w64-crt/misc/mingw_getsp.S (revision 2509)
-+++ mingw-w64-crt/misc/mingw_getsp.S (working copy)
-@@ -22,14 +22,14 @@
- #endif
- ret
--.globl __MINGW_USYMBOL(longjmp)
-- .def __MINGW_USYMBOL(longjmp); .scl 2; .type 32; .endef
--__MINGW_USYMBOL(longjmp):
-+.globl _longjmp
-+ .def _longjmp; .scl 2; .type 32; .endef
-+_longjmp:
- #ifdef _WIN64
- xorl %eax,%eax
- movl %eax, (%rcx)
-- leaq __MINGW_USYMBOL(fctMsvcrtLongJmp)(%rip), %rax
-+ leaq _fctMsvcrtLongJmp(%rip), %rax
- jmpq *(%rax)
- #else
-- jmp *__MINGW_USYMBOL(fctMsvcrtLongJmp)
-+ jmp *_fctMsvcrtLongJmp
- #endif
+-#define __ImageBase __MINGW_LSYMBOL(_image_base__)
++//#define __ImageBase __MINGW_LSYMBOL(_image_base__)
+ extern IMAGE_DOS_HEADER __ImageBase;
+
+ #define PtrFromRVA(RVA) (((PBYTE)&__ImageBase) + (RVA))
diff --git a/src/filters/transform/MPCVideoDec/stdafx.cpp b/src/filters/transform/MPCVideoDec/stdafx.cpp
index 988ae62cd..a321c46cd 100644
--- a/src/filters/transform/MPCVideoDec/stdafx.cpp
+++ b/src/filters/transform/MPCVideoDec/stdafx.cpp
@@ -23,7 +23,7 @@
#include "stdafx.h"
-#ifdef _DEBUG
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_B)
#define LOG_FILE _T("dxva.log")
diff --git a/src/filters/transform/MPCVideoDec/stdafx.h b/src/filters/transform/MPCVideoDec/stdafx.h
index 20ab527b4..e2228b3a6 100644
--- a/src/filters/transform/MPCVideoDec/stdafx.h
+++ b/src/filters/transform/MPCVideoDec/stdafx.h
@@ -1,42 +1,28 @@
/*
- * $Id$
+ * This Program 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 2, or (at your option)
+ * any later version.
*
- * (C) 2006-2010 see AUTHORS
+ * This Program 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.
*
- * 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/>.
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
*
*/
-
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
-#include <streams.h>
-#include <dvdmedia.h>
#include <d3dx9.h>
#include <evr.h>
#include <mfapi.h>
@@ -44,8 +30,7 @@
#include <atlcoll.h>
#include <vector>
-
-#ifdef _DEBUG
+#if defined(_DEBUG) && defined(DXVA_LOGFILE_B)
void LOG(LPCTSTR fmt, ...);
#else
inline void LOG(LPCTSTR fmt, ...) {}
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp b/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp
index e8b111a9c..41ea23da2 100644
--- a/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp
+++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp
@@ -803,7 +803,7 @@ HRESULT CMpaDecFilter::ProcessHdmvLPCM(bool bAlignOldBuffer) // Blu ray LPCM
return Deliver(pBuff, wfein->nSamplesPerSec, wfein->nChannels, remap->dwChannelMask);
}
-#endif
+#endif /* INTERNAL_DECODER_LPCM */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_AC3
HRESULT CMpaDecFilter::ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoughData)
@@ -1034,8 +1034,7 @@ HRESULT CMpaDecFilter::ProcessAC3()
return S_OK;
}
#endif
-
-#endif
+#endif /* INTERNAL_DECODER_AC3 */
#if defined(REGISTER_FILTER) | HAS_FFMPEG_AUDIO_DECODERS
HRESULT CMpaDecFilter::ProcessFFmpeg(int nCodecId)
@@ -1058,7 +1057,7 @@ HRESULT CMpaDecFilter::ProcessFFmpeg(int nCodecId)
return hr;
}
-#endif
+#endif /* HAS_FFMPEG_AUDIO_DECODERS */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_DTS
HRESULT CMpaDecFilter::ProcessDTS()
@@ -1145,7 +1144,7 @@ HRESULT CMpaDecFilter::ProcessDTS()
return S_OK;
}
-#endif
+#endif /* INTERNAL_DECODER_DTS */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_AAC
HRESULT CMpaDecFilter::ProcessAAC()
@@ -1200,16 +1199,16 @@ HRESULT CMpaDecFilter::ProcessAAC()
int chmap[countof(info.channel_position)];
memset(chmap, 0, sizeof(chmap));
- for(int i = 0; i < info.channels; i++) {
+ for(unsigned char i = 0; i < info.channels; ++i) {
unsigned int ch = 0, mask = chmask[info.channel_position[i]];
- for(int j = 0; j < 32; j++) {
+ for(unsigned int j = 0; j < 32; ++j) {
if(dwChannelMask & (1 << j)) {
- if((1 << j) == mask) {
+ if((unsigned int)(1 << j) == mask) {
chmap[i] = ch;
break;
}
- ch++;
+ ++ch;
}
}
}
@@ -1230,8 +1229,9 @@ HRESULT CMpaDecFilter::ProcessAAC()
return S_OK;
}
-#endif
+#endif /* INTERNAL_DECODER_AAC */
+#if defined(REGISTER_FILTER) | INTERNAL_DECODER_PCM
HRESULT CMpaDecFilter::ProcessPCMraw() //'raw '
{
WAVEFORMATEX* wfe = (WAVEFORMATEX*)m_pInput->CurrentMediaType().Format();
@@ -1454,7 +1454,9 @@ HRESULT CMpaDecFilter::ProcessPCMfloatLE() //little-endian 'fl32' and 'fl64'
m_buff.RemoveAll();
return S_OK;
}
+#endif /* INTERNAL_DECODER_PCM */
+#if defined(REGISTER_FILTER) | INTERNAL_DECODER_PS2AUDIO
HRESULT CMpaDecFilter::ProcessPS2PCM()
{
BYTE* p = m_buff.GetData();
@@ -1604,6 +1606,7 @@ HRESULT CMpaDecFilter::ProcessPS2ADPCM()
return S_OK;
}
+#endif /* INTERNAL_DECODER_PS2AUDIO */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_VORBIS
HRESULT CMpaDecFilter::ProcessVorbis()
@@ -1658,7 +1661,7 @@ HRESULT CMpaDecFilter::ProcessVorbis()
return hr;
}
-#endif
+#endif /* INTERNAL_DECODER_VORBIS */
static inline float fscale(mad_fixed_t sample)
{
@@ -1680,7 +1683,7 @@ HRESULT CMpaDecFilter::ProcessFlac()
FLAC__stream_decoder_process_single ((FLAC__StreamDecoder*) m_flac.pDecoder);
return m_flac.hr;
}
-#endif
+#endif /* INTERNAL_DECODER_FLAC */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_MPEGAUDIO
HRESULT CMpaDecFilter::ProcessMPA()
@@ -1696,7 +1699,7 @@ HRESULT CMpaDecFilter::ProcessMPA()
}
if( m_stream.error == MAD_ERROR_BADDATAPTR) {
- TRACE(_T("MAD MAD_ERROR_BADDATAPTR"));
+ TRACE(_T("MAD MAD_ERROR_BADDATAPTR\n"));
continue;
}
@@ -1753,7 +1756,7 @@ HRESULT CMpaDecFilter::ProcessMPA()
return S_OK;
}
-#endif
+#endif /* INTERNAL_DECODER_MPEGAUDIO */
HRESULT CMpaDecFilter::GetDeliveryBuffer(IMediaSample** pSample, BYTE** pData)
{
@@ -1823,6 +1826,7 @@ HRESULT CMpaDecFilter::Deliver(CAtlArray<float>& pBuff, DWORD nSamplesPerSec, WO
WAVEFORMATEX* wfeout = (WAVEFORMATEX*)m_pOutput->CurrentMediaType().Format();
ASSERT(wfeout->nChannels == wfe->nChannels);
ASSERT(wfeout->nSamplesPerSec == wfe->nSamplesPerSec);
+ UNREFERENCED_PARAMETER(wfeout);
float* pDataIn = pBuff.GetData();
@@ -2476,7 +2480,7 @@ bool aac_state_t::init(const CMediaType& mt)
const WAVEFORMATEX* wfe = (WAVEFORMATEX*)mt.Format();
return !NeAACDecInit2(h, (BYTE*)(wfe+1), wfe->cbSize, &freq, &channels);
}
-#endif
+#endif /* INTERNAL_DECODER_AAC */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_VORBIS
//
@@ -2569,7 +2573,7 @@ bool vorbis_state_t::init(const CMediaType& mt)
return true;
}
-#endif
+#endif /* INTERNAL_DECODER_VORBIS */
#if defined(REGISTER_FILTER) | INTERNAL_DECODER_FLAC
@@ -2683,7 +2687,7 @@ void CMpaDecFilter::flac_stream_finish()
#pragma endregion
-#endif
+#endif /* INTERNAL_DECODER_FLAC */
#if defined(REGISTER_FILTER) | HAS_FFMPEG_AUDIO_DECODERS
@@ -2836,8 +2840,8 @@ HRESULT CMpaDecFilter::DeliverFFmpeg(int nCodecId, BYTE* p, int buffsize, int& s
}
size += used_byte;//
- if ( nPCMLength>0) {
- WAVEFORMATEX* wfein = (WAVEFORMATEX*)m_pInput->CurrentMediaType().Format();
+ if (nPCMLength > 0) {
+ //WAVEFORMATEX* wfein = (WAVEFORMATEX*)m_pInput->CurrentMediaType().Format();
CAtlArray<float> pBuff;
int nRemap;
float* pDataOut;
@@ -2979,4 +2983,4 @@ void CMpaDecFilter::ffmpeg_stream_finish()
#pragma endregion
-#endif
+#endif /* HAS_FFMPEG_AUDIO_DECODERS */
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj
index 6c526b2ec..bae19077b 100644
--- a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj
+++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj
@@ -173,7 +173,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)lib;$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpaDecFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -194,7 +193,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)lib64;$(SolutionDir)bin10\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>MpaDecFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ResourceCompile>
@@ -255,6 +253,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="MpaDecFilter.cpp" />
<ClCompile Include="MpaDecSettingsWnd.cpp" />
<ClCompile Include="stdafx.cpp">
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj.filters b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj.filters
index 46d343c11..f86443e33 100644
--- a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj.filters
+++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj.filters
@@ -24,6 +24,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="IMpaDecFilter.h">
diff --git a/src/filters/transform/MpaDecFilter/libdca/vc++/libdca.vcxproj b/src/filters/transform/MpaDecFilter/libdca/vc++/libdca.vcxproj
index 196d653b0..5aa20c665 100644
--- a/src/filters/transform/MpaDecFilter/libdca/vc++/libdca.vcxproj
+++ b/src/filters/transform/MpaDecFilter/libdca/vc++/libdca.vcxproj
@@ -70,6 +70,7 @@
<ClCompile>
<AdditionalIncludeDirectories>.;..\include;..\..\..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -87,7 +88,7 @@
<AdditionalIncludeDirectories>.;..\include;..\..\..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
- <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4127;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -101,6 +102,7 @@
<ClCompile>
<AdditionalIncludeDirectories>.;..\include;..\..\..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4127</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -118,7 +120,7 @@
<AdditionalIncludeDirectories>.;..\include;..\..\..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4127;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/transform/MpaDecFilter/stdafx.h b/src/filters/transform/MpaDecFilter/stdafx.h
index 47fd64b3c..41145a210 100644
--- a/src/filters/transform/MpaDecFilter/stdafx.h
+++ b/src/filters/transform/MpaDecFilter/stdafx.h
@@ -1,9 +1,4 @@
/*
- * $Id$
- *
- * (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
- *
* This Program 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 2, or (at your option)
@@ -22,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
index 12360f18c..825cc9b7b 100644
--- a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
+++ b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
@@ -1368,7 +1368,7 @@ STDMETHODIMP CMpeg2DecInputPin::Get(REFGUID PropSet, ULONG Id, LPVOID pInstanceD
}
break;
case AM_RATE_QueryLastRateSegPTS: {
- REFERENCE_TIME* p = (REFERENCE_TIME*)pPropertyData;
+ //REFERENCE_TIME* p = (REFERENCE_TIME*)pPropertyData;
return E_PROP_ID_UNSUPPORTED;
}
break;
diff --git a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj
index 21087fc82..0f77d40a7 100644
--- a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj
+++ b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj
@@ -166,7 +166,6 @@
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);$(SolutionDir)lib\detours;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>Mpeg2DecFilter.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
@@ -181,7 +180,6 @@
<Link>
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)bin10\lib\Release_$(Platform);$(SolutionDir)lib64\detours;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -244,6 +242,18 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="idct_sse2.cpp">
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">AssemblyAndSourceCode</AssemblerOutput>
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">AssemblyAndSourceCode</AssemblerOutput>
diff --git a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj.filters b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj.filters
index 6ce3920f6..23f75ce15 100644
--- a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj.filters
+++ b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.vcxproj.filters
@@ -33,6 +33,15 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="attributes.h">
diff --git a/src/filters/transform/Mpeg2DecFilter/stdafx.h b/src/filters/transform/Mpeg2DecFilter/stdafx.h
index 2e566de2c..41145a210 100644
--- a/src/filters/transform/Mpeg2DecFilter/stdafx.h
+++ b/src/filters/transform/Mpeg2DecFilter/stdafx.h
@@ -1,7 +1,4 @@
/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
- *
* This Program 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 2, or (at your option)
@@ -20,17 +17,8 @@
*/
#pragma once
-#include "../../../DSUtil/SharedInclude.h"
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include <streams.h>
-#include <dvdmedia.h>
-#include <amvideo.h>
+#include "../../../DSUtil/SharedInclude.h"
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx.h"
+#include "../../../../include/stdafx_common_dshow.h"
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj b/src/filters/transform/VSFilter/VSFilter.vcxproj
index eed05fd7a..7da4e7b7a 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj
@@ -136,7 +136,7 @@ update_version.bat
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\include\virtualdub;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;ISOLATION_AWARE_ENABLED;_WIN32_WINNT=0x0600;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;ISOLATION_AWARE_ENABLED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_AFXDLL;NDEBUG;AFX_RESOURCE_DLL;AFX_TARG_ENU;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -149,7 +149,6 @@ update_version.bat
<IgnoreSpecificDefaultLibraries>msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
<DelayLoadDLLs>oleacc.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
@@ -167,7 +166,7 @@ update_version.bat
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\include\virtualdub;..\..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_USRDLL;ISOLATION_AWARE_ENABLED;_WIN32_WINNT=0x0600;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_USRDLL;ISOLATION_AWARE_ENABLED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
</ClCompile>
<ResourceCompile>
@@ -181,7 +180,6 @@ update_version.bat
<IgnoreSpecificDefaultLibraries>msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
<DelayLoadDLLs>oleacc.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
@@ -189,6 +187,9 @@ update_version.bat
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp" />
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp" />
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp" />
<ClCompile Include="AvgLines.cpp" />
<ClCompile Include="Copy.cpp" />
<ClCompile Include="csriapi.cpp" />
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
index 4d020c014..22a5e63bd 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
@@ -57,6 +57,15 @@
<ClCompile Include="VSFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\winmdi.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxctrlcontainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mfc\afxglobals.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="VSFilter.def">
diff --git a/src/filters/transform/VSFilter/stdafx.h b/src/filters/transform/VSFilter/stdafx.h
index ca6dba445..7a6617da2 100644
--- a/src/filters/transform/VSFilter/stdafx.h
+++ b/src/filters/transform/VSFilter/stdafx.h
@@ -1,9 +1,4 @@
/*
- * $Id$
- *
- * (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
- *
* This Program 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 2, or (at your option)
@@ -21,39 +16,12 @@
*
*/
-
-#if !defined(AFX_STDAFX_H__E8AD1C3F_323D_4812_A1DE_AA2419CE2AF3__INCLUDED_)
-#define AFX_STDAFX_H__E8AD1C3F_323D_4812_A1DE_AA2419CE2AF3__INCLUDED_
-
#pragma once
-#define STRICT
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
-#endif
#define _ATL_APARTMENT_THREADED
-#undef WINVER
-#define WINVER 0x0501
-
#include "../../../DSUtil/SharedInclude.h"
-
-#include <afxwin.h>
-#include <afxdisp.h>
-
-#include <atlbase.h>
-//You may derive a class from CComModule and use it if you want to override
-//something, but do not change the name of _Module
-extern CComModule _Module;
-#include <atlcom.h>
-
-#define AFX_CLASS AFX_CLASS_IMPORT
-
-#include <streams.h>
-#include <dvdmedia.h>
+#include "../../../../include/stdafx_common.h"
+#include "../../../../include/stdafx_common_afx2.h"
+#include "../../../../include/stdafx_common_dshow.h"
#include "../../../DSUtil/DSUtil.h"
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__E8AD1C3F_323D_4812_A1DE_AA2419CE2AF3__INCLUDED)
diff --git a/src/thirdparty/lcms2/lcms2.vcxproj b/src/thirdparty/lcms2/lcms2.vcxproj
index 8835f4a0f..42d4b9cd2 100644
--- a/src/thirdparty/lcms2/lcms2.vcxproj
+++ b/src/thirdparty/lcms2/lcms2.vcxproj
@@ -130,7 +130,6 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
@@ -146,7 +145,6 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
diff --git a/src/thirdparty/mfc/afxctrlcontainer.cpp b/src/thirdparty/mfc/afxctrlcontainer.cpp
new file mode 100644
index 000000000..b54b4f4f9
--- /dev/null
+++ b/src/thirdparty/mfc/afxctrlcontainer.cpp
@@ -0,0 +1,373 @@
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and related
+// electronic documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+//
+// CWnd support for MFC Control containment (Feature Pack controls)
+//
+
+#include "stdafx.h"
+#undef SubclassWindow
+#include "afxctrlcontainer.h"
+#if 0
+#include "afxtagmanager.h"
+#include "afxbutton.h"
+#include "afxcolorbutton.h"
+#include "afxeditbrowsectrl.h"
+#include "afxfontcombobox.h"
+#include "afxlinkctrl.h"
+#include "afxmaskededit.h"
+#include "afxmenubutton.h"
+#include "afxpropertygridctrl.h"
+#include "afxshelllistctrl.h"
+#include "afxshelltreectrl.h"
+#include "afxvslistbox.h"
+#endif
+////////////////////////////////////////////////////////////////////////////
+
+static void DoRegisterWindowClass(LPCTSTR lpszClassName, LPCTSTR lpszBaseClassName)
+{
+ ASSERT(lpszClassName != NULL);
+ ASSERT(lpszBaseClassName != NULL);
+
+ WNDCLASS wnd = {0};
+
+ HINSTANCE hInst = AfxGetInstanceHandle();
+ if (!AfxCtxGetClassInfo(hInst, lpszBaseClassName, &wnd))
+ {
+ wnd.style = CS_DBLCLKS;
+ wnd.hInstance = hInst;
+ wnd.lpfnWndProc = ::DefWindowProc;
+ }
+
+ wnd.lpszClassName = lpszClassName;
+ AfxRegisterClass(&wnd);
+}
+
+void AfxRegisterMFCCtrlClasses()
+{
+ DoRegisterWindowClass(_T("MFCButton"), WC_BUTTON);
+ DoRegisterWindowClass(_T("MFCColorButton"), WC_BUTTON);
+ DoRegisterWindowClass(_T("MFCEditBrowse"), WC_EDIT);
+ DoRegisterWindowClass(_T("MFCFontComboBox"), WC_COMBOBOX);
+ DoRegisterWindowClass(_T("MFCLink"), WC_BUTTON);
+ DoRegisterWindowClass(_T("MFCMaskedEdit"), WC_EDIT);
+ DoRegisterWindowClass(_T("MFCMenuButton"), WC_BUTTON);
+ DoRegisterWindowClass(_T("MFCPropertyGrid"), WC_STATIC);
+ DoRegisterWindowClass(_T("MFCShellList"), WC_LISTVIEW);
+ DoRegisterWindowClass(_T("MFCShellTree"), WC_TREEVIEW);
+ DoRegisterWindowClass(_T("MFCVSListBox"), WC_STATIC);
+}
+
+////////////////////////////////////////////////////////////////////////////
+// CMFCControlContainer
+
+CMFCControlContainer::CMFCControlContainer(CWnd* pWnd) : m_pWnd(pWnd)
+{
+}
+
+CMFCControlContainer::~CMFCControlContainer()
+{
+ FreeSubclassedControls();
+ ClearControlData();
+}
+
+BOOL CMFCControlContainer::SubclassDlgControls()
+{
+ if (m_pWnd->GetSafeHwnd() != NULL)
+ {
+ // Subclass Feature Pack controls:
+ CWnd* pWndChild = m_pWnd->GetWindow(GW_CHILD);
+ while (pWndChild != NULL)
+ {
+ ASSERT_VALID(pWndChild);
+
+ TCHAR lpszClassName [MAX_CLASS_NAME + 1];
+
+ ::GetClassName(pWndChild->GetSafeHwnd(), lpszClassName, MAX_CLASS_NAME);
+ CWnd* pWndSubclassedCtrl = CreateDlgControl(lpszClassName);
+
+ if (pWndSubclassedCtrl != NULL)
+ {
+ m_arSubclassedCtrls.Add((CObject*)pWndSubclassedCtrl);
+ pWndSubclassedCtrl->SubclassWindow(pWndChild->GetSafeHwnd());
+ }
+
+ pWndChild = pWndChild->GetNextWindow();
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void CMFCControlContainer::FreeSubclassedControls()
+{
+ // Free subclassed controls:
+ for (int i = 0; i < m_arSubclassedCtrls.GetCount(); i++)
+ {
+ if (m_arSubclassedCtrls [i] != NULL)
+ {
+ delete m_arSubclassedCtrls [i];
+ }
+ }
+ m_arSubclassedCtrls.RemoveAll();
+}
+
+CWnd* CMFCControlContainer::CreateDlgControl(LPCTSTR lpszClassName)
+{
+ ASSERT(m_pWnd->GetSafeHwnd() != NULL);
+
+ if (lpszClassName != NULL)
+ {
+ CString strClass = lpszClassName;
+ CWnd* pWndSubclassedCtrl = NULL;
+#if 0
+ if (strClass == _T("MFCButton"))
+ {
+ pWndSubclassedCtrl = new CMFCButton;
+ }
+ else if (strClass == _T("MFCColorButton"))
+ {
+ pWndSubclassedCtrl = new CMFCColorButton;
+ }
+ else if (strClass == _T("MFCEditBrowse"))
+ {
+ pWndSubclassedCtrl = new CMFCEditBrowseCtrl;
+ }
+ else if (strClass == _T("MFCFontComboBox"))
+ {
+ pWndSubclassedCtrl = new CMFCFontComboBox;
+ }
+ else if (strClass == _T("MFCLink"))
+ {
+ pWndSubclassedCtrl = new CMFCLinkCtrl;
+ }
+ else if (strClass == _T("MFCMaskedEdit"))
+ {
+ pWndSubclassedCtrl = new CMFCMaskedEdit;
+ }
+ else if (strClass == _T("MFCMenuButton"))
+ {
+ pWndSubclassedCtrl = new CMFCMenuButton;
+ }
+ else if (strClass == _T("MFCPropertyGrid"))
+ {
+ pWndSubclassedCtrl = new CMFCPropertyGridCtrl;
+ }
+ else if (strClass == _T("MFCShellList"))
+ {
+ pWndSubclassedCtrl = new CMFCShellListCtrl;
+ }
+ else if (strClass == _T("MFCShellTree"))
+ {
+ pWndSubclassedCtrl = new CMFCShellTreeCtrl;
+ }
+ else if (strClass == _T("MFCVSListBox"))
+ {
+ pWndSubclassedCtrl = new CVSListBox;
+ }
+#endif
+ return pWndSubclassedCtrl;
+ }
+
+ return NULL;
+}
+
+BOOL CMFCControlContainer::IsSubclassedFeaturePackControl(HWND hWndCtrl)
+{
+ if (hWndCtrl == NULL)
+ {
+ return FALSE;
+ }
+
+ for (int i = 0; i < m_arSubclassedCtrls.GetCount(); i++)
+ {
+ CWnd* pWnd = (CWnd*)m_arSubclassedCtrls[i];
+ if (pWnd->GetSafeHwnd() == hWndCtrl)
+ {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+void CMFCControlContainer::PreUnsubclassControl(CWnd* pControl)
+{
+ UNREFERENCED_PARAMETER(pControl);
+
+// CMFCShellListCtrl* pListCtrl = DYNAMIC_DOWNCAST(CMFCShellListCtrl, pControl);
+// if (pListCtrl != NULL && pListCtrl->GetHeaderCtrl().GetSafeHwnd() != NULL)
+// {
+// pListCtrl->GetHeaderCtrl().UnsubclassWindow();
+// }
+}
+
+BOOL CMFCControlContainer::ReSubclassControl(HWND hWndCtrl, WORD nIDC, CWnd& control)
+{
+ if (hWndCtrl == NULL)
+ {
+ return FALSE;
+ }
+
+ int nIndex = -1;
+ for (int i = 0; i < m_arSubclassedCtrls.GetCount(); i++)
+ {
+ CWnd* pWnd = (CWnd*)m_arSubclassedCtrls [i];
+ if (pWnd->GetSafeHwnd() == hWndCtrl)
+ {
+ nIndex = i;
+ break;
+ }
+ }
+
+ if (nIndex != -1)
+ {
+ CWnd* pWnd = DYNAMIC_DOWNCAST(CWnd, m_arSubclassedCtrls [nIndex]);
+
+ if (pWnd->GetSafeHwnd() != NULL)
+ {
+ ASSERT_VALID(pWnd);
+
+ // get init state
+ DWORD dwSize = 0;
+ BYTE* pbInitData = NULL;
+ GetControlData(nIDC, dwSize, pbInitData);
+
+ // Free old subclassed control:
+ m_arSubclassedCtrls [nIndex] = NULL;
+
+ // unsubclass
+ PreUnsubclassControl(pWnd);
+ VERIFY(pWnd->UnsubclassWindow() == hWndCtrl);
+ // destroy
+ delete pWnd;
+
+ // subclass
+ if (!control.SubclassWindow(hWndCtrl))
+ {
+ ASSERT(FALSE); // possibly trying to subclass twice?
+ AfxThrowNotSupportedException();
+ }
+
+ // set init state
+ if (dwSize > 0)
+ {
+ control.SendMessage(WM_MFC_INITCTRL, (WPARAM)dwSize, (LPARAM)pbInitData);
+ }
+
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+void CMFCControlContainer::SetControlData(WORD nIDC, DWORD dwSize, BYTE* pbData)
+{
+ CByteArray* pArray = new CByteArray;
+ pArray->SetSize(dwSize);
+
+ BYTE* pbBuffer = pArray->GetData();
+ if (memcpy_s(pbBuffer, dwSize, pbData, dwSize) != 0)
+ {
+ delete pArray;
+ ASSERT(FALSE);
+ return;
+ }
+
+ m_mapControlData.SetAt(nIDC, pArray);
+}
+
+BOOL CMFCControlContainer::GetControlData(WORD nIDC, DWORD& dwSize, BYTE*& pbData)
+{
+ CObject* pData = NULL;
+ if (m_mapControlData.Lookup(nIDC, pData) && pData != NULL)
+ {
+ CByteArray* pArray = (CByteArray*)pData;
+ dwSize = (DWORD)pArray->GetSize();
+ pbData = pArray->GetData();
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void CMFCControlContainer::ClearControlData()
+{
+ WORD nIDC;
+ CObject* pData = NULL;
+ POSITION pos = m_mapControlData.GetStartPosition();
+ while (pos != NULL)
+ {
+ m_mapControlData.GetNextAssoc(pos, nIDC, pData);
+ CByteArray* pArray = (CByteArray*)pData;
+ delete pArray;
+ }
+
+ m_mapControlData.RemoveAll();
+}
+
+////////////////////////////////////////////////////////////////////////////
+// Accessing dialog DLGINIT helpers
+
+int __stdcall CMFCControlContainer::UTF8ToString(LPCSTR lpSrc, CString& strDst, int nLength)
+{
+ LPTSTR lpDst = NULL;
+ int count = ::MultiByteToWideChar(CP_UTF8, 0, lpSrc, nLength, NULL, 0);
+ if (count <= 0)
+ {
+ return 0;
+ }
+
+ LPWSTR lpWide = new WCHAR[count + 1];
+ memset(lpWide, 0, (count + 1) * sizeof(WCHAR));
+
+ ::MultiByteToWideChar(CP_UTF8, 0, lpSrc, nLength, lpWide, count);
+
+#ifdef _UNICODE
+ lpDst = lpWide;
+#else
+ count = ::WideCharToMultiByte(::GetACP(), 0, lpWide, -1, NULL, 0, NULL, 0);
+
+ if (count > 0)
+ {
+ lpDst = new char[count + 1];
+ memset(lpDst, 0, count + 1);
+
+ ::WideCharToMultiByte(::GetACP(), 0, lpWide, -1, lpDst, count, NULL, 0);
+ }
+
+ delete [] lpWide;
+#endif
+
+ strDst = lpDst;
+ delete[] lpDst;
+ return count;
+}
+
+BOOL __stdcall CMFCControlContainer::ReadBoolProp(CTagManager& /*tagManager*/, LPCTSTR lpszTag, BOOL& bMember)
+{
+ if (lpszTag == NULL)
+ {
+ return FALSE;
+ }
+
+ CString str;
+// tagManager.ExcludeTag(lpszTag, str);
+
+ if (str.IsEmpty())
+ {
+ return FALSE;
+ }
+
+ bMember = (str.CompareNoCase(PS_True) == 0);
+ return TRUE;
+}
diff --git a/src/thirdparty/mfc/afxglobals.cpp b/src/thirdparty/mfc/afxglobals.cpp
new file mode 100644
index 000000000..86372c7e1
--- /dev/null
+++ b/src/thirdparty/mfc/afxglobals.cpp
@@ -0,0 +1,1600 @@
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and related
+// electronic documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+
+#include "stdafx.h"
+#include "comdef.h"
+// #include "afxcontrolbarutil.h"
+#include "afxglobals.h"
+
+#if 0
+#include "afxvisualmanager.h"
+#include "afxkeyboardmanager.h"
+#include "afxmenuhash.h"
+#include "afxtoolbar.h"
+#include "afxmenuimages.h"
+#include "afxpaneframewnd.h"
+#include "afxdockingmanager.h"
+#include "afxvisualmanageroffice2007.h"
+#include "afxribbonres.h"
+
+#include "afxframewndex.h"
+#include "afxmdiframewndex.h"
+#include "afxoleipframewndex.h"
+#include "afxoledocipframewndex.h"
+#include "afxmdichildwndex.h"
+#endif
+
+extern CObList afxAllToolBars;
+
+BOOL CMemDC::m_bUseMemoryDC = TRUE;
+
+static const CString strOfficeFontName = _T("Tahoma");
+static const CString strOffice2007FontName = _T("Segoe UI");
+static const CString strDefaultFontName = _T("MS Sans Serif");
+static const CString strVertFontName = _T("Arial");
+static const CString strMarlettFontName = _T("Marlett");
+
+#if (_MSC_FULL_VER >= 160040219)
+HINSTANCE AFX_GLOBAL_DATA::m_hinstD2DDLL = NULL;
+HINSTANCE AFX_GLOBAL_DATA::m_hinstDWriteDLL = NULL;
+
+ID2D1Factory* AFX_GLOBAL_DATA::m_pDirect2dFactory = NULL;
+IDWriteFactory* AFX_GLOBAL_DATA::m_pWriteFactory = NULL;
+IWICImagingFactory* AFX_GLOBAL_DATA::m_pWicFactory = NULL;
+
+D2D1MAKEROTATEMATRIX AFX_GLOBAL_DATA::m_pfD2D1MakeRotateMatrix = NULL;
+
+BOOL AFX_GLOBAL_DATA::m_bD2DInitialized = FALSE;
+#endif
+
+CMemDC::CMemDC(CDC& dc, CWnd* pWnd) :
+ m_dc(dc), m_bMemDC(FALSE), m_hBufferedPaint(NULL), m_pOldBmp(NULL)
+{
+ ASSERT_VALID(pWnd);
+
+ pWnd->GetClientRect(m_rect);
+
+ m_rect.right += pWnd->GetScrollPos(SB_HORZ);
+ m_rect.bottom += pWnd->GetScrollPos(SB_VERT);
+
+ if (afxGlobalData.m_pfBeginBufferedPaint != NULL && afxGlobalData.m_pfEndBufferedPaint != NULL)
+ {
+ HDC hdcPaint = NULL;
+
+ if (!afxGlobalData.m_bBufferedPaintInited && afxGlobalData.m_pfBufferedPaintInit != NULL && afxGlobalData.m_pfBufferedPaintUnInit != NULL)
+ {
+ afxGlobalData.m_pfBufferedPaintInit();
+ afxGlobalData.m_bBufferedPaintInited = TRUE;
+ }
+
+ m_hBufferedPaint = (*afxGlobalData.m_pfBeginBufferedPaint)(dc.GetSafeHdc(), m_rect, AFX_BPBF_TOPDOWNDIB, NULL, &hdcPaint);
+
+ if (m_hBufferedPaint != NULL && hdcPaint != NULL)
+ {
+ m_bMemDC = TRUE;
+ m_dcMem.Attach(hdcPaint);
+ }
+ }
+ else
+ {
+ if (m_bUseMemoryDC && m_dcMem.CreateCompatibleDC(&m_dc) && m_bmp.CreateCompatibleBitmap(&m_dc, m_rect.Width(), m_rect.Height()))
+ {
+ //-------------------------------------------------------------
+ // Off-screen DC successfully created. Better paint to it then!
+ //-------------------------------------------------------------
+ m_bMemDC = TRUE;
+ m_pOldBmp = m_dcMem.SelectObject(&m_bmp);
+ }
+ }
+}
+
+CMemDC::CMemDC(CDC& dc, const CRect& rect) :
+ m_dc(dc), m_bMemDC(FALSE), m_hBufferedPaint(NULL), m_pOldBmp(NULL), m_rect(rect)
+{
+ ASSERT(!m_rect.IsRectEmpty());
+
+ if (afxGlobalData.m_pfBeginBufferedPaint != NULL && afxGlobalData.m_pfEndBufferedPaint != NULL)
+ {
+ HDC hdcPaint = NULL;
+
+ if (!afxGlobalData.m_bBufferedPaintInited && afxGlobalData.m_pfBufferedPaintInit != NULL && afxGlobalData.m_pfBufferedPaintUnInit != NULL)
+ {
+ afxGlobalData.m_pfBufferedPaintInit();
+ afxGlobalData.m_bBufferedPaintInited = TRUE;
+ }
+
+ m_hBufferedPaint = (*afxGlobalData.m_pfBeginBufferedPaint)(dc.GetSafeHdc(), m_rect, AFX_BPBF_TOPDOWNDIB, NULL, &hdcPaint);
+
+ if (m_hBufferedPaint != NULL && hdcPaint != NULL)
+ {
+ m_bMemDC = TRUE;
+ m_dcMem.Attach(hdcPaint);
+ }
+ }
+ else
+ {
+ if (m_bUseMemoryDC && m_dcMem.CreateCompatibleDC(&m_dc) && m_bmp.CreateCompatibleBitmap(&m_dc, m_rect.Width(), m_rect.Height()))
+ {
+ //-------------------------------------------------------------
+ // Off-screen DC successfully created. Better paint to it then!
+ //-------------------------------------------------------------
+ m_bMemDC = TRUE;
+ m_pOldBmp = m_dcMem.SelectObject(&m_bmp);
+ }
+ }
+}
+
+CMemDC::~CMemDC()
+{
+ if (m_hBufferedPaint != NULL)
+ {
+ m_dcMem.Detach();
+ (*afxGlobalData.m_pfEndBufferedPaint)(m_hBufferedPaint, TRUE);
+ }
+ else if (m_bMemDC)
+ {
+ //--------------------------------------
+ // Copy the results to the on-screen DC:
+ //--------------------------------------
+ CRect rectClip;
+ int nClipType = m_dc.GetClipBox(rectClip);
+
+ if (nClipType != NULLREGION)
+ {
+ if (nClipType != SIMPLEREGION)
+ {
+ rectClip = m_rect;
+ }
+
+ m_dc.BitBlt(rectClip.left, rectClip.top, rectClip.Width(), rectClip.Height(), &m_dcMem, rectClip.left, rectClip.top, SRCCOPY);
+ }
+
+ m_dcMem.SelectObject(m_pOldBmp);
+ }
+}
+
+static int CALLBACK FontFamalyProcFonts(const LOGFONT FAR* lplf, const TEXTMETRIC FAR* /*lptm*/, ULONG /*ulFontType*/, LPARAM lParam)
+{
+ ENSURE(lplf != NULL);
+ ENSURE(lParam != NULL);
+
+ CString strFont = lplf->lfFaceName;
+ return strFont.CollateNoCase((LPCTSTR) lParam) == 0 ? 0 : 1;
+}
+
+#if (_MSC_FULL_VER >= 160040219)
+/////////////////////////////////////////////////////////////////////////////
+// DLL Load Helper
+
+inline HMODULE AfxLoadSystemLibraryUsingFullPath(_In_z_ const WCHAR *pszLibrary)
+{
+ WCHAR wszLoadPath[MAX_PATH+1];
+ if (::GetSystemDirectoryW(wszLoadPath, _countof(wszLoadPath)) == 0)
+ {
+ return NULL;
+ }
+
+ if (wszLoadPath[wcslen(wszLoadPath)-1] != L'\\')
+ {
+ if (wcscat_s(wszLoadPath, _countof(wszLoadPath), L"\\") != 0)
+ {
+ return NULL;
+ }
+ }
+
+ if (wcscat_s(wszLoadPath, _countof(wszLoadPath), pszLibrary) != 0)
+ {
+ return NULL;
+ }
+
+ return(::AfxCtxLoadLibraryW(wszLoadPath));
+}
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// Cached system metrics, etc
+AFX_GLOBAL_DATA afxGlobalData;
+
+#if (_MSC_FULL_VER >= 160040219)
+#ifdef _AFXDLL
+// Reference count on global data
+DWORD g_dwAfxGlobalDataRef = 0;
+#endif
+#endif
+
+// Initialization code
+AFX_GLOBAL_DATA::AFX_GLOBAL_DATA()
+{
+ // Detect the kind of OS:
+ OSVERSIONINFO osvi;
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+
+ ::GetVersionEx(&osvi);
+
+ bIsRemoteSession = GetSystemMetrics(SM_REMOTESESSION);
+
+ bIsWindowsVista = (osvi.dwMajorVersion >= 6);
+ bIsWindows7 = (osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion >= 1) || (osvi.dwMajorVersion > 6) ;
+ bDisableAero = FALSE;
+
+ m_bIsRibbonImageScale = TRUE;
+
+ // Cached system values(updated in CWnd::OnSysColorChange)
+ hbrBtnShadow = NULL;
+ hbrBtnHilite = NULL;
+ hbrWindow = NULL;
+
+ UpdateSysColors();
+
+ m_hinstUXThemeDLL = ::AfxCtxLoadLibraryW(L"UxTheme.dll");
+ if (m_hinstUXThemeDLL != NULL)
+ {
+ m_pfDrawThemeBackground = (DRAWTHEMEPARENTBACKGROUND)::GetProcAddress(m_hinstUXThemeDLL, "DrawThemeParentBackground");
+ m_pfDrawThemeTextEx = (DRAWTHEMETEXTEX)::GetProcAddress(m_hinstUXThemeDLL, "DrawThemeTextEx");
+
+ m_pfBufferedPaintInit = (BUFFEREDPAINTINIT)::GetProcAddress(m_hinstUXThemeDLL, "BufferedPaintInit");
+ m_pfBufferedPaintUnInit = (BUFFEREDPAINTUNINIT)::GetProcAddress(m_hinstUXThemeDLL, "BufferedPaintUnInit");
+
+ m_pfBeginBufferedPaint = (BEGINBUFFEREDPAINT)::GetProcAddress(m_hinstUXThemeDLL, "BeginBufferedPaint");
+ m_pfEndBufferedPaint = (ENDBUFFEREDPAINT)::GetProcAddress(m_hinstUXThemeDLL, "EndBufferedPaint");
+ }
+ else
+ {
+ m_pfDrawThemeBackground = NULL;
+ m_pfDrawThemeTextEx = NULL;
+
+ m_pfBufferedPaintInit = NULL;
+ m_pfBufferedPaintUnInit = NULL;
+
+ m_pfBeginBufferedPaint = NULL;
+ m_pfEndBufferedPaint = NULL;
+ }
+
+#if (_MSC_FULL_VER >= 160040219)
+ m_hinstDwmapiDLL = AfxLoadSystemLibraryUsingFullPath(L"dwmapi.dll");
+#else
+ m_hinstDwmapiDLL = ::AfxCtxLoadLibraryW(L"dwmapi.dll");
+#endif
+ if (m_hinstDwmapiDLL != NULL)
+ {
+ m_pfDwmExtendFrameIntoClientArea = (DWMEXTENDFRAMEINTOCLIENTAREA)::GetProcAddress(m_hinstDwmapiDLL, "DwmExtendFrameIntoClientArea");
+ m_pfDwmDefWindowProc = (DWMDEFWINDOWPROC) ::GetProcAddress(m_hinstDwmapiDLL, "DwmDefWindowProc");
+ m_pfDwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED)::GetProcAddress(m_hinstDwmapiDLL, "DwmIsCompositionEnabled");
+ }
+ else
+ {
+ m_pfDwmExtendFrameIntoClientArea = NULL;
+ m_pfDwmDefWindowProc = NULL;
+ m_pfDwmIsCompositionEnabled = NULL;
+ }
+
+ m_hcurStretch = NULL;
+ m_hcurStretchVert = NULL;
+ m_hcurHand = NULL;
+ m_hcurSizeAll = NULL;
+ m_hiconTool = NULL;
+ m_hiconLink = NULL;
+ m_hiconColors = NULL;
+ m_hcurMoveTab = NULL;
+ m_hcurNoMoveTab = NULL;
+
+ m_bUseSystemFont = FALSE;
+ m_bInSettingChange = FALSE;
+
+ UpdateFonts();
+ OnSettingChange();
+
+ m_bIsRTL = FALSE;
+ m_bBufferedPaintInited = FALSE;
+
+ m_nDragFrameThicknessFloat = 4; // pixels
+ m_nDragFrameThicknessDock = 3; // pixels
+
+ m_nAutoHideToolBarSpacing = 14; // pixels
+ m_nAutoHideToolBarMargin = 4; // pixels
+
+ m_nCoveredMainWndClientAreaPercent = 50; // percents
+
+ m_nMaxToolTipWidth = -1;
+ m_bIsBlackHighContrast = FALSE;
+ m_bIsWhiteHighContrast = FALSE;
+
+ m_bUseBuiltIn32BitIcons = TRUE;
+
+ m_bComInitialized = FALSE;
+
+ m_pTaskbarList = NULL;
+ m_pTaskbarList3 = NULL;
+ m_bTaskBarInterfacesAvailable = TRUE;
+
+ EnableAccessibilitySupport();
+}
+
+AFX_GLOBAL_DATA::~AFX_GLOBAL_DATA()
+{
+ CleanUp();
+}
+
+void AFX_GLOBAL_DATA::UpdateFonts()
+{
+ CWindowDC dc(NULL);
+ m_dblRibbonImageScale = dc.GetDeviceCaps(LOGPIXELSX) / 96.0f;
+
+ if (m_dblRibbonImageScale > 1. && m_dblRibbonImageScale < 1.1)
+ {
+ m_dblRibbonImageScale = 1.;
+ }
+
+ if (fontRegular.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontRegular.Detach());
+ }
+
+ if (fontTooltip.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontTooltip.Detach());
+ }
+
+ if (fontBold.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontBold.Detach());
+ }
+
+ if (fontDefaultGUIBold.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontDefaultGUIBold.Detach());
+ }
+
+ if (fontUnderline.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontUnderline.Detach());
+ }
+
+ if (fontDefaultGUIUnderline.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontDefaultGUIUnderline.Detach());
+ }
+
+ if (fontVert.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontVert.Detach());
+ }
+
+ if (fontVertCaption.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontVertCaption.Detach());
+ }
+
+ if (fontMarlett.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontMarlett.Detach());
+ }
+
+ if (fontSmall.GetSafeHandle() != NULL)
+ {
+ ::DeleteObject(fontSmall.Detach());
+ }
+
+ // Initialize fonts:
+
+ NONCLIENTMETRICS info;
+#if (_MSC_FULL_VER >= 160040219)
+ info.cbSize = sizeof(info);
+#endif
+ GetNonClientMetrics (info);
+
+ LOGFONT lf;
+ memset(&lf, 0, sizeof(LOGFONT));
+
+ lf.lfCharSet = (BYTE) GetTextCharsetInfo(dc.GetSafeHdc(), NULL, 0);
+
+ lf.lfHeight = info.lfMenuFont.lfHeight;
+ lf.lfWeight = info.lfMenuFont.lfWeight;
+ lf.lfItalic = info.lfMenuFont.lfItalic;
+
+ //------------------
+ // Adjust font size:
+ //------------------
+ int nFontHeight = lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight;
+ if (nFontHeight <= 12)
+ {
+ nFontHeight = 11;
+ }
+ else
+ {
+ nFontHeight--;
+ }
+
+ lf.lfHeight = (lf.lfHeight < 0) ? -nFontHeight : nFontHeight;
+
+ // Check if we should use system font
+ lstrcpy(lf.lfFaceName, info.lfMenuFont.lfFaceName);
+
+ BOOL fUseSystemFont = m_bUseSystemFont || (info.lfMenuFont.lfCharSet > SYMBOL_CHARSET);
+ if (!fUseSystemFont)
+ {
+ // Check for "Segoe UI" or "Tahoma" font existance:
+ if (::EnumFontFamilies(dc.GetSafeHdc(), NULL, FontFamalyProcFonts, (LPARAM)(LPCTSTR) strOffice2007FontName) == 0)
+ {
+ // Found! Use MS Office 2007 font!
+ lstrcpy(lf.lfFaceName, strOffice2007FontName);
+ lf.lfQuality = 5 /*CLEARTYPE_QUALITY*/;
+ }
+ else if (::EnumFontFamilies(dc.GetSafeHdc(), NULL, FontFamalyProcFonts, (LPARAM)(LPCTSTR) strOfficeFontName) == 0)
+ {
+ // Found! Use MS Office font!
+ lstrcpy(lf.lfFaceName, strOfficeFontName);
+ }
+ else
+ {
+ // Not found. Use default font:
+ lstrcpy(lf.lfFaceName, strDefaultFontName);
+ }
+ }
+
+ fontRegular.CreateFontIndirect(&lf);
+
+ // Create small font:
+ LONG lfHeightSaved = lf.lfHeight;
+
+ lf.lfHeight = (long)((1. + abs(lf.lfHeight)) * 2 / 3);
+ if (lfHeightSaved < 0)
+ {
+ lf.lfHeight = -lf.lfHeight;
+ }
+
+ fontSmall.CreateFontIndirect(&lf);
+ lf.lfHeight = lfHeightSaved;
+
+ // Create tooltip font:
+ NONCLIENTMETRICS ncm;
+#if (_MSC_FULL_VER >= 160040219)
+ ncm.cbSize = sizeof(ncm);
+#endif
+ GetNonClientMetrics (ncm);
+
+ lf.lfItalic = ncm.lfStatusFont.lfItalic;
+ lf.lfWeight = ncm.lfStatusFont.lfWeight;
+ fontTooltip.CreateFontIndirect(&lf);
+
+ lf.lfItalic = info.lfMenuFont.lfItalic;
+ lf.lfWeight = info.lfMenuFont.lfWeight;
+
+ // Create "underline" font:
+ lf.lfUnderline = TRUE;
+ fontUnderline.CreateFontIndirect(&lf);
+ lf.lfUnderline = FALSE;
+
+ // Create bold font:
+ lf.lfWeight = FW_BOLD;
+ fontBold.CreateFontIndirect(&lf);
+
+ // Create Marlett font:
+ BYTE bCharSet = lf.lfCharSet;
+ lf.lfWeight = info.lfMenuFont.lfWeight;
+ lf.lfCharSet = SYMBOL_CHARSET;
+ lf.lfWeight = 0;
+ lf.lfHeight = ::GetSystemMetrics(SM_CYMENUCHECK) - 1;
+ lstrcpy(lf.lfFaceName, strMarlettFontName);
+
+ fontMarlett.CreateFontIndirect(&lf);
+ lf.lfCharSet = bCharSet; // Restore charset
+
+ // Create vertical font:
+ CFont font;
+ if (font.CreateStockObject(DEFAULT_GUI_FONT))
+ {
+ if (font.GetLogFont(&lf) != 0)
+ {
+ lf.lfOrientation = 900;
+ lf.lfEscapement = 2700;
+
+ lf.lfHeight = info.lfMenuFont.lfHeight;
+ lf.lfWeight = info.lfMenuFont.lfWeight;
+ lf.lfItalic = info.lfMenuFont.lfItalic;
+
+ {
+ lstrcpy(lf.lfFaceName, strVertFontName);
+ }
+
+ fontVert.CreateFontIndirect(&lf);
+
+ lf.lfEscapement = 900;
+ fontVertCaption.CreateFontIndirect(&lf);
+ }
+ }
+
+ // Create dialog underline and bold fonts:
+ CFont* pDefaultGUIFont = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
+ ASSERT_VALID(pDefaultGUIFont);
+ pDefaultGUIFont->GetLogFont(&lf);
+
+ lf.lfUnderline = TRUE;
+ fontDefaultGUIUnderline.CreateFontIndirect(&lf);
+ lf.lfUnderline = FALSE;
+
+ lf.lfWeight = FW_BOLD;
+ fontDefaultGUIBold.CreateFontIndirect(&lf);
+
+ UpdateTextMetrics();
+
+#if 0
+ // Notify toolbars about font changing:
+ for (POSITION posTlb = afxAllToolBars.GetHeadPosition(); posTlb != NULL;)
+ {
+ CMFCToolBar* pToolBar = (CMFCToolBar*) afxAllToolBars.GetNext(posTlb);
+ ENSURE(pToolBar != NULL);
+
+ if (CWnd::FromHandlePermanent(pToolBar->m_hWnd) != NULL)
+ {
+ ASSERT_VALID(pToolBar);
+ pToolBar->OnGlobalFontsChanged();
+ }
+ }
+#endif
+}
+
+static BOOL CALLBACK InfoEnumProc( HMONITOR hMonitor, HDC /*hdcMonitor*/, LPRECT /*lprcMonitor*/, LPARAM dwData)
+{
+ CRect* pRect = (CRect*) dwData;
+
+ MONITORINFO mi;
+ mi.cbSize = sizeof(MONITORINFO);
+
+ if (GetMonitorInfo(hMonitor, &mi))
+ {
+ CRect rectMon = mi.rcWork;
+
+ pRect->left = min(pRect->left, rectMon.left);
+ pRect->right = max(pRect->right, rectMon.right);
+ pRect->top = min(pRect->top, rectMon.top);
+ pRect->bottom = max(pRect->bottom, rectMon.bottom);
+ }
+
+ return TRUE;
+}
+
+void AFX_GLOBAL_DATA::OnSettingChange()
+{
+ m_bInSettingChange = TRUE;
+
+ m_sizeSmallIcon.cx = ::GetSystemMetrics(SM_CXSMICON);
+ m_sizeSmallIcon.cy = ::GetSystemMetrics(SM_CYSMICON);
+
+ m_rectVirtual.SetRectEmpty();
+
+ if (!EnumDisplayMonitors(NULL, NULL, InfoEnumProc, (LPARAM) &m_rectVirtual))
+ {
+ ::SystemParametersInfo(SPI_GETWORKAREA, 0, &m_rectVirtual, 0);
+ }
+
+ // Get system menu animation type:
+ m_bMenuAnimation = FALSE;
+ m_bMenuFadeEffect = FALSE;
+
+ if (!bIsRemoteSession)
+ {
+ ::SystemParametersInfo(SPI_GETMENUANIMATION, 0, &m_bMenuAnimation, 0);
+
+ if (m_bMenuAnimation)
+ {
+ ::SystemParametersInfo(SPI_GETMENUFADE, 0, &m_bMenuFadeEffect, 0);
+ }
+ }
+
+ m_nShellAutohideBars = 0;
+ m_bRefreshAutohideBars = TRUE;
+
+ ::SystemParametersInfo(SPI_GETMENUUNDERLINES, 0, &m_bSysUnderlineKeyboardShortcuts, 0);
+ m_bUnderlineKeyboardShortcuts = m_bSysUnderlineKeyboardShortcuts;
+
+ m_bInSettingChange = FALSE;
+}
+
+void AFX_GLOBAL_DATA::UpdateSysColors()
+{
+ m_bIsBlackHighContrast = ::GetSysColor(COLOR_3DLIGHT) == RGB(255, 255, 255) && ::GetSysColor(COLOR_3DFACE) == RGB(0, 0, 0);
+ m_bIsWhiteHighContrast = ::GetSysColor(COLOR_3DDKSHADOW) == RGB(0, 0, 0) && ::GetSysColor(COLOR_3DFACE) == RGB(255, 255, 255);
+
+ CWindowDC dc(NULL);
+ m_nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);
+
+ clrBarFace = clrBtnFace = ::GetSysColor(COLOR_BTNFACE);
+ clrBarShadow = clrBtnShadow = ::GetSysColor(COLOR_BTNSHADOW);
+ clrBarDkShadow = clrBtnDkShadow = ::GetSysColor(COLOR_3DDKSHADOW);
+ clrBarLight = clrBtnLight = ::GetSysColor(COLOR_3DLIGHT);
+ clrBarHilite = clrBtnHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
+ clrBarText = clrBtnText = ::GetSysColor(COLOR_BTNTEXT);
+ clrGrayedText = ::GetSysColor(COLOR_GRAYTEXT);
+ clrWindowFrame = ::GetSysColor(COLOR_WINDOWFRAME);
+
+ clrHilite = ::GetSysColor(COLOR_HIGHLIGHT);
+ clrTextHilite = ::GetSysColor(COLOR_HIGHLIGHTTEXT);
+
+ clrBarWindow = clrWindow = ::GetSysColor(COLOR_WINDOW);
+ clrWindowText = ::GetSysColor(COLOR_WINDOWTEXT);
+
+ clrCaptionText = ::GetSysColor(COLOR_CAPTIONTEXT);
+ clrMenuText = ::GetSysColor(COLOR_MENUTEXT);
+
+ clrActiveCaption = ::GetSysColor(COLOR_ACTIVECAPTION);
+ clrInactiveCaption = ::GetSysColor(COLOR_INACTIVECAPTION);
+
+ clrActiveCaptionGradient = ::GetSysColor(COLOR_GRADIENTACTIVECAPTION);
+ clrInactiveCaptionGradient = ::GetSysColor(COLOR_GRADIENTINACTIVECAPTION);
+
+ clrActiveBorder = ::GetSysColor(COLOR_ACTIVEBORDER);
+ clrInactiveBorder = ::GetSysColor(COLOR_INACTIVEBORDER);
+
+ clrInactiveCaptionText = ::GetSysColor(COLOR_INACTIVECAPTIONTEXT);
+
+ if (m_bIsBlackHighContrast)
+ {
+ clrHotLinkNormalText = clrWindowText;
+ clrHotLinkHoveredText = clrWindowText;
+ clrHotLinkVisitedText = clrWindowText;
+ }
+ else
+ {
+ clrHotLinkNormalText = ::GetSysColor(COLOR_HOTLIGHT);
+ clrHotLinkHoveredText = RGB(0, 0, 255); // Bright blue
+ clrHotLinkVisitedText = RGB(128, 0, 128); // Violet
+ }
+
+ hbrBtnShadow = ::GetSysColorBrush(COLOR_BTNSHADOW);
+ ENSURE(hbrBtnShadow != NULL);
+
+ hbrBtnHilite = ::GetSysColorBrush(COLOR_BTNHIGHLIGHT);
+ ENSURE(hbrBtnHilite != NULL);
+
+ hbrWindow = ::GetSysColorBrush(COLOR_WINDOW);
+ ENSURE(hbrWindow != NULL);
+
+ brBtnFace.DeleteObject();
+ brBtnFace.CreateSolidBrush(clrBtnFace);
+
+ brBarFace.DeleteObject();
+ brBarFace.CreateSolidBrush(clrBarFace);
+
+ brActiveCaption.DeleteObject();
+ brActiveCaption.CreateSolidBrush(clrActiveCaption);
+
+ brInactiveCaption.DeleteObject();
+ brInactiveCaption.CreateSolidBrush(clrInactiveCaption);
+
+ brHilite.DeleteObject();
+ brHilite.CreateSolidBrush(clrHilite);
+
+ brBlack.DeleteObject();
+ brBlack.CreateSolidBrush(clrBtnDkShadow);
+
+ brWindow.DeleteObject();
+ brWindow.CreateSolidBrush(clrWindow);
+
+ penHilite.DeleteObject();
+ penHilite.CreatePen(PS_SOLID, 1, afxGlobalData.clrHilite);
+
+ penBarFace.DeleteObject();
+ penBarFace.CreatePen(PS_SOLID, 1, afxGlobalData.clrBarFace);
+
+ penBarShadow.DeleteObject();
+ penBarShadow.CreatePen(PS_SOLID, 1, afxGlobalData.clrBarShadow);
+
+ if (brLight.GetSafeHandle())
+ {
+ brLight.DeleteObject();
+ }
+
+ if (m_nBitsPerPixel > 8)
+ {
+ COLORREF clrLight = RGB(GetRValue(clrBtnFace) +((GetRValue(clrBtnHilite) - GetRValue(clrBtnFace)) / 2 ),
+ GetGValue(clrBtnFace) +((GetGValue(clrBtnHilite) - GetGValue(clrBtnFace)) / 2),
+ GetBValue(clrBtnFace) +((GetBValue(clrBtnHilite) - GetBValue(clrBtnFace)) / 2));
+
+ brLight.CreateSolidBrush(clrLight);
+ }
+ else
+ {
+ HBITMAP hbmGray = CreateDitherBitmap(dc.GetSafeHdc());
+ ENSURE(hbmGray != NULL);
+
+ CBitmap bmp;
+ bmp.Attach(hbmGray);
+
+ brLight.CreatePatternBrush(&bmp);
+ }
+
+// CMenuImages::CleanUp();
+// CDockingManager::m_bSDParamsModified = TRUE;
+}
+
+BOOL AFX_GLOBAL_DATA::SetMenuFont(LPLOGFONT lpLogFont, BOOL bHorz)
+{
+ ENSURE(lpLogFont != NULL);
+
+ if (bHorz)
+ {
+ // Create regular font:
+ fontRegular.DeleteObject();
+ if (!fontRegular.CreateFontIndirect(lpLogFont))
+ {
+ ASSERT(FALSE);
+ return FALSE;
+ }
+
+ // Create underline font:
+ lpLogFont->lfUnderline = TRUE;
+ fontUnderline.DeleteObject();
+ fontUnderline.CreateFontIndirect(lpLogFont);
+ lpLogFont->lfUnderline = FALSE;
+
+ // Create bold font(used in the default menu items):
+ long lSavedWeight = lpLogFont->lfWeight;
+ lpLogFont->lfWeight = 700;
+
+ fontBold.DeleteObject();
+ BOOL bResult = fontBold.CreateFontIndirect(lpLogFont);
+
+ lpLogFont->lfWeight = lSavedWeight; // Restore weight
+
+ if (!bResult)
+ {
+ ASSERT(FALSE);
+ return FALSE;
+ }
+ }
+ else // Vertical font
+ {
+ fontVert.DeleteObject();
+ if (!fontVert.CreateFontIndirect(lpLogFont))
+ {
+ ASSERT(FALSE);
+ return FALSE;
+ }
+ }
+
+ UpdateTextMetrics();
+ return TRUE;
+}
+
+void AFX_GLOBAL_DATA::UpdateTextMetrics()
+{
+ CWindowDC dc(NULL);
+
+ CFont* pOldFont = dc.SelectObject(&fontRegular);
+ ENSURE(pOldFont != NULL);
+
+ TEXTMETRIC tm;
+ dc.GetTextMetrics(&tm);
+
+ int nExtra = tm.tmHeight < 15 ? 2 : 5;
+
+ m_nTextHeightHorz = tm.tmHeight + nExtra;
+ m_nTextWidthHorz = tm.tmMaxCharWidth + nExtra;
+
+ dc.SelectObject(&fontVert);
+ dc.GetTextMetrics(&tm);
+
+ nExtra = tm.tmHeight < 15 ? 2 : 5;
+
+ m_nTextHeightVert = tm.tmHeight + nExtra;
+ m_nTextWidthVert = tm.tmMaxCharWidth + nExtra;
+
+ dc.SelectObject(pOldFont);
+}
+
+HBITMAP AFX_GLOBAL_DATA::CreateDitherBitmap(HDC hDC)
+{
+ struct // BITMAPINFO with 16 colors
+ {
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[16];
+ }
+ bmi;
+ memset(&bmi, 0, sizeof(bmi));
+
+ bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmi.bmiHeader.biWidth = 8;
+ bmi.bmiHeader.biHeight = 8;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biBitCount = 1;
+ bmi.bmiHeader.biCompression = BI_RGB;
+
+ COLORREF clr = afxGlobalData.clrBtnFace;
+
+ bmi.bmiColors[0].rgbBlue = GetBValue(clr);
+ bmi.bmiColors[0].rgbGreen = GetGValue(clr);
+ bmi.bmiColors[0].rgbRed = GetRValue(clr);
+
+ clr = ::GetSysColor(COLOR_BTNHIGHLIGHT);
+ bmi.bmiColors[1].rgbBlue = GetBValue(clr);
+ bmi.bmiColors[1].rgbGreen = GetGValue(clr);
+ bmi.bmiColors[1].rgbRed = GetRValue(clr);
+
+ // initialize the brushes
+ long patGray[8];
+ for (int i = 0; i < 8; i++)
+ patGray[i] = (i & 1) ? 0xAAAA5555L : 0x5555AAAAL;
+
+ HBITMAP hbm = CreateDIBitmap(hDC, &bmi.bmiHeader, CBM_INIT, (LPBYTE)patGray, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS);
+ return hbm;
+}
+
+#if (WINVER >= 0x0601)
+ITaskbarList* AFX_GLOBAL_DATA::GetITaskbarList()
+{
+ HRESULT hr = S_OK;
+
+ if (!bIsWindows7 || !m_bTaskBarInterfacesAvailable)
+ {
+ return NULL;
+ }
+
+ if (m_pTaskbarList != NULL)
+ {
+ return m_pTaskbarList;
+ }
+
+ if (!m_bComInitialized)
+ {
+ hr = CoInitialize(NULL);
+ if (SUCCEEDED(hr))
+ {
+ m_bComInitialized = TRUE;
+ }
+ }
+
+ if (SUCCEEDED(hr))
+ {
+ hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_pTaskbarList));
+ }
+
+ ASSERT(SUCCEEDED(hr));
+ return m_pTaskbarList;
+}
+
+ITaskbarList3* AFX_GLOBAL_DATA::GetITaskbarList3()
+{
+ HRESULT hr = S_OK;
+
+ if (!bIsWindows7 || !m_bTaskBarInterfacesAvailable)
+ {
+ return NULL;
+ }
+
+ if (m_pTaskbarList3 != NULL)
+ {
+ return m_pTaskbarList3;
+ }
+
+ if (!m_bComInitialized)
+ {
+ hr = CoInitialize(NULL);
+ if (SUCCEEDED(hr))
+ {
+ m_bComInitialized = TRUE;
+ }
+ }
+
+ if (SUCCEEDED(hr))
+ {
+ hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_pTaskbarList3));
+ }
+
+ ASSERT(SUCCEEDED(hr));
+ return m_pTaskbarList3;
+}
+
+void AFX_GLOBAL_DATA::ReleaseTaskBarRefs()
+{
+ m_bTaskBarInterfacesAvailable = FALSE;
+
+ if (m_pTaskbarList != NULL)
+ {
+ RELEASE(m_pTaskbarList);
+ m_pTaskbarList = NULL;
+ }
+
+ if (m_pTaskbarList3 != NULL)
+ {
+ RELEASE(m_pTaskbarList3);
+ m_pTaskbarList3 = NULL;
+ }
+
+#if (_MSC_FULL_VER < 160040219)
+ if (m_bComInitialized)
+ {
+ CoUninitialize();
+ m_bComInitialized = FALSE;
+ }
+#endif
+}
+#endif
+
+void AFX_GLOBAL_DATA::CleanUp()
+{
+ if (brLight.GetSafeHandle())
+ {
+ brLight.DeleteObject();
+ }
+
+ // cleanup fonts:
+ fontRegular.DeleteObject();
+ fontBold.DeleteObject();
+ fontUnderline.DeleteObject();
+ fontVert.DeleteObject();
+ fontVertCaption.DeleteObject();
+ fontTooltip.DeleteObject();
+
+ ReleaseTaskBarRefs();
+#if (_MSC_FULL_VER >= 160040219)
+ ReleaseD2DRefs();
+#endif
+
+ if (m_bBufferedPaintInited && m_pfBufferedPaintUnInit != NULL)
+ {
+ m_pfBufferedPaintUnInit();
+ m_bBufferedPaintInited = FALSE;
+ }
+
+ if (m_hinstUXThemeDLL != NULL)
+ {
+ ::FreeLibrary(m_hinstUXThemeDLL);
+ m_hinstUXThemeDLL = NULL;
+ }
+
+ if (m_hinstDwmapiDLL != NULL)
+ {
+ ::FreeLibrary(m_hinstDwmapiDLL);
+ m_hinstDwmapiDLL = NULL;
+ }
+
+ m_bEnableAccessibility = FALSE;
+
+#if (_MSC_FULL_VER >= 160040219)
+ if (m_bComInitialized)
+ {
+ CoUninitialize();
+ m_bComInitialized = FALSE;
+ }
+#endif
+}
+
+void ControlBarCleanUp()
+{
+ afxGlobalData.CleanUp();
+
+// afxMenuHash.CleanUp();
+
+// CMFCToolBar::CleanUpImages();
+// CMenuImages::CleanUp();
+
+// if (GetCmdMgr() != NULL)
+// {
+// GetCmdMgr()->CleanUp();
+// }
+
+// CKeyboardManager::CleanUp();
+
+ // Destroy visualization manager:
+// CMFCVisualManager::DestroyInstance(TRUE /* bAutoDestroyOnly */);
+// CMFCVisualManagerOffice2007::CleanStyle();
+}
+
+#if (_MSC_FULL_VER >= 160040219)
+#ifdef _AFXDLL
+void AfxGlobalsAddRef()
+{
+ g_dwAfxGlobalDataRef++;
+}
+
+void AfxGlobalsRelease()
+{
+ g_dwAfxGlobalDataRef--;
+ if (g_dwAfxGlobalDataRef == 0)
+ {
+ ControlBarCleanUp();
+ }
+}
+#endif
+#endif
+
+BOOL AFX_GLOBAL_DATA::DrawParentBackground(CWnd* pWnd, CDC* pDC, LPRECT rectClip)
+{
+ ASSERT_VALID(pDC);
+ ASSERT_VALID(pWnd);
+
+ BOOL bRes = FALSE;
+
+ CRgn rgn;
+ if (rectClip != NULL)
+ {
+ rgn.CreateRectRgnIndirect(rectClip);
+ pDC->SelectClipRgn(&rgn);
+ }
+
+ CWnd* pParent = pWnd->GetParent();
+ ASSERT_VALID(pParent);
+
+ // In Windows XP, we need to call DrawThemeParentBackground function to implement
+ // transparent controls
+ if (m_pfDrawThemeBackground != NULL)
+ {
+ bRes = (*m_pfDrawThemeBackground)(pWnd->GetSafeHwnd(), pDC->GetSafeHdc(), rectClip) == S_OK;
+ }
+
+ if (!bRes)
+ {
+ CPoint pt(0, 0);
+ pWnd->MapWindowPoints(pParent, &pt, 1);
+ pt = pDC->OffsetWindowOrg(pt.x, pt.y);
+
+ bRes = (BOOL) pParent->SendMessage(WM_ERASEBKGND, (WPARAM)pDC->m_hDC);
+
+ pDC->SetWindowOrg(pt.x, pt.y);
+ }
+
+ pDC->SelectClipRgn(NULL);
+
+ return bRes;
+}
+
+CFrameWnd* AFXGetParentFrame(const CWnd* pWnd)
+{
+ if (pWnd->GetSafeHwnd() == NULL)
+ {
+ return NULL;
+ }
+ ASSERT_VALID(pWnd);
+
+ const CWnd* pParentWnd = pWnd;
+
+ while (pParentWnd != NULL)
+ {
+// if (pParentWnd->IsKindOf(RUNTIME_CLASS(CPaneFrameWnd)))
+//// {
+// CPaneFrameWnd* pMiniFrame = DYNAMIC_DOWNCAST(CPaneFrameWnd, pParentWnd);
+// pParentWnd = pMiniFrame->GetParent();
+// }
+// else
+ {
+ pParentWnd = pParentWnd->GetParent();
+ }
+
+ if (pParentWnd == NULL)
+ {
+ return NULL;
+ }
+
+ if (pParentWnd->IsFrameWnd())
+ {
+ return(CFrameWnd*)pParentWnd;
+ }
+ }
+
+ return NULL;
+}
+
+COLORREF AFX_GLOBAL_DATA::GetColor(int nColor)
+{
+ switch(nColor)
+ {
+ case COLOR_BTNFACE: return clrBtnFace;
+ case COLOR_BTNSHADOW: return clrBtnShadow;
+ case COLOR_3DDKSHADOW: return clrBtnDkShadow;
+ case COLOR_3DLIGHT: return clrBtnLight;
+ case COLOR_BTNHIGHLIGHT: return clrBtnHilite;
+ case COLOR_BTNTEXT: return clrBtnText;
+ case COLOR_GRAYTEXT: return clrGrayedText;
+ case COLOR_WINDOWFRAME: return clrWindowFrame;
+
+ case COLOR_HIGHLIGHT: return clrHilite;
+ case COLOR_HIGHLIGHTTEXT: return clrTextHilite;
+
+ case COLOR_WINDOW: return clrWindow;
+ case COLOR_WINDOWTEXT: return clrWindowText;
+
+ case COLOR_CAPTIONTEXT: return clrCaptionText;
+ case COLOR_MENUTEXT: return clrMenuText;
+
+ case COLOR_ACTIVECAPTION: return clrActiveCaption;
+ case COLOR_INACTIVECAPTION: return clrInactiveCaption;
+
+ case COLOR_ACTIVEBORDER: return clrActiveBorder;
+ case COLOR_INACTIVEBORDER: return clrInactiveBorder;
+
+ case COLOR_INACTIVECAPTIONTEXT: return clrInactiveCaptionText;
+ }
+
+ return ::GetSysColor(nColor);
+}
+
+BOOL AFX_GLOBAL_DATA::SetLayeredAttrib(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags)
+{
+ return(::SetLayeredWindowAttributes(hwnd, crKey, bAlpha, dwFlags));
+}
+
+void AFX_GLOBAL_DATA::EnableAccessibilitySupport(BOOL bEnable/* = TRUE*/)
+{
+ m_bEnableAccessibility = bEnable;
+}
+
+CString AFX_GLOBAL_DATA::RegisterWindowClass(LPCTSTR lpszClassNamePrefix)
+{
+ ENSURE(lpszClassNamePrefix != NULL);
+
+ // Register a new window class:
+ HINSTANCE hInst = AfxGetInstanceHandle();
+ UINT uiClassStyle = CS_DBLCLKS;
+ HCURSOR hCursor = ::LoadCursor(NULL, IDC_ARROW);
+ HBRUSH hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
+
+ CString strClassName;
+ strClassName.Format(_T("%s:%x:%x:%x:%x"), lpszClassNamePrefix, (UINT_PTR)hInst, uiClassStyle, (UINT_PTR)hCursor, (UINT_PTR)hbrBackground);
+
+ // See if the class already exists:
+ WNDCLASS wndcls;
+ if (::GetClassInfo(hInst, strClassName, &wndcls))
+ {
+ // Already registered, assert everything is good:
+ ASSERT(wndcls.style == uiClassStyle);
+ }
+ else
+ {
+ // Otherwise we need to register a new class:
+ wndcls.style = uiClassStyle;
+ wndcls.lpfnWndProc = ::DefWindowProc;
+ wndcls.cbClsExtra = wndcls.cbWndExtra = 0;
+ wndcls.hInstance = hInst;
+ wndcls.hIcon = NULL;
+ wndcls.hCursor = hCursor;
+ wndcls.hbrBackground = hbrBackground;
+ wndcls.lpszMenuName = NULL;
+ wndcls.lpszClassName = strClassName;
+
+ if (!AfxRegisterClass(&wndcls))
+ {
+ AfxThrowResourceException();
+ }
+ }
+
+ return strClassName;
+}
+
+BOOL AFX_GLOBAL_DATA::ExcludeTag(CString& strBuffer, LPCTSTR lpszTag, CString& strTag, BOOL bIsCharsList /* = FALSE*/)
+{
+ const int iBufLen = strBuffer.GetLength();
+
+ CString strTagStart = _T("<");
+ strTagStart += lpszTag;
+ strTagStart += _T(">");
+
+ const int iTagStartLen = strTagStart.GetLength();
+
+ int iStart = -1;
+
+ int iIndexStart = strBuffer.Find(strTagStart);
+ if (iIndexStart < 0)
+ {
+ return FALSE;
+ }
+
+ iStart = iIndexStart + iTagStartLen;
+
+ CString strTagEnd = _T("</");
+ strTagEnd += lpszTag;
+ strTagEnd += _T('>');
+
+ const int iTagEndLen = strTagEnd.GetLength();
+
+ int iIndexEnd = -1;
+ int nBalanse = 1;
+ for (int i = iStart; i < iBufLen - iTagEndLen + 1; i ++)
+ {
+ if (strBuffer [i] != '<')
+ {
+ continue;
+ }
+
+ if (i < iBufLen - iTagStartLen && _tcsncmp(strBuffer.Mid(i), strTagStart, iTagStartLen) == 0)
+ {
+ i += iTagStartLen - 1;
+ nBalanse ++;
+ continue;
+ }
+
+ if (_tcsncmp(strBuffer.Mid(i), strTagEnd, iTagEndLen) == 0)
+ {
+ nBalanse --;
+ if (nBalanse == 0)
+ {
+ iIndexEnd = i;
+ break;
+ }
+
+ i += iTagEndLen - 1;
+ }
+ }
+
+ if (iIndexEnd == -1 || iStart > iIndexEnd)
+ {
+ return FALSE;
+ }
+
+ strTag = strBuffer.Mid(iStart, iIndexEnd - iStart);
+ strTag.TrimLeft();
+ strTag.TrimRight();
+
+ strBuffer.Delete(iIndexStart, iIndexEnd + iTagEndLen - iIndexStart);
+
+ if (bIsCharsList)
+ {
+ if (strTag.GetLength() > 1 && strTag [0] == _T('\"'))
+ {
+ strTag = strTag.Mid(1, strTag.GetLength() - 2);
+ }
+
+ strTag.Replace(_T("\\t"), _T("\t"));
+ strTag.Replace(_T("\\n"), _T("\n"));
+ strTag.Replace(_T("\\r"), _T("\r"));
+ strTag.Replace(_T("\\b"), _T("\b"));
+ strTag.Replace(_T("LT"), _T("<"));
+ strTag.Replace(_T("GT"), _T(">"));
+ strTag.Replace(_T("AMP"), _T("&"));
+ }
+
+ return TRUE;
+}
+
+BOOL AFX_GLOBAL_DATA::DwmExtendFrameIntoClientArea(HWND hWnd, AFX_MARGINS* pMargins)
+{
+ if (m_pfDwmExtendFrameIntoClientArea == NULL)
+ {
+ return FALSE;
+ }
+
+ HRESULT hres = (*m_pfDwmExtendFrameIntoClientArea)(hWnd, pMargins);
+ return hres == S_OK;
+}
+
+LRESULT AFX_GLOBAL_DATA::DwmDefWindowProc(HWND hWnd, UINT message, WPARAM wp, LPARAM lp)
+{
+ if (m_pfDwmDefWindowProc == NULL)
+ {
+ return(LRESULT)-1;
+ }
+
+ LRESULT lres = 0;
+ (*m_pfDwmDefWindowProc)(hWnd, message, wp, lp, &lres);
+
+ return lres;
+}
+
+BOOL AFX_GLOBAL_DATA::DwmIsCompositionEnabled()
+{
+ if (m_pfDwmIsCompositionEnabled == NULL || bDisableAero)
+ {
+ return FALSE;
+ }
+
+ BOOL bEnabled = FALSE;
+
+ (*m_pfDwmIsCompositionEnabled)(&bEnabled);
+ return bEnabled;
+}
+
+BOOL AFX_GLOBAL_DATA::DrawTextOnGlass(HTHEME hTheme, CDC* pDC, int iPartId, int iStateId, CString strText, CRect rect, DWORD dwFlags, int nGlowSize, COLORREF clrText)
+{
+ //---- bits used in dwFlags of DTTOPTS ----
+#define AFX_DTT_TEXTCOLOR (1UL << 0) // crText has been specified
+#define AFX_DTT_BORDERCOLOR (1UL << 1) // crBorder has been specified
+#define AFX_DTT_SHADOWCOLOR (1UL << 2) // crShadow has been specified
+#define AFX_DTT_SHADOWTYPE (1UL << 3) // iTextShadowType has been specified
+#define AFX_DTT_SHADOWOFFSET (1UL << 4) // ptShadowOffset has been specified
+#define AFX_DTT_BORDERSIZE (1UL << 5) // nBorderSize has been specified
+#define AFX_DTT_FONTPROP (1UL << 6) // iFontPropId has been specified
+#define AFX_DTT_COLORPROP (1UL << 7) // iColorPropId has been specified
+#define AFX_DTT_STATEID (1UL << 8) // IStateId has been specified
+#define AFX_DTT_CALCRECT (1UL << 9) // Use pRect as and in/out parameter
+#define AFX_DTT_APPLYOVERLAY (1UL << 10) // fApplyOverlay has been specified
+#define AFX_DTT_GLOWSIZE (1UL << 11) // iGlowSize has been specified
+#define AFX_DTT_CALLBACK (1UL << 12) // pfnDrawTextCallback has been specified
+#define AFX_DTT_COMPOSITED (1UL << 13) // Draws text with antialiased alpha(needs a DIB section)
+
+ if (hTheme == NULL || m_pfDrawThemeTextEx == NULL || !DwmIsCompositionEnabled())
+ {
+ pDC->DrawText(strText, rect, dwFlags);
+ return FALSE;
+ }
+
+ CComBSTR bstmp = (LPCTSTR)strText;
+
+ wchar_t* wbuf = new wchar_t[bstmp.Length() + 1];
+ wcscpy_s(wbuf, bstmp.Length() + 1, bstmp);
+
+ AFX_DTTOPTS dto;
+ memset(&dto, 0, sizeof(AFX_DTTOPTS));
+ dto.dwSize = sizeof(AFX_DTTOPTS);
+ dto.dwFlags = AFX_DTT_COMPOSITED;
+
+ if (nGlowSize > 0)
+ {
+ dto.dwFlags |= AFX_DTT_GLOWSIZE;
+ dto.iGlowSize = nGlowSize;
+ }
+
+ if (clrText != (COLORREF)-1)
+ {
+ dto.dwFlags |= AFX_DTT_TEXTCOLOR;
+ dto.crText = clrText;
+ }
+
+ (*m_pfDrawThemeTextEx)(hTheme, pDC->GetSafeHdc(), iPartId, iStateId, wbuf, -1, dwFlags, rect, &dto);
+
+ delete [] wbuf;
+
+ return TRUE;
+}
+
+HCURSOR AFX_GLOBAL_DATA::GetHandCursor()
+{
+ if (m_hcurHand == NULL)
+ {
+ m_hcurHand = ::LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_HAND));
+ }
+
+ return m_hcurHand;
+}
+
+BOOL AFX_GLOBAL_DATA::Resume()
+{
+ m_hinstUXThemeDLL = ::AfxCtxLoadLibraryW(L"UxTheme.dll");
+
+ if (m_hinstUXThemeDLL != NULL)
+ {
+ m_pfDrawThemeBackground = (DRAWTHEMEPARENTBACKGROUND)::GetProcAddress (m_hinstUXThemeDLL, "DrawThemeParentBackground");
+ m_pfDrawThemeTextEx = (DRAWTHEMETEXTEX)::GetProcAddress (m_hinstUXThemeDLL, "DrawThemeTextEx");
+ m_pfBeginBufferedPaint = (BEGINBUFFEREDPAINT)::GetProcAddress (m_hinstUXThemeDLL, "BeginBufferedPaint");
+ m_pfEndBufferedPaint = (ENDBUFFEREDPAINT)::GetProcAddress (m_hinstUXThemeDLL, "EndBufferedPaint");
+ }
+ else
+ {
+ m_pfDrawThemeBackground = NULL;
+ m_pfDrawThemeTextEx = NULL;
+ m_pfBeginBufferedPaint = NULL;
+ m_pfEndBufferedPaint = NULL;
+ }
+
+ if (m_hinstDwmapiDLL != NULL)
+ {
+#if (_MSC_FULL_VER >= 160040219)
+ m_hinstDwmapiDLL = AfxLoadSystemLibraryUsingFullPath(L"dwmapi.dll");
+#else
+ m_hinstDwmapiDLL = ::AfxCtxLoadLibraryW(L"dwmapi.dll");
+#endif
+ ENSURE(m_hinstDwmapiDLL != NULL);
+
+ m_pfDwmExtendFrameIntoClientArea = (DWMEXTENDFRAMEINTOCLIENTAREA)::GetProcAddress (m_hinstDwmapiDLL, "DwmExtendFrameIntoClientArea");
+ m_pfDwmDefWindowProc = (DWMDEFWINDOWPROC) ::GetProcAddress (m_hinstDwmapiDLL, "DwmDefWindowProc");
+ m_pfDwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED)::GetProcAddress (m_hinstDwmapiDLL, "DwmIsCompositionEnabled");
+ }
+
+ if (m_bEnableAccessibility)
+ {
+ EnableAccessibilitySupport();
+ }
+
+// CMFCVisualManagerOffice2007::CleanStyle ();
+
+// if (CMFCVisualManager::m_pRTIDefault != NULL)
+// {
+// CMFCVisualManager::SetDefaultManager (CMFCVisualManager::m_pRTIDefault);
+// }
+
+ return TRUE;
+}
+
+BOOL AFX_GLOBAL_DATA::GetNonClientMetrics (NONCLIENTMETRICS& info)
+{
+ struct AFX_OLDNONCLIENTMETRICS
+ {
+ UINT cbSize;
+ int iBorderWidth;
+ int iScrollWidth;
+ int iScrollHeight;
+ int iCaptionWidth;
+ int iCaptionHeight;
+ LOGFONT lfCaptionFont;
+ int iSmCaptionWidth;
+ int iSmCaptionHeight;
+ LOGFONT lfSmCaptionFont;
+ int iMenuWidth;
+ int iMenuHeight;
+ LOGFONT lfMenuFont;
+ LOGFONT lfStatusFont;
+ LOGFONT lfMessageFont;
+ };
+
+#if (_MSC_FULL_VER >= 160040219)
+ if (_AfxGetComCtlVersion() < MAKELONG(1, 6))
+ {
+ info.cbSize = sizeof(AFX_OLDNONCLIENTMETRICS);
+ }
+
+ return ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, info.cbSize, &info, 0);
+#else
+ const UINT cbProperSize = (_AfxGetComCtlVersion() < MAKELONG(1, 6))
+ ? sizeof(AFX_OLDNONCLIENTMETRICS) : sizeof(NONCLIENTMETRICS);
+
+ info.cbSize = cbProperSize;
+
+ return ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, cbProperSize, &info, 0);
+#endif
+}
+
+
+BOOL AFXAPI AfxIsExtendedFrameClass(CWnd* pWnd)
+{
+ ENSURE( pWnd );
+#if 0
+ if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWndEx)))
+ {
+ return TRUE;
+ }
+ if (pWnd->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
+ {
+ return TRUE;
+ }
+ if (pWnd->IsKindOf(RUNTIME_CLASS(COleIPFrameWndEx)))
+ {
+ return TRUE;
+ }
+ if (pWnd->IsKindOf(RUNTIME_CLASS(COleDocIPFrameWndEx)))
+ {
+ return TRUE;
+ }
+ if (pWnd->IsKindOf(RUNTIME_CLASS(CMDIChildWndEx)))
+ {
+ return TRUE;
+ }
+#endif
+ return FALSE;
+}
+
+
+BOOL AFXAPI AfxIsMFCToolBar(CWnd* pWnd)
+{
+ ENSURE( pWnd );
+// if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCToolBar)))
+// {
+// return TRUE;
+// }
+ return FALSE;
+}
+
+HRESULT AFX_GLOBAL_DATA::ShellCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv)
+{
+ static HMODULE hShellDll = AfxCtxLoadLibrary(_T("Shell32.dll"));
+ ENSURE(hShellDll != NULL);
+
+ typedef HRESULT (__stdcall *PFNSHCREATEITEMFROMPARSINGNAME)(
+ PCWSTR,
+ IBindCtx*,
+ REFIID,
+ void**
+ );
+
+ PFNSHCREATEITEMFROMPARSINGNAME pSHCreateItemFromParsingName =
+ (PFNSHCREATEITEMFROMPARSINGNAME)GetProcAddress(hShellDll, "SHCreateItemFromParsingName");
+ if (pSHCreateItemFromParsingName == NULL)
+ {
+ return E_FAIL;
+ }
+
+ return (*pSHCreateItemFromParsingName)(pszPath, pbc, riid, ppv);
+}
+
+#if (_MSC_FULL_VER >= 160040219)
+BOOL AFX_GLOBAL_DATA::InitD2D(D2D1_FACTORY_TYPE d2dFactoryType, DWRITE_FACTORY_TYPE writeFactoryType)
+{
+ if (m_bD2DInitialized)
+ {
+ return TRUE;
+ }
+
+ HRESULT hr = S_OK;
+
+ if (!m_bComInitialized)
+ {
+ hr = CoInitialize(NULL);
+ if (FAILED(hr))
+ {
+ return FALSE;
+ }
+ }
+
+ m_bComInitialized = TRUE;
+
+ if ((m_hinstD2DDLL = AfxLoadSystemLibraryUsingFullPath(L"D2D1.dll")) == NULL)
+ {
+ return FALSE;
+ }
+
+ typedef HRESULT (WINAPI * D2D1CREATEFACTORY)(D2D1_FACTORY_TYPE factoryType, REFIID riid, CONST D2D1_FACTORY_OPTIONS *pFactoryOptions, void **ppIFactory);
+ typedef HRESULT (WINAPI * DWRITECREATEFACTORY)(DWRITE_FACTORY_TYPE factoryType, REFIID riid, IUnknown **factory);
+
+ D2D1CREATEFACTORY pfD2D1CreateFactory = (D2D1CREATEFACTORY)::GetProcAddress(m_hinstD2DDLL, "D2D1CreateFactory");
+ if (pfD2D1CreateFactory != NULL)
+ {
+ hr = (*pfD2D1CreateFactory)(d2dFactoryType, __uuidof(ID2D1Factory),
+ NULL, reinterpret_cast<void **>(&m_pDirect2dFactory));
+ if (FAILED(hr))
+ {
+ m_pDirect2dFactory = NULL;
+ return FALSE;
+ }
+ }
+
+ m_pfD2D1MakeRotateMatrix = (D2D1MAKEROTATEMATRIX)::GetProcAddress(m_hinstD2DDLL, "D2D1MakeRotateMatrix");
+
+ m_hinstDWriteDLL = AfxLoadSystemLibraryUsingFullPath(L"DWrite.dll");
+ if (m_hinstDWriteDLL != NULL)
+ {
+ DWRITECREATEFACTORY pfD2D1CreateFactory = (DWRITECREATEFACTORY)::GetProcAddress(m_hinstDWriteDLL, "DWriteCreateFactory");
+ if (pfD2D1CreateFactory != NULL)
+ {
+ hr = (*pfD2D1CreateFactory)(writeFactoryType, __uuidof(IDWriteFactory), (IUnknown**)&m_pWriteFactory);
+ }
+ }
+
+ hr = CoCreateInstance(CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IWICImagingFactory, (LPVOID*)&m_pWicFactory);
+
+ m_bD2DInitialized = TRUE;
+ return TRUE;
+}
+
+void AFX_GLOBAL_DATA::ReleaseD2DRefs()
+{
+ if (!m_bD2DInitialized)
+ {
+ return;
+ }
+
+ if (m_pDirect2dFactory != NULL)
+ {
+ m_pDirect2dFactory->Release();
+ m_pDirect2dFactory = NULL;
+ }
+
+ if (m_pWriteFactory != NULL)
+ {
+ m_pWriteFactory->Release();
+ m_pWriteFactory = NULL;
+ }
+
+ if (m_pWicFactory != NULL)
+ {
+ m_pWicFactory->Release();
+ m_pWicFactory = NULL;
+ }
+
+ if (m_hinstD2DDLL != NULL)
+ {
+ ::FreeLibrary(m_hinstD2DDLL);
+ }
+
+ if (m_hinstDWriteDLL != NULL)
+ {
+ ::FreeLibrary(m_hinstDWriteDLL);
+ }
+
+ m_bD2DInitialized = FALSE;
+}
+#endif
diff --git a/src/thirdparty/mfc/stdafx.h b/src/thirdparty/mfc/stdafx.h
new file mode 100644
index 000000000..0dd09fdc2
--- /dev/null
+++ b/src/thirdparty/mfc/stdafx.h
@@ -0,0 +1,8 @@
+#pragma once
+
+//#if (_MSC_VER == 1600) && (_MSC_FULL_VER != 160040219)
+//#error You need Visual Studio 2010 SP1 (version 10.0.40219) to compile!
+//#endif
+
+#include "../../../include/stdafx_common.h"
+#include "../../../include/stdafx_common_afx.h"
diff --git a/src/thirdparty/mfc/winmdi.cpp b/src/thirdparty/mfc/winmdi.cpp
new file mode 100644
index 000000000..11f23e419
--- /dev/null
+++ b/src/thirdparty/mfc/winmdi.cpp
@@ -0,0 +1,1173 @@
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and related
+// electronic documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+
+#include "stdafx.h"
+//#include "afxmdichildwndex.h"
+//#include "afxmdiframewndex.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+// CMDIFrameWnd
+
+BEGIN_MESSAGE_MAP(CMDIFrameWnd, CFrameWnd)
+ //{{AFX_MSG_MAP(CMDIFrameWnd)
+ ON_MESSAGE_VOID(WM_IDLEUPDATECMDUI, CMDIFrameWnd::OnIdleUpdateCmdUI)
+ ON_UPDATE_COMMAND_UI(ID_WINDOW_ARRANGE, &CMDIFrameWnd::OnUpdateMDIWindowCmd)
+ ON_UPDATE_COMMAND_UI(ID_WINDOW_CASCADE, &CMDIFrameWnd::OnUpdateMDIWindowCmd)
+ ON_UPDATE_COMMAND_UI(ID_WINDOW_TILE_HORZ, &CMDIFrameWnd::OnUpdateMDIWindowCmd)
+ ON_UPDATE_COMMAND_UI(ID_WINDOW_TILE_VERT, &CMDIFrameWnd::OnUpdateMDIWindowCmd)
+ ON_WM_SIZE()
+ ON_COMMAND_EX(ID_WINDOW_ARRANGE, &CMDIFrameWnd::OnMDIWindowCmd)
+ ON_COMMAND_EX(ID_WINDOW_CASCADE, &CMDIFrameWnd::OnMDIWindowCmd)
+ ON_COMMAND_EX(ID_WINDOW_TILE_HORZ, &CMDIFrameWnd::OnMDIWindowCmd)
+ ON_COMMAND_EX(ID_WINDOW_TILE_VERT, &CMDIFrameWnd::OnMDIWindowCmd)
+ ON_UPDATE_COMMAND_UI(ID_WINDOW_NEW, &CMDIFrameWnd::OnUpdateMDIWindowCmd)
+ ON_COMMAND(ID_WINDOW_NEW, &CMDIFrameWnd::OnWindowNew)
+ ON_WM_DESTROY()
+ ON_MESSAGE(WM_COMMANDHELP, &CMDIFrameWnd::OnCommandHelp)
+ ON_WM_MENUCHAR()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+CMDIFrameWnd::CMDIFrameWnd()
+{
+ m_hWndMDIClient = NULL;
+}
+
+BOOL CMDIFrameWnd::OnCommand(WPARAM wParam, LPARAM lParam)
+{
+ // send to MDI child first - will be re-sent through OnCmdMsg later
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+ if (pActiveChild != NULL && AfxCallWndProc(pActiveChild,
+ pActiveChild->m_hWnd, WM_COMMAND, wParam, lParam) != 0)
+ return TRUE; // handled by child
+
+ if (CFrameWnd::OnCommand(wParam, lParam))
+ return TRUE; // handled through normal mechanism (MDI child or frame)
+
+ HWND hWndCtrl = (HWND)lParam;
+
+ ASSERT(AFX_IDM_FIRST_MDICHILD == 0xFF00);
+ if (hWndCtrl == NULL && (LOWORD(wParam) & 0xf000) == 0xf000)
+ {
+ // menu or accelerator within range of MDI children
+ // default frame proc will handle it
+ DefWindowProc(WM_COMMAND, wParam, lParam);
+ return TRUE;
+ }
+
+ return FALSE; // not handled
+}
+
+BOOL CMDIFrameWnd::OnCmdMsg(UINT nID, int nCode, void* pExtra,
+ AFX_CMDHANDLERINFO* pHandlerInfo)
+{
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+ // pump through active child FIRST
+ if (pActiveChild != NULL)
+ {
+ CPushRoutingFrame push(this);
+ if (pActiveChild->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
+ return TRUE;
+ }
+
+ // then pump through normal frame
+ return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
+}
+
+LRESULT CMDIFrameWnd::OnCommandHelp(WPARAM wParam, LPARAM lParam)
+{
+ if (lParam == 0 && IsTracking())
+ lParam = HID_BASE_COMMAND+m_nIDTracking;
+
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+ if (pActiveChild != NULL && AfxCallWndProc(pActiveChild,
+ pActiveChild->m_hWnd, WM_COMMANDHELP, wParam, lParam) != 0)
+ {
+ // handled by child
+ return TRUE;
+ }
+
+ if (CFrameWnd::OnCommandHelp(wParam, lParam))
+ {
+ // handled by our base
+ return TRUE;
+ }
+
+ if (lParam != 0)
+ {
+ CWinApp* pApp = AfxGetApp();
+ if (pApp != NULL)
+ {
+ AfxGetApp()->WinHelpInternal(lParam);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+BOOL CMDIFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext*)
+{
+ CMenu* pMenu = NULL;
+ if (m_hMenuDefault == NULL)
+ {
+ // default implementation for MFC V1 backward compatibility
+ pMenu = GetMenu();
+ ASSERT(pMenu != NULL);
+ // This is attempting to guess which sub-menu is the Window menu.
+ // The Windows user interface guidelines say that the right-most
+ // menu on the menu bar should be Help and Window should be one
+ // to the left of that.
+ int iMenu = pMenu->GetMenuItemCount() - 2;
+
+ // If this assertion fails, your menu bar does not follow the guidelines
+ // so you will have to override this function and call CreateClient
+ // appropriately or use the MFC V2 MDI functionality.
+ ASSERT(iMenu >= 0);
+ pMenu = pMenu->GetSubMenu(iMenu);
+ ASSERT(pMenu != NULL);
+ }
+
+ return CreateClient(lpcs, pMenu);
+}
+
+BOOL CMDIFrameWnd::CreateClient(LPCREATESTRUCT lpCreateStruct,
+ CMenu* pWindowMenu)
+{
+ ASSERT(m_hWnd != NULL);
+ ASSERT(m_hWndMDIClient == NULL);
+ DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_BORDER |
+ WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
+ MDIS_ALLCHILDSTYLES; // allow children to be created invisible
+ DWORD dwExStyle = 0;
+ // will be inset by the frame
+
+ // special styles for 3d effect on Win4
+ dwStyle &= ~WS_BORDER;
+ dwExStyle = WS_EX_CLIENTEDGE;
+
+ CLIENTCREATESTRUCT ccs;
+ ccs.hWindowMenu = pWindowMenu->GetSafeHmenu();
+ // set hWindowMenu for MFC V1 backward compatibility
+ // for MFC V2, window menu will be set in OnMDIActivate
+ ccs.idFirstChild = AFX_IDM_FIRST_MDICHILD;
+
+ if (lpCreateStruct->style & (WS_HSCROLL|WS_VSCROLL))
+ {
+ // parent MDIFrame's scroll styles move to the MDICLIENT
+ dwStyle |= (lpCreateStruct->style & (WS_HSCROLL|WS_VSCROLL));
+
+ // fast way to turn off the scrollbar bits (without a resize)
+ ModifyStyle(WS_HSCROLL|WS_VSCROLL, 0, SWP_NOREDRAW|SWP_FRAMECHANGED);
+ }
+
+ // Create MDICLIENT control with special IDC
+ if ((m_hWndMDIClient = ::AfxCtxCreateWindowEx(dwExStyle, _T("mdiclient"), NULL,
+ dwStyle, 0, 0, 0, 0, m_hWnd, (HMENU)AFX_IDW_PANE_FIRST,
+ AfxGetInstanceHandle(), (LPVOID)&ccs)) == NULL)
+ {
+ TRACE(traceAppMsg, 0, _T("Warning: CMDIFrameWnd::OnCreateClient: failed to create MDICLIENT.")
+ _T(" GetLastError returns 0x%8.8X\n"), ::GetLastError());
+ return FALSE;
+ }
+ // Move it to the top of z-order
+ ::BringWindowToTop(m_hWndMDIClient);
+
+ return TRUE;
+}
+
+LRESULT CMDIFrameWnd::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
+{
+ return ::DefFrameProc(m_hWnd, m_hWndMDIClient, nMsg, wParam, lParam);
+}
+
+BOOL CMDIFrameWnd::PreTranslateMessage(MSG* pMsg)
+{
+ // check for special cancel modes for ComboBoxes
+ if (pMsg->message == WM_LBUTTONDOWN || pMsg->message == WM_NCLBUTTONDOWN)
+ AfxCancelModes(pMsg->hwnd); // filter clicks
+
+ // allow tooltip messages to be filtered
+ if (CWnd::PreTranslateMessage(pMsg))
+ return TRUE;
+
+#ifndef _AFX_NO_OLE_SUPPORT
+ // allow hook to consume message
+ if (m_pNotifyHook != NULL && m_pNotifyHook->OnPreTranslateMessage(pMsg))
+ return TRUE;
+#endif
+
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+
+ // current active child gets first crack at it
+ if (pActiveChild != NULL && pActiveChild->PreTranslateMessage(pMsg))
+ return TRUE;
+
+ if (pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
+ {
+ // translate accelerators for frame and any children
+ if (m_hAccelTable != NULL &&
+ ::TranslateAccelerator(m_hWnd, m_hAccelTable, pMsg))
+ {
+ return TRUE;
+ }
+
+ // special processing for MDI accelerators last
+ // and only if it is not in SDI mode (print preview)
+ if (GetActiveView() == NULL)
+ {
+ if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
+ {
+ // the MDICLIENT window may translate it
+ if (::TranslateMDISysAccel(m_hWndMDIClient, pMsg))
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+void CMDIFrameWnd::DelayUpdateFrameMenu(HMENU hMenuAlt)
+{
+ OnUpdateFrameMenu(hMenuAlt);
+
+ m_nIdleFlags |= idleMenu;
+}
+
+void CMDIFrameWnd::OnIdleUpdateCmdUI()
+{
+ if (m_nIdleFlags & idleMenu)
+ {
+ DrawMenuBar();
+ m_nIdleFlags &= ~idleMenu;
+ }
+ CFrameWnd::OnIdleUpdateCmdUI();
+}
+
+CFrameWnd* CMDIFrameWnd::GetActiveFrame()
+{
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+ if (pActiveChild == NULL)
+ return this;
+ return pActiveChild;
+}
+
+BOOL CMDIFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
+{
+ if (cs.lpszClass == NULL)
+ {
+ VERIFY(AfxDeferRegisterClass(AFX_WNDMDIFRAME_REG));
+ cs.lpszClass = _afxWndMDIFrame;
+ }
+ return TRUE;
+}
+
+BOOL CMDIFrameWnd::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle,
+ CWnd* pParentWnd, CCreateContext* pContext)
+{
+ if (!CFrameWnd::LoadFrame(nIDResource, dwDefaultStyle,
+ pParentWnd, pContext))
+ return FALSE;
+
+ // save menu to use when no active MDI child window is present
+ ASSERT(m_hWnd != NULL);
+ m_hMenuDefault = ::GetMenu(m_hWnd);
+ return TRUE;
+}
+
+void CMDIFrameWnd::OnDestroy()
+{
+ CFrameWnd::OnDestroy(); // exit and misc cleanup
+
+ // owned menu stored in shared slot for MDIFRAME
+ if (m_hMenuDefault != NULL && ::GetMenu(m_hWnd) != m_hMenuDefault)
+ {
+ // must go through MDI client to get rid of MDI menu additions
+ ::SendMessage(m_hWndMDIClient, WM_MDISETMENU,
+ (WPARAM)m_hMenuDefault, NULL);
+ ASSERT(::GetMenu(m_hWnd) == m_hMenuDefault);
+ }
+}
+
+void CMDIFrameWnd::OnSize(UINT nType, int, int)
+{
+ // do not call default - it will reposition the MDICLIENT
+ if (nType != SIZE_MINIMIZED)
+ RecalcLayout();
+}
+
+LRESULT CMDIFrameWnd::OnMenuChar(UINT nChar, UINT, CMenu*)
+{
+ // do not call Default() for Alt+(-) when in print preview mode
+ if (m_lpfnCloseProc != NULL && nChar == (UINT)'-')
+ return 0;
+ else
+ return Default();
+}
+
+CMDIChildWnd* CMDIFrameWnd::MDIGetActive(BOOL* pbMaximized) const
+{
+ // check first for MDI client window not created
+ if (m_hWndMDIClient == NULL)
+ {
+ if (pbMaximized != NULL)
+ *pbMaximized = FALSE;
+ return NULL;
+ }
+
+ // MDI client has been created, get active MDI child
+ HWND hWnd = (HWND)::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0,
+ (LPARAM)pbMaximized);
+ CMDIChildWnd* pWnd = (CMDIChildWnd*)CWnd::FromHandlePermanent(hWnd);
+ ASSERT(pWnd == NULL || pWnd->IsKindOf(RUNTIME_CLASS(CMDIChildWnd)));
+
+ // check for special pseudo-inactive state
+ if (pWnd != NULL && pWnd->m_bPseudoInactive &&
+ (pWnd->GetStyle() & WS_VISIBLE) == 0)
+ {
+ // Window is hidden, active, but m_bPseudoInactive -- return NULL
+ pWnd = NULL;
+ // Ignore maximized flag if pseudo-inactive and maximized
+ if (pbMaximized != NULL)
+ *pbMaximized = FALSE;
+ }
+ return pWnd;
+}
+
+
+CMDIChildWnd* CMDIFrameWnd::CreateNewChild(CRuntimeClass* pClass,
+ UINT nResources, HMENU hMenu /* = NULL */, HACCEL hAccel /* = NULL */)
+{
+ ASSERT(pClass != NULL);
+ CMDIChildWnd* pFrame = (CMDIChildWnd*) pClass->CreateObject();
+ ASSERT_KINDOF(CMDIChildWnd, pFrame);
+
+ // load the frame
+ CCreateContext context;
+ context.m_pCurrentFrame = this;
+
+ pFrame->SetHandles(hMenu, hAccel);
+ if (!pFrame->LoadFrame(nResources,
+ WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, &context))
+ {
+ TRACE(traceAppMsg, 0, "Couldn't load frame window.\n");
+ return NULL;
+ }
+
+ CString strFullString, strTitle;
+ if (strFullString.LoadString(nResources))
+ AfxExtractSubString(strTitle, strFullString, CDocTemplate::docName);
+
+ // redraw the frame and parent
+ pFrame->SetTitle(strTitle);
+ pFrame->InitialUpdateFrame(NULL, TRUE);
+
+ return pFrame;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CMDIFrameWnd Diagnostics
+
+#ifdef _DEBUG
+void CMDIFrameWnd::AssertValid() const
+{
+ CFrameWnd::AssertValid();
+ ASSERT(m_hWndMDIClient == NULL || ::IsWindow(m_hWndMDIClient));
+ ASSERT(m_hMenuDefault == NULL || ::IsMenu(m_hMenuDefault));
+}
+
+void CMDIFrameWnd::Dump(CDumpContext& dc) const
+{
+ CFrameWnd::Dump(dc);
+
+ dc << "m_hWndMDIClient = " << (void*)m_hWndMDIClient;
+ dc << "\nm_hMenuDefault = " << (void*)m_hMenuDefault;
+
+ dc << "\n";
+}
+#endif //_DEBUG
+
+/////////////////////////////////////////////////////////////////////////////
+// CMDIChildWnd
+
+BEGIN_MESSAGE_MAP(CMDIChildWnd, CFrameWnd)
+ //{{AFX_MSG_MAP(CMDIChildWnd)
+ ON_WM_MOUSEACTIVATE()
+ ON_WM_NCACTIVATE()
+ ON_WM_MDIACTIVATE()
+ ON_WM_SIZE()
+ ON_WM_WINDOWPOSCHANGING()
+ ON_WM_NCCREATE()
+ ON_WM_CREATE()
+ ON_WM_DESTROY()
+ ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, &CMDIChildWnd::OnToolTipText)
+ ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, &CMDIChildWnd::OnToolTipText)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+CMDIChildWnd::CMDIChildWnd()
+{
+ m_hMenuShared = NULL;
+ m_bPseudoInactive = FALSE;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CMDIChildWnd special processing
+
+LRESULT CMDIChildWnd::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
+{
+ return ::DefMDIChildProc(m_hWnd, nMsg, wParam, lParam);
+}
+
+BOOL CMDIChildWnd::DestroyWindow()
+{
+ if (m_hWnd == NULL)
+ return FALSE;
+
+ // avoid changing the caption during the destroy message(s)
+ CMDIFrameWnd* pFrameWnd = GetMDIFrame();
+ HWND hWndFrame = pFrameWnd->m_hWnd;
+ ASSERT(::IsWindow(hWndFrame));
+ DWORD dwStyle = SetWindowLong(hWndFrame, GWL_STYLE,
+ GetWindowLong(hWndFrame, GWL_STYLE) & ~FWS_ADDTOTITLE);
+
+ MDIDestroy();
+
+ if (::IsWindow(hWndFrame))
+ {
+ ASSERT(hWndFrame == pFrameWnd->m_hWnd);
+ SetWindowLong(hWndFrame, GWL_STYLE, dwStyle);
+ pFrameWnd->OnUpdateFrameTitle(TRUE);
+ }
+
+ return TRUE;
+}
+
+BOOL CMDIChildWnd::PreTranslateMessage(MSG* pMsg)
+{
+ // check for special cancel modes for combo boxes
+ if (pMsg->message == WM_LBUTTONDOWN || pMsg->message == WM_NCLBUTTONDOWN)
+ AfxCancelModes(pMsg->hwnd); // filter clicks
+
+ // allow tooltip messages to be filtered
+ if (CWnd::PreTranslateMessage(pMsg))
+ return TRUE;
+
+ // we can't call 'CFrameWnd::PreTranslate' since it will translate
+ // accelerators in the context of the MDI Child - but since MDI Child
+ // windows don't have menus this doesn't work properly. MDI Child
+ // accelerators must be translated in context of their MDI Frame.
+
+ if (pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
+ {
+ // use document specific accelerator table over m_hAccelTable
+ HACCEL hAccel = GetDefaultAccelerator();
+ return hAccel != NULL &&
+ ::TranslateAccelerator(GetMDIFrame()->m_hWnd, hAccel, pMsg);
+ }
+ return FALSE;
+}
+
+BOOL CMDIChildWnd::PreCreateWindow(CREATESTRUCT& cs)
+{
+ ASSERT(cs.style & WS_CHILD);
+ // MFC V2 requires that MDI Children are created with proper styles,
+ // usually: WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW.
+ // See Technical note TN019 for more details on MFC V1->V2 migration.
+
+ return CFrameWnd::PreCreateWindow(cs);
+}
+
+BOOL CMDIChildWnd::Create(LPCTSTR lpszClassName,
+ LPCTSTR lpszWindowName, DWORD dwStyle,
+ const RECT& rect, CMDIFrameWnd* pParentWnd,
+ CCreateContext* pContext)
+{
+ if (pParentWnd == NULL)
+ {
+ CWinThread *pThread = AfxGetThread();
+ ENSURE_VALID(pThread);
+ CWnd* pMainWnd = pThread->m_pMainWnd;
+ ENSURE_VALID(pMainWnd);
+ ASSERT_KINDOF(CMDIFrameWnd, pMainWnd);
+ pParentWnd = (CMDIFrameWnd*)pMainWnd;
+ }
+ ASSERT(::IsWindow(pParentWnd->m_hWndMDIClient));
+
+ // insure correct window positioning
+ pParentWnd->RecalcLayout();
+
+ // first copy into a CREATESTRUCT for PreCreate
+ CREATESTRUCT cs;
+ cs.dwExStyle = 0L;
+ cs.lpszClass = lpszClassName;
+ cs.lpszName = lpszWindowName;
+ cs.style = dwStyle;
+ cs.x = rect.left;
+ cs.y = rect.top;
+ cs.cx = rect.right - rect.left;
+ cs.cy = rect.bottom - rect.top;
+ cs.hwndParent = pParentWnd->m_hWnd;
+ cs.hMenu = NULL;
+ cs.hInstance = AfxGetInstanceHandle();
+ cs.lpCreateParams = (LPVOID)pContext;
+
+ if (!PreCreateWindow(cs))
+ {
+ PostNcDestroy();
+ return FALSE;
+ }
+ // extended style must be zero for MDI Children (except under Win4)
+ ASSERT(cs.hwndParent == pParentWnd->m_hWnd); // must not change
+
+ // now copy into a MDICREATESTRUCT for real create
+ MDICREATESTRUCT mcs;
+ mcs.szClass = cs.lpszClass;
+ mcs.szTitle = cs.lpszName;
+ mcs.hOwner = cs.hInstance;
+ mcs.x = cs.x;
+ mcs.y = cs.y;
+ mcs.cx = cs.cx;
+ mcs.cy = cs.cy;
+ mcs.style = cs.style & ~(WS_MAXIMIZE | WS_VISIBLE);
+ mcs.lParam = (LPARAM)cs.lpCreateParams;
+
+ // create the window through the MDICLIENT window
+ AfxHookWindowCreate(this);
+ HWND hWnd = (HWND)::SendMessage(pParentWnd->m_hWndMDIClient,
+ WM_MDICREATE, 0, (LPARAM)&mcs);
+ if (!AfxUnhookWindowCreate())
+ PostNcDestroy(); // cleanup if MDICREATE fails too soon
+
+ if (hWnd == NULL)
+ return FALSE;
+
+ // special handling of visibility (always created invisible)
+ if (cs.style & WS_VISIBLE)
+ {
+ // place the window on top in z-order before showing it
+ ::BringWindowToTop(hWnd);
+
+ // show it as specified
+ if (cs.style & WS_MINIMIZE)
+ ShowWindow(SW_SHOWMINIMIZED);
+ else if (cs.style & WS_MAXIMIZE)
+ ShowWindow(SW_SHOWMAXIMIZED);
+ else
+ ShowWindow(SW_SHOWNORMAL);
+
+ // make sure it is active (visibility == activation)
+ pParentWnd->MDIActivate(this);
+
+ // refresh MDI Window menu
+ ::SendMessage(pParentWnd->m_hWndMDIClient, WM_MDIREFRESHMENU, 0, 0);
+ }
+
+ ASSERT(hWnd == m_hWnd);
+ return TRUE;
+}
+
+BOOL CMDIChildWnd::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle,
+ CWnd* pParentWnd, CCreateContext* pContext)
+{
+ // only do this once
+ ASSERT_VALID_IDR(nIDResource);
+ ASSERT(m_nIDHelp == 0 || m_nIDHelp == nIDResource);
+
+ m_nIDHelp = nIDResource; // ID for help context (+HID_BASE_RESOURCE)
+
+ // parent must be MDI Frame (or NULL for default)
+ ASSERT(pParentWnd == NULL || pParentWnd->IsKindOf(RUNTIME_CLASS(CMDIFrameWnd)));
+ // will be a child of MDIClient
+ ASSERT(!(dwDefaultStyle & WS_POPUP));
+ dwDefaultStyle |= WS_CHILD;
+
+ // if available - get MDI child menus from doc template
+ CMultiDocTemplate* pTemplate;
+ if (pContext != NULL &&
+ (pTemplate = (CMultiDocTemplate*)pContext->m_pNewDocTemplate) != NULL)
+ {
+ ASSERT_KINDOF(CMultiDocTemplate, pTemplate);
+ // get shared menu from doc template
+ m_hMenuShared = pTemplate->m_hMenuShared;
+ m_hAccelTable = pTemplate->m_hAccelTable;
+ }
+ else
+ {
+ TRACE(traceAppMsg, 0, "Warning: no shared menu/acceltable for MDI Child window.\n");
+ // if this happens, programmer must load these manually
+ }
+
+ CString strFullString, strTitle;
+ if (strFullString.LoadString(nIDResource))
+ AfxExtractSubString(strTitle, strFullString, 0); // first sub-string
+
+ ASSERT(m_hWnd == NULL);
+ if (!Create(GetIconWndClass(dwDefaultStyle, nIDResource),
+ strTitle, dwDefaultStyle, rectDefault,
+ (CMDIFrameWnd*)pParentWnd, pContext))
+ {
+ return FALSE; // will self destruct on failure normally
+ }
+
+ // it worked !
+ return TRUE;
+}
+
+void CMDIChildWnd::OnSize(UINT nType, int cx, int cy)
+{
+ CFrameWnd::OnSize(nType, cx, cy);
+
+ // update our parent frame - in case we are now maximized or not
+ GetMDIFrame()->OnUpdateFrameTitle(TRUE);
+}
+
+BOOL CMDIChildWnd::UpdateClientEdge(LPRECT lpRect)
+{
+ UNREFERENCED_PARAMETER(lpRect);
+
+ // only adjust for active MDI child window
+ //CMDIFrameWnd* pFrameWnd = GetMDIFrame();
+ //CMDIChildWnd* pChild = pFrameWnd->MDIGetActive();
+
+ // Only adjust for regular MDI child windows, not tabbed windows. Attempting to set WS_EX_CLIENTEDGE on the tabbed
+ // MDI client area window is subverted by CMDIClientAreaWnd::OnStyleChanging, so we always try to reset the style and
+ // always repaint, none of which is necessary since the tabbed MDI children never change from maximized to restored.
+#if 0
+ CMDIChildWndEx* pChildEx = (pChild == NULL) ? NULL : DYNAMIC_DOWNCAST(CMDIChildWndEx, pChild);
+ BOOL bIsTabbedMDIChild = (pChildEx == NULL) ? FALSE : pChildEx->GetMDIFrameWndEx() != NULL && pChildEx->GetMDIFrameWndEx()->AreMDITabs();
+ if ((pChild == NULL || pChild == this) && !bIsTabbedMDIChild)
+ {
+ // need to adjust the client edge style as max/restore happens
+ DWORD dwStyle = ::GetWindowLong(pFrameWnd->m_hWndMDIClient, GWL_EXSTYLE);
+ DWORD dwNewStyle = dwStyle;
+ if (pChild != NULL && !(GetExStyle() & WS_EX_CLIENTEDGE) && (GetStyle() & WS_MAXIMIZE))
+ {
+ dwNewStyle &= ~(WS_EX_CLIENTEDGE);
+ }
+ else
+ {
+ dwNewStyle |= WS_EX_CLIENTEDGE;
+ }
+
+ if (dwStyle != dwNewStyle)
+ {
+ // SetWindowPos will not move invalid bits
+ ::RedrawWindow(pFrameWnd->m_hWndMDIClient, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
+
+ // remove/add WS_EX_CLIENTEDGE to MDI client area
+ ::SetWindowLong(pFrameWnd->m_hWndMDIClient, GWL_EXSTYLE, dwNewStyle);
+ ::SetWindowPos(pFrameWnd->m_hWndMDIClient, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOCOPYBITS);
+
+ // return new client area
+ if (lpRect != NULL)
+ {
+ ::GetClientRect(pFrameWnd->m_hWndMDIClient, lpRect);
+ }
+
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+void CMDIChildWnd::OnWindowPosChanging(LPWINDOWPOS lpWndPos)
+{
+ if (!(lpWndPos->flags & SWP_NOSIZE))
+ {
+ CRect rectClient;
+ if (UpdateClientEdge(rectClient) && (GetStyle() & WS_MAXIMIZE))
+ {
+ // adjust maximized window size and position based on new
+ // size/position of the MDI client area.
+ ::AdjustWindowRectEx(rectClient, GetStyle(), FALSE, GetExStyle());
+ lpWndPos->x = rectClient.left;
+ lpWndPos->y = rectClient.top;
+ lpWndPos->cx = rectClient.Width();
+ lpWndPos->cy = rectClient.Height();
+ }
+ }
+
+ CFrameWnd::OnWindowPosChanging(lpWndPos);
+}
+
+void CMDIChildWnd::OnDestroy()
+{
+ UpdateClientEdge();
+
+ CFrameWnd::OnDestroy();
+}
+
+BOOL CMDIChildWnd::OnNcActivate(BOOL bActive)
+{
+ // bypass CFrameWnd::OnNcActivate()
+ return CWnd::OnNcActivate(bActive);
+}
+
+int CMDIChildWnd::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
+{
+ int nResult = CFrameWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
+ if (nResult == MA_NOACTIVATE || nResult == MA_NOACTIVATEANDEAT)
+ return nResult; // frame does not want to activate
+
+ // activate this window if necessary
+ CMDIFrameWnd* pFrameWnd = GetMDIFrame();
+ ENSURE_VALID(pFrameWnd);
+ CMDIChildWnd* pActive = pFrameWnd->MDIGetActive();
+ if (pActive != this)
+ MDIActivate();
+
+ return nResult;
+}
+
+BOOL CMDIChildWnd::OnToolTipText(UINT msg, NMHDR* pNMHDR, LRESULT* pResult)
+{
+ ASSERT(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW);
+ UNUSED(pNMHDR);
+
+ // check to see if the message is going directly to this window or not
+ const MSG* pMsg = GetCurrentMessage();
+ if (pMsg->hwnd != m_hWnd)
+ {
+ // let top level frame handle this for us
+ return FALSE;
+ }
+
+ // otherwise, handle it ourselves
+ return CFrameWnd::OnToolTipText(msg, pNMHDR, pResult);
+}
+
+void CMDIChildWnd::ActivateFrame(int nCmdShow)
+{
+ BOOL bVisibleThen = (GetStyle() & WS_VISIBLE) != 0;
+ CMDIFrameWnd* pFrameWnd = GetMDIFrame();
+ ASSERT_VALID(pFrameWnd);
+
+ // determine default show command
+ if (nCmdShow == -1)
+ {
+ // get maximized state of frame window (previously active child)
+ BOOL bMaximized;
+ pFrameWnd->MDIGetActive(&bMaximized);
+
+ // convert show command based on current style
+ DWORD dwStyle = GetStyle();
+ if (bMaximized || (dwStyle & WS_MAXIMIZE))
+ nCmdShow = SW_SHOWMAXIMIZED;
+ else if (dwStyle & WS_MINIMIZE)
+ nCmdShow = SW_SHOWMINIMIZED;
+ }
+
+ // finally, show the window
+ CFrameWnd::ActivateFrame(nCmdShow);
+
+ // update the Window menu to reflect new child window
+ CMDIFrameWnd* pFrame = GetMDIFrame();
+ ::SendMessage(pFrame->m_hWndMDIClient, WM_MDIREFRESHMENU, 0, 0);
+
+ // Note: Update the m_bPseudoInactive flag. This is used to handle the
+ // last MDI child getting hidden. Windows provides no way to deactivate
+ // an MDI child window.
+
+ BOOL bVisibleNow = (GetStyle() & WS_VISIBLE) != 0;
+ if (bVisibleNow == bVisibleThen)
+ return;
+
+ if (!bVisibleNow)
+ {
+ // get current active window according to Windows MDI
+ HWND hWnd = (HWND)::SendMessage(pFrameWnd->m_hWndMDIClient,
+ WM_MDIGETACTIVE, 0, 0);
+ if (hWnd != m_hWnd)
+ {
+ // not active any more -- window must have been deactivated
+ ASSERT(!m_bPseudoInactive);
+ return;
+ }
+
+ // check next window
+ ASSERT(hWnd != NULL);
+ pFrameWnd->MDINext();
+
+ // see if it has been deactivated now...
+ hWnd = (HWND)::SendMessage(pFrameWnd->m_hWndMDIClient,
+ WM_MDIGETACTIVE, 0, 0);
+ if (hWnd == m_hWnd)
+ {
+ // still active -- fake deactivate it
+ ASSERT(hWnd != NULL);
+ ::SendMessage(pFrameWnd->m_hWndMDIClient, WM_MDIACTIVATE, (WPARAM)m_hWnd, NULL);
+ m_bPseudoInactive = TRUE; // so MDIGetActive returns NULL
+ }
+ }
+ else if (m_bPseudoInactive)
+ {
+ // if state transitioned from not visible to visible, but
+ // was pseudo deactivated -- send activate notify now
+ ::SendMessage(pFrameWnd->m_hWndMDIClient, WM_MDIACTIVATE, NULL, (LPARAM)m_hWnd);
+ ASSERT(!m_bPseudoInactive); // should get set in OnMDIActivate!
+ }
+}
+
+void CMDIChildWnd::SetHandles(HMENU hMenu, HACCEL hAccel)
+{
+ m_hMenuShared = hMenu;
+ m_hAccelTable = hAccel;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CMDIChildWnd Diagnostics
+
+#ifdef _DEBUG
+void CMDIChildWnd::AssertValid() const
+{
+ CFrameWnd::AssertValid();
+ ASSERT(m_hMenuShared == NULL || ::IsMenu(m_hMenuShared));
+}
+
+void CMDIChildWnd::Dump(CDumpContext& dc) const
+{
+ CFrameWnd::Dump(dc);
+
+ dc << "m_hMenuShared = " << (void*)m_hMenuShared;
+ dc << "\n";
+}
+#endif //_DEBUG
+
+/////////////////////////////////////////////////////////////////////////////
+// Smarts for the "Window" menu
+
+HMENU CMDIFrameWnd::GetWindowMenuPopup(HMENU hMenuBar)
+ // find which popup is the "Window" menu
+{
+ if (hMenuBar == NULL)
+ return NULL;
+
+ ASSERT(::IsMenu(hMenuBar));
+
+ int iItem = ::GetMenuItemCount(hMenuBar);
+ while (iItem--)
+ {
+ HMENU hMenuPop = ::GetSubMenu(hMenuBar, iItem);
+ if (hMenuPop != NULL)
+ {
+ int iItemMax = ::GetMenuItemCount(hMenuPop);
+ for (int iItemPop = 0; iItemPop < iItemMax; iItemPop++)
+ {
+ UINT nID = GetMenuItemID(hMenuPop, iItemPop);
+ if (nID >= AFX_IDM_WINDOW_FIRST && nID <= AFX_IDM_WINDOW_LAST)
+ return hMenuPop;
+ }
+ }
+ }
+
+ // no default menu found
+ TRACE(traceAppMsg, 0, "Warning: GetWindowMenuPopup failed!\n");
+ return NULL;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Smarts for updating the window menu based on the current child
+
+void CMDIFrameWnd::OnUpdateFrameMenu(HMENU hMenuAlt)
+{
+ CMDIChildWnd* pActiveWnd = MDIGetActive();
+ if (pActiveWnd != NULL)
+ {
+ // let child update the menu bar
+ pActiveWnd->OnUpdateFrameMenu(TRUE, pActiveWnd, hMenuAlt);
+ }
+ else
+ {
+ // no child active, so have to update it ourselves
+ // (we can't send it to a child window, since pActiveWnd is NULL)
+ if (hMenuAlt == NULL)
+ hMenuAlt = m_hMenuDefault; // use default
+ ::SendMessage(m_hWndMDIClient, WM_MDISETMENU, (WPARAM)hMenuAlt, NULL);
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MDI Child Extensions
+
+// walk up two parents for MDIFrame that owns MDIChild (skip MDIClient)
+CMDIFrameWnd* CMDIChildWnd::GetMDIFrame()
+{
+ ASSERT_KINDOF(CMDIChildWnd, this);
+ ASSERT(m_hWnd != NULL);
+ HWND hWndMDIClient = ::GetParent(m_hWnd);
+ ASSERT(hWndMDIClient != NULL);
+
+ CMDIFrameWnd* pMDIFrame;
+ pMDIFrame = (CMDIFrameWnd*)CWnd::FromHandle(::GetParent(hWndMDIClient));
+ ASSERT(pMDIFrame != NULL);
+ ASSERT_KINDOF(CMDIFrameWnd, pMDIFrame);
+ ASSERT(pMDIFrame->m_hWndMDIClient == hWndMDIClient);
+ ASSERT_VALID(pMDIFrame);
+ return pMDIFrame;
+}
+
+CWnd* CMDIChildWnd::GetMessageBar()
+{
+ // status bar/message bar owned by parent MDI frame
+ return GetMDIFrame()->GetMessageBar();
+}
+
+void CMDIChildWnd::OnUpdateFrameTitle(BOOL bAddToTitle)
+{
+ // update our parent window first
+ GetMDIFrame()->OnUpdateFrameTitle(bAddToTitle);
+
+ if ((GetStyle() & FWS_ADDTOTITLE) == 0)
+ return; // leave child window alone!
+
+ CDocument* pDocument = GetActiveDocument();
+ if (bAddToTitle)
+ {
+ TCHAR szText[256+_MAX_PATH];
+ if (pDocument == NULL)
+ Checked::tcsncpy_s(szText, _countof(szText), m_strTitle, _TRUNCATE);
+ else
+ Checked::tcsncpy_s(szText, _countof(szText), pDocument->GetTitle(), _TRUNCATE);
+ if (m_nWindow > 0)
+ {
+ TCHAR szWinNumber[16+1];
+ _stprintf_s(szWinNumber, _countof(szWinNumber), _T(":%d"), m_nWindow);
+
+ if( lstrlen(szText) + lstrlen(szWinNumber) < _countof(szText) )
+ {
+ Checked::tcscat_s( szText, _countof(szText), szWinNumber );
+ }
+ }
+
+ // set title if changed, but don't remove completely
+ AfxSetWindowText(m_hWnd, szText);
+ }
+}
+
+void CMDIChildWnd::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd*)
+{
+ m_bPseudoInactive = FALSE; // must be happening for real
+
+ // make sure MDI client window has correct client edge
+ UpdateClientEdge();
+
+ // send deactivate notification to active view
+ CView* pActiveView = GetActiveView();
+ if (!bActivate && pActiveView != NULL)
+ pActiveView->OnActivateView(FALSE, pActiveView, pActiveView);
+
+ // allow hook to short circuit normal activation
+ BOOL bHooked = FALSE;
+#ifndef _AFX_NO_OLE_SUPPORT
+ if (m_pNotifyHook != NULL && m_pNotifyHook->OnDocActivate(bActivate))
+ bHooked = TRUE;
+#endif
+
+ // update titles (don't AddToTitle if deactivate last)
+ if (!bHooked)
+ OnUpdateFrameTitle(bActivate || (pActivateWnd != NULL));
+
+ // re-activate the appropriate view
+ if (bActivate)
+ {
+ if (pActiveView != NULL && GetMDIFrame() == GetActiveWindow())
+ pActiveView->OnActivateView(TRUE, pActiveView, pActiveView);
+ }
+
+ // update menus
+ if (!bHooked)
+ {
+ OnUpdateFrameMenu(bActivate, pActivateWnd, NULL);
+ GetMDIFrame()->DrawMenuBar();
+ }
+}
+
+void CMDIChildWnd::OnUpdateFrameMenu(BOOL bActivate, CWnd* pActivateWnd,
+ HMENU hMenuAlt)
+{
+ CMDIFrameWnd* pFrame = GetMDIFrame();
+
+ if (hMenuAlt == NULL && bActivate)
+ {
+ // attempt to get default menu from document
+ CDocument* pDoc = GetActiveDocument();
+ if (pDoc != NULL)
+ hMenuAlt = pDoc->GetDefaultMenu();
+ }
+
+ // use default menu stored in frame if none from document
+ if (hMenuAlt == NULL)
+ hMenuAlt = m_hMenuShared;
+
+ if (hMenuAlt != NULL && bActivate)
+ {
+ ASSERT(pActivateWnd == this);
+
+ // activating child, set parent menu
+ ::SendMessage(pFrame->m_hWndMDIClient, WM_MDISETMENU,
+ (WPARAM)hMenuAlt, (LPARAM)pFrame->GetWindowMenuPopup(hMenuAlt));
+ }
+ else if (hMenuAlt != NULL && !bActivate && pActivateWnd == NULL)
+ {
+ // destroying last child
+ HMENU hMenuLast = NULL;
+ ::SendMessage(pFrame->m_hWndMDIClient, WM_MDISETMENU,
+ (WPARAM)pFrame->m_hMenuDefault, (LPARAM)hMenuLast);
+ }
+ else
+ {
+ // refresh MDI Window menu (even if non-shared menu)
+ ::SendMessage(pFrame->m_hWndMDIClient, WM_MDIREFRESHMENU, 0, 0);
+ }
+}
+
+BOOL CMDIChildWnd::OnNcCreate(LPCREATESTRUCT lpCreateStruct)
+{
+ if (!CFrameWnd::OnNcCreate(lpCreateStruct))
+ return FALSE;
+
+ // handle extended styles under Win4
+ // call PreCreateWindow again just to get dwExStyle
+ VERIFY(PreCreateWindow(*lpCreateStruct));
+ SetWindowLong(m_hWnd, GWL_EXSTYLE, lpCreateStruct->dwExStyle);
+
+ return TRUE;
+}
+
+int CMDIChildWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+ // call base class with lParam context (not MDI one)
+ MDICREATESTRUCT* lpmcs;
+ lpmcs = (MDICREATESTRUCT*)lpCreateStruct->lpCreateParams;
+ CCreateContext* pContext = (CCreateContext*)lpmcs->lParam;
+
+ return OnCreateHelper(lpCreateStruct, pContext);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Special UI processing depending on current active child
+
+void CMDIFrameWnd::OnUpdateFrameTitle(BOOL bAddToTitle)
+{
+ if ((GetStyle() & FWS_ADDTOTITLE) == 0)
+ return; // leave it alone!
+
+#ifndef _AFX_NO_OLE_SUPPORT
+ // allow hook to set the title (used for OLE support)
+ if (m_pNotifyHook != NULL && m_pNotifyHook->OnUpdateFrameTitle())
+ return;
+#endif
+
+ CMDIChildWnd* pActiveChild = NULL;
+ CDocument* pDocument = GetActiveDocument();
+ if (bAddToTitle &&
+ (pActiveChild = MDIGetActive()) != NULL &&
+ (pActiveChild->GetStyle() & WS_MAXIMIZE) == 0 &&
+ (pDocument != NULL ||
+ (pDocument = pActiveChild->GetActiveDocument()) != NULL))
+ UpdateFrameTitleForDocument(pDocument->GetTitle());
+ else
+ {
+ LPCTSTR lpstrTitle = NULL;
+ CString strTitle;
+
+ if (pActiveChild != NULL &&
+ (pActiveChild->GetStyle() & WS_MAXIMIZE) == 0)
+ {
+ strTitle = pActiveChild->GetTitle();
+ if (!strTitle.IsEmpty())
+ lpstrTitle = strTitle;
+ }
+ UpdateFrameTitleForDocument(lpstrTitle);
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Standard MDI Commands
+
+// Two function for all standard MDI "Window" commands
+void CMDIFrameWnd::OnUpdateMDIWindowCmd(CCmdUI* pCmdUI)
+{
+ ASSERT(m_hWndMDIClient != NULL);
+ pCmdUI->Enable(MDIGetActive() != NULL);
+}
+
+BOOL CMDIFrameWnd::OnMDIWindowCmd(UINT nID)
+{
+ ASSERT(m_hWndMDIClient != NULL);
+
+ UINT msg;
+ UINT wParam = 0;
+ switch (nID)
+ {
+ default:
+ return FALSE; // not for us
+ case ID_WINDOW_ARRANGE:
+ msg = WM_MDIICONARRANGE;
+ break;
+ case ID_WINDOW_CASCADE:
+ msg = WM_MDICASCADE;
+ break;
+ case ID_WINDOW_TILE_HORZ:
+ wParam = MDITILE_HORIZONTAL;
+ // fall through
+ case ID_WINDOW_TILE_VERT:
+ ASSERT(MDITILE_VERTICAL == 0);
+ msg = WM_MDITILE;
+ break;
+ }
+
+ ::SendMessage(m_hWndMDIClient, msg, wParam, 0);
+ return TRUE;
+}
+
+void CMDIFrameWnd::OnWindowNew()
+{
+ CMDIChildWnd* pActiveChild = MDIGetActive();
+ CDocument* pDocument;
+ if (pActiveChild == NULL ||
+ (pDocument = pActiveChild->GetActiveDocument()) == NULL)
+ {
+ TRACE(traceAppMsg, 0, "Warning: No active document for WindowNew command.\n");
+ AfxMessageBox(AFX_IDP_COMMAND_FAILURE);
+ return; // command failed
+ }
+
+ // otherwise we have a new frame !
+ CDocTemplate* pTemplate = pDocument->GetDocTemplate();
+ ASSERT_VALID(pTemplate);
+ CFrameWnd* pFrame = pTemplate->CreateNewFrame(pDocument, pActiveChild);
+ if (pFrame == NULL)
+ {
+ TRACE(traceAppMsg, 0, "Warning: failed to create new frame.\n");
+ return; // command failed
+ }
+
+ pTemplate->InitialUpdateFrame(pFrame, pDocument);
+}
+
+void CMDIFrameWnd::SetMenuBarVisibility(DWORD dwStyle)
+{
+ ENSURE_ARG(dwStyle == AFX_MBV_KEEPVISIBLE);
+ ASSERT(m_dwMenuBarVisibility == AFX_MBV_KEEPVISIBLE);
+}
+
+BOOL CMDIFrameWnd::SetMenuBarState(DWORD dwState)
+{
+ return m_dwMenuBarState == AFX_MBS_HIDDEN ? FALSE : CFrameWnd::SetMenuBarState(dwState);
+}
+
+IMPLEMENT_DYNCREATE(CMDIFrameWnd, CFrameWnd)
+IMPLEMENT_DYNCREATE(CMDIChildWnd, CFrameWnd)
+
+////////////////////////////////////////////////////////////////////////////